Skip to content

Commit

Permalink
updates for review
Browse files Browse the repository at this point in the history
  • Loading branch information
joemarshall committed Oct 2, 2023
1 parent 44a80bb commit e0fb69c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyodide_lock/cli/lockfile.py → pyodide_lock/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
try:
import typer

from ..spec import PyodideLockSpec
from .spec import PyodideLockSpec

main = typer.Typer()

Expand Down
Empty file removed pyodide_lock/cli/__init__.py
Empty file.
6 changes: 4 additions & 2 deletions pyodide_lock/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import TYPE_CHECKING, Literal

from pydantic import BaseModel, Extra
from pydantic import BaseModel, Extra, Field

if TYPE_CHECKING:
from packaging.requirements import Requirement
Expand All @@ -30,7 +30,9 @@ class Config:
class PackageSpec(BaseModel):
name: str
version: str
file_name: str
file_name: str = Field(
description="Path (or URL) to wheel.", format="uri-reference"
)
install_dir: str
sha256: str = ""
package_type: Literal[
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ addopts = '''
--doctest-modules'''

[project.entry-points."pyodide.cli"]
lockfile = "pyodide_lock.cli.lockfile:main"
lockfile = "pyodide_lock.cli:main"
3 changes: 2 additions & 1 deletion tests/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

import build
import pytest
from test_spec import LOCK_EXAMPLE

from pyodide_lock import PackageSpec, PyodideLockSpec
from pyodide_lock.utils import _generate_package_hash, _get_marker_environment

from .test_spec import LOCK_EXAMPLE

# we test if our own wheel imports nicely
# so check if it is built in /dist, or else skip that test
HERE = Path(__file__).parent
Expand Down

0 comments on commit e0fb69c

Please sign in to comment.