diff --git a/README.md b/README.md index 2cb32b00..449c5fc1 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,6 @@ pip install -i https://test.pypi.org/simple/ -==1.0.0 ### Writing new scenarios -**Not yet written** +Scenario files may contain one or more scenarios written in JSON. + +**Documentation not yet written** diff --git a/scenarios/requires-does-not-exist.json b/scenarios/requires-does-not-exist.json index 85ec9e45..7e038b48 100644 --- a/scenarios/requires-does-not-exist.json +++ b/scenarios/requires-does-not-exist.json @@ -1,17 +1,91 @@ -{ - "name": "requires-does-not-exist", - "description": "Package `a` requires any version of package `b` which does not exist", - "root": "a", - "packages": { - "a": { - "versions": { - "1.0.0": { - "requires_python": ">=3.7", - "requires": [ - "b" - ] +[ + { + "name": "requires-package-does-not-exist", + "description": "Package `a` requires any version of package `b` which does not exist", + "root": "a", + "packages": { + "a": { + "versions": { + "1.0.0": { + "requires_python": ">=3.7", + "requires": [ + "b" + ] + } + } + } + } + }, + { + "name": "requires-exact-version-does-not-exist", + "description": "Package `a` requires an exact version of package `b` but only other versions exist", + "root": "a", + "packages": { + "a": { + "versions": { + "1.0.0": { + "requires_python": ">=3.7", + "requires": [ + "b==2.0.0" + ] + } + } + }, + "b": { + "versions": { + "1.0.0": { + "requires_python": ">=3.7", + "requires": [] + } + } + } + } + }, + { + "name": "requires-greater-version-does-not-exist", + "description": "Package `a` requires a version of `b` greater than `1.0.0` but only smaller versions exist", + "root": "a", + "packages": { + "a": { + "versions": { + "1.0.0": { + "requires_python": ">=3.7", + "requires": [ + "b>1.0.0" + ] + } + } + }, + "b": { + "versions": { + "0.1.0": {}, + "1.0.0": {} + } + } + } + }, + { + "name": "requires-less-version-does-not-exist", + "description": "Package `a` requires a version of `b` less than `1.0.0` but only larger versions exist", + "root": "a", + "packages": { + "a": { + "versions": { + "1.0.0": { + "requires_python": ">=3.7", + "requires": [ + "b<2.0.0" + ] + } + } + }, + "b": { + "versions": { + "2.0.0": {}, + "3.0.0": {}, + "4.0.0": {} } } } } -} +] diff --git a/src/packse/build.py b/src/packse/build.py index ae6bac9b..e52fa050 100644 --- a/src/packse/build.py +++ b/src/packse/build.py @@ -14,36 +14,38 @@ InvalidScenario, ScenarioNotFound, ) -from packse.scenario import Package, Scenario, load_scenario, scenario_prefix +from packse.scenario import Package, Scenario, load_scenarios, scenario_prefix from packse.template import create_from_template logger = logging.getLogger(__name__) def build(targets: list[Path], rm_destination: bool): - # Validate all targets first + # Validate and collect all targets first + scenarios = [] + for target in targets: if not target.exists(): raise ScenarioNotFound(target) try: - load_scenario(target) + logger.debug("Loading %s", target) + scenarios.extend(load_scenarios(target)) except Exception as exc: raise InvalidScenario(target, reason=str(exc)) from exc # Then build each one - for target in targets: - result = build_scenario(target, rm_destination) + for scenario in scenarios: + result = build_scenario(scenario, rm_destination) print(result) -def build_scenario(target: Path, rm_destination: bool) -> str: +def build_scenario(scenario: Scenario, rm_destination: bool) -> str: """ Build the scenario defined at the given path. Returns the scenario's root package name. """ - scenario = load_scenario(target) prefix = scenario_prefix(scenario) work_dir = Path.cwd() diff --git a/src/packse/scenario.py b/src/packse/scenario.py index 8a2bf2b4..bdd545be 100644 --- a/src/packse/scenario.py +++ b/src/packse/scenario.py @@ -8,8 +8,8 @@ class PackageVersion(msgspec.Struct): - requires_python: str | None - requires: list[str] + requires_python: str | None = ">=3.7" + requires: list[str] = [] def hash(self) -> str: """ @@ -77,11 +77,28 @@ def hash(self) -> str: def load_scenario(target: Path) -> Scenario: """ - Loads a scenario, including a hash of its contents + Loads a scenario """ return msgspec.json.decode(target.read_text(), type=Scenario) +def load_many_scenarios(target: Path) -> list[Scenario]: + """ + Loads a file with many scenarios + """ + return msgspec.json.decode(target.read_text(), type=list[Scenario]) + + +def load_scenarios(target: Path) -> list[Scenario]: + # Guess if the file contains one or many scenario + with target.open() as buffer: + many = buffer.readline().lstrip().startswith("[") + if many: + return load_many_scenarios(target) + else: + return [load_scenario(target)] + + def scenario_version(scenario: Scenario) -> str: """ Generate a unique version for a scenario based on its contents. diff --git a/src/packse/view.py b/src/packse/view.py index b91a1bb8..c21232a5 100644 --- a/src/packse/view.py +++ b/src/packse/view.py @@ -7,31 +7,32 @@ from packaging.requirements import Requirement from packse.error import InvalidScenario, ScenarioNotFound -from packse.scenario import Scenario, load_scenario, scenario_prefix +from packse.scenario import Scenario, load_scenarios, scenario_prefix logger = logging.getLogger(__name__) def view(targets: list[Path]): - # Validate all targets first + scenarios = [] + + # Validate and collect all targets first for target in targets: if not target.exists(): raise ScenarioNotFound(target) try: - load_scenario(target) + logger.debug("Loading %s", target) + scenarios.extend(load_scenarios(target)) except Exception as exc: raise InvalidScenario(target, reason=str(exc)) from exc # Then view each one - for target in targets: - view_scenario(target) - + for scenario in scenarios: + logging.debug("Viewing %s", scenario.name) + view_scenario(scenario) -def view_scenario(target: Path): - logging.debug("Viewing %s", target) - scenario = load_scenario(target) +def view_scenario(scenario: Scenario): prefix = scenario_prefix(scenario) print(prefix) diff --git a/tests/__snapshots__/test_scenarios.ambr b/tests/__snapshots__/test_scenarios.ambr index b8178034..87395907 100644 --- a/tests/__snapshots__/test_scenarios.ambr +++ b/tests/__snapshots__/test_scenarios.ambr @@ -3,7 +3,7 @@ dict({ 'exit_code': 0, 'filesystem': dict({ - 'build/requires-does-not-exist-6ea3a390/requires-does-not-exist-6ea3a390-a-1.0.0/pyproject.toml': ''' + 'build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/pyproject.toml': ''' [build-system] requires = ["hatchling"] build-backend = "hatchling.build" @@ -12,50 +12,386 @@ sources = ["src"] [project] - name = "requires-does-not-exist-6ea3a390-a" + name = "requires-exact-version-does-not-exist-9b7b4d86-a" version = "1.0.0" - dependencies = ["requires-does-not-exist-6ea3a390-b"] + dependencies = ["requires-exact-version-does-not-exist-9b7b4d86-b==2.0.0"] requires-python = ">=3.7" ''', - 'build/requires-does-not-exist-6ea3a390/requires-does-not-exist-6ea3a390-a-1.0.0/src/requires_does_not_exist_6ea3a390_a/__init__.py': ''' + 'build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_a/__init__.py': ''' __version__ = "1.0.0" ''', - 'dist/requires-does-not-exist-6ea3a390/requires_does_not_exist_6ea3a390_a-1.0.0-py3-none-any.whl': 'md5:8d4ae497791990d1f9e0116fca7107eb', - 'dist/requires-does-not-exist-6ea3a390/requires_does_not_exist_6ea3a390_a-1.0.0.tar.gz': 'md5:e63ecf25fcdb6df22691c6339d5bf7ab', + 'build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-exact-version-does-not-exist-9b7b4d86-b" + version = "1.0.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_b/__init__.py': ''' + __version__ = "1.0.0" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-greater-version-does-not-exist-f72fdef3-a" + version = "1.0.0" + dependencies = ["requires-greater-version-does-not-exist-f72fdef3-b>1.0.0"] + requires-python = ">=3.7" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_a/__init__.py': ''' + __version__ = "1.0.0" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-greater-version-does-not-exist-f72fdef3-b" + version = "0.1.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/src/requires_greater_version_does_not_exist_f72fdef3_b/__init__.py': ''' + __version__ = "0.1.0" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-greater-version-does-not-exist-f72fdef3-b" + version = "1.0.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_b/__init__.py': ''' + __version__ = "1.0.0" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-a-1.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-less-version-does-not-exist-0a3a7000-a" + version = "1.0.0" + dependencies = ["requires-less-version-does-not-exist-0a3a7000-b<2.0.0"] + requires-python = ">=3.7" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-a-1.0.0/src/requires_less_version_does_not_exist_0a3a7000_a/__init__.py': ''' + __version__ = "1.0.0" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-2.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-less-version-does-not-exist-0a3a7000-b" + version = "2.0.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-2.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py': ''' + __version__ = "2.0.0" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-3.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-less-version-does-not-exist-0a3a7000-b" + version = "3.0.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-3.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py': ''' + __version__ = "3.0.0" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-4.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-less-version-does-not-exist-0a3a7000-b" + version = "4.0.0" + dependencies = [] + requires-python = ">=3.7" + + ''', + 'build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-4.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py': ''' + __version__ = "4.0.0" + + ''', + 'build/requires-package-does-not-exist-291e5374/requires-package-does-not-exist-291e5374-a-1.0.0/pyproject.toml': ''' + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.build] + sources = ["src"] + + [project] + name = "requires-package-does-not-exist-291e5374-a" + version = "1.0.0" + dependencies = ["requires-package-does-not-exist-291e5374-b"] + requires-python = ">=3.7" + + ''', + 'build/requires-package-does-not-exist-291e5374/requires-package-does-not-exist-291e5374-a-1.0.0/src/requires_package_does_not_exist_291e5374_a/__init__.py': ''' + __version__ = "1.0.0" + + ''', + 'dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0-py3-none-any.whl': 'md5:e006513ccc765f5e2cb0deb95b6789a8', + 'dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0.tar.gz': 'md5:dab8d28d3221a5c2af2ad84e8a20eba1', + 'dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0-py3-none-any.whl': 'md5:50bfe76fc3300646970264ae7496de27', + 'dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0.tar.gz': 'md5:c3a8a1726ca37711d31254ef37ce6e33', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_a-1.0.0-py3-none-any.whl': 'md5:1cb4876d9fb6cb42c25c6e365474d6e8', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_a-1.0.0.tar.gz': 'md5:dc00d8a8cd1d9ee5c4a6d1384fc3a845', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-0.1.0-py3-none-any.whl': 'md5:59442db2db19827f878e6241eb0e0a07', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-0.1.0.tar.gz': 'md5:e6e1fed5ebe7920f012981f3347bb3cb', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-1.0.0-py3-none-any.whl': 'md5:adfb1bf4ac574c2fe39f89689d20a5a5', + 'dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-1.0.0.tar.gz': 'md5:7915f9f5beed58f71a2f30b37a8ec014', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_a-1.0.0-py3-none-any.whl': 'md5:0d63f7990df918f94425c0282fb69dd0', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_a-1.0.0.tar.gz': 'md5:288fef7e2535bfc18a991b9f31edf10a', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-2.0.0-py3-none-any.whl': 'md5:41b5fe9189689e63bf68469d70883fef', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-2.0.0.tar.gz': 'md5:4fffcdb945e773e2179861382304df29', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-3.0.0-py3-none-any.whl': 'md5:b3ae212265086dbeb839879d2035d27b', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-3.0.0.tar.gz': 'md5:9d6fa7a995382a874ad3bcd36ea20fe6', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-4.0.0-py3-none-any.whl': 'md5:91b92d1f06c89f8884a3ab93ee4fd400', + 'dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-4.0.0.tar.gz': 'md5:be8251b164a43ec91c27b4f2ff20c318', + 'dist/requires-package-does-not-exist-291e5374/requires_package_does_not_exist_291e5374_a-1.0.0-py3-none-any.whl': 'md5:01c9847f9dc74f8f89252096b36d454a', + 'dist/requires-package-does-not-exist-291e5374/requires_package_does_not_exist_291e5374_a-1.0.0.tar.gz': 'md5:c8b6d25d222bc8d45ae294071f1e3d74', 'tree': ''' test_build_all_scenarios_requi0 ├── build - │ └── requires-does-not-exist-6ea3a390 - │ └── requires-does-not-exist-6ea3a390-a-1.0.0 + │ ├── requires-exact-version-does-not-exist-9b7b4d86 + │ │ ├── requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_exact_version_does_not_exist_9b7b4d86_a + │ │ │ └── __init__.py + │ │ └── requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0 + │ │ ├── pyproject.toml + │ │ └── src + │ │ └── requires_exact_version_does_not_exist_9b7b4d86_b + │ │ └── __init__.py + │ ├── requires-greater-version-does-not-exist-f72fdef3 + │ │ ├── requires-greater-version-does-not-exist-f72fdef3-a-1.0.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_greater_version_does_not_exist_f72fdef3_a + │ │ │ └── __init__.py + │ │ ├── requires-greater-version-does-not-exist-f72fdef3-b-0.1.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_greater_version_does_not_exist_f72fdef3_b + │ │ │ └── __init__.py + │ │ └── requires-greater-version-does-not-exist-f72fdef3-b-1.0.0 + │ │ ├── pyproject.toml + │ │ └── src + │ │ └── requires_greater_version_does_not_exist_f72fdef3_b + │ │ └── __init__.py + │ ├── requires-less-version-does-not-exist-0a3a7000 + │ │ ├── requires-less-version-does-not-exist-0a3a7000-a-1.0.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_less_version_does_not_exist_0a3a7000_a + │ │ │ └── __init__.py + │ │ ├── requires-less-version-does-not-exist-0a3a7000-b-2.0.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_less_version_does_not_exist_0a3a7000_b + │ │ │ └── __init__.py + │ │ ├── requires-less-version-does-not-exist-0a3a7000-b-3.0.0 + │ │ │ ├── pyproject.toml + │ │ │ └── src + │ │ │ └── requires_less_version_does_not_exist_0a3a7000_b + │ │ │ └── __init__.py + │ │ └── requires-less-version-does-not-exist-0a3a7000-b-4.0.0 + │ │ ├── pyproject.toml + │ │ └── src + │ │ └── requires_less_version_does_not_exist_0a3a7000_b + │ │ └── __init__.py + │ └── requires-package-does-not-exist-291e5374 + │ └── requires-package-does-not-exist-291e5374-a-1.0.0 │ ├── pyproject.toml │ └── src - │ └── requires_does_not_exist_6ea3a390_a + │ └── requires_package_does_not_exist_291e5374_a │ └── __init__.py └── dist - └── requires-does-not-exist-6ea3a390 - ├── requires_does_not_exist_6ea3a390_a-1.0.0-py3-none-any.whl - └── requires_does_not_exist_6ea3a390_a-1.0.0.tar.gz + ├── requires-exact-version-does-not-exist-9b7b4d86 + │ ├── requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0-py3-none-any.whl + │ ├── requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0.tar.gz + │ ├── requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0-py3-none-any.whl + │ └── requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0.tar.gz + ├── requires-greater-version-does-not-exist-f72fdef3 + │ ├── requires_greater_version_does_not_exist_f72fdef3_a-1.0.0-py3-none-any.whl + │ ├── requires_greater_version_does_not_exist_f72fdef3_a-1.0.0.tar.gz + │ ├── requires_greater_version_does_not_exist_f72fdef3_b-0.1.0-py3-none-any.whl + │ ├── requires_greater_version_does_not_exist_f72fdef3_b-0.1.0.tar.gz + │ ├── requires_greater_version_does_not_exist_f72fdef3_b-1.0.0-py3-none-any.whl + │ └── requires_greater_version_does_not_exist_f72fdef3_b-1.0.0.tar.gz + ├── requires-less-version-does-not-exist-0a3a7000 + │ ├── requires_less_version_does_not_exist_0a3a7000_a-1.0.0-py3-none-any.whl + │ ├── requires_less_version_does_not_exist_0a3a7000_a-1.0.0.tar.gz + │ ├── requires_less_version_does_not_exist_0a3a7000_b-2.0.0-py3-none-any.whl + │ ├── requires_less_version_does_not_exist_0a3a7000_b-2.0.0.tar.gz + │ ├── requires_less_version_does_not_exist_0a3a7000_b-3.0.0-py3-none-any.whl + │ ├── requires_less_version_does_not_exist_0a3a7000_b-3.0.0.tar.gz + │ ├── requires_less_version_does_not_exist_0a3a7000_b-4.0.0-py3-none-any.whl + │ └── requires_less_version_does_not_exist_0a3a7000_b-4.0.0.tar.gz + └── requires-package-does-not-exist-291e5374 + ├── requires_package_does_not_exist_291e5374_a-1.0.0-py3-none-any.whl + └── requires_package_does_not_exist_291e5374_a-1.0.0.tar.gz - 7 directories, 4 files + 40 directories, 40 files ''', }), 'stderr': ''' - INFO:root:Building 'requires-does-not-exist-6ea3a390' in directory 'build/requires-does-not-exist-6ea3a390' - INFO:packse.template:Creating requires-does-not-exist-6ea3a390-a-1.0.0 - INFO:packse.template:Creating requires-does-not-exist-6ea3a390-a-1.0.0/pyproject.toml - INFO:packse.template:Creating requires-does-not-exist-6ea3a390-a-1.0.0/src - INFO:packse.template:Creating requires-does-not-exist-6ea3a390-a-1.0.0/src/requires_does_not_exist_6ea3a390_a - INFO:packse.template:Creating requires-does-not-exist-6ea3a390-a-1.0.0/src/requires_does_not_exist_6ea3a390_a/__init__.py - INFO:packse.build:Building build/requires-does-not-exist-6ea3a390/requires-does-not-exist-6ea3a390-a-1.0.0 with hatch - INFO:packse.build:Linked distribution to dist/requires-does-not-exist-6ea3a390/requires_does_not_exist_6ea3a390_a-1.0.0-py3-none-any.whl - INFO:packse.build:Linked distribution to dist/requires-does-not-exist-6ea3a390/requires_does_not_exist_6ea3a390_a-1.0.0.tar.gz + INFO:root:Building 'requires-package-does-not-exist-291e5374' in directory 'build/requires-package-does-not-exist-291e5374' + INFO:packse.template:Creating requires-package-does-not-exist-291e5374-a-1.0.0 + INFO:packse.template:Creating requires-package-does-not-exist-291e5374-a-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-package-does-not-exist-291e5374-a-1.0.0/src + INFO:packse.template:Creating requires-package-does-not-exist-291e5374-a-1.0.0/src/requires_package_does_not_exist_291e5374_a + INFO:packse.template:Creating requires-package-does-not-exist-291e5374-a-1.0.0/src/requires_package_does_not_exist_291e5374_a/__init__.py + INFO:packse.build:Building build/requires-package-does-not-exist-291e5374/requires-package-does-not-exist-291e5374-a-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-package-does-not-exist-291e5374/requires_package_does_not_exist_291e5374_a-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-package-does-not-exist-291e5374/requires_package_does_not_exist_291e5374_a-1.0.0.tar.gz + INFO:root:Building 'requires-exact-version-does-not-exist-9b7b4d86' in directory 'build/requires-exact-version-does-not-exist-9b7b4d86' + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0 + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/src + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_a + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_a/__init__.py + INFO:packse.build:Building build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-a-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_a-1.0.0.tar.gz + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0 + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/src + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_b + INFO:packse.template:Creating requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0/src/requires_exact_version_does_not_exist_9b7b4d86_b/__init__.py + INFO:packse.build:Building build/requires-exact-version-does-not-exist-9b7b4d86/requires-exact-version-does-not-exist-9b7b4d86-b-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-exact-version-does-not-exist-9b7b4d86/requires_exact_version_does_not_exist_9b7b4d86_b-1.0.0.tar.gz + INFO:root:Building 'requires-greater-version-does-not-exist-f72fdef3' in directory 'build/requires-greater-version-does-not-exist-f72fdef3' + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-a-1.0.0 + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/src + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_a + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-a-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_a/__init__.py + INFO:packse.build:Building build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-a-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_a-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_a-1.0.0.tar.gz + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-0.1.0 + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/pyproject.toml + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/src + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/src/requires_greater_version_does_not_exist_f72fdef3_b + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-0.1.0/src/requires_greater_version_does_not_exist_f72fdef3_b/__init__.py + INFO:packse.build:Building build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-0.1.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-0.1.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-0.1.0.tar.gz + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-1.0.0 + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/src + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_b + INFO:packse.template:Creating requires-greater-version-does-not-exist-f72fdef3-b-1.0.0/src/requires_greater_version_does_not_exist_f72fdef3_b/__init__.py + INFO:packse.build:Building build/requires-greater-version-does-not-exist-f72fdef3/requires-greater-version-does-not-exist-f72fdef3-b-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-greater-version-does-not-exist-f72fdef3/requires_greater_version_does_not_exist_f72fdef3_b-1.0.0.tar.gz + INFO:root:Building 'requires-less-version-does-not-exist-0a3a7000' in directory 'build/requires-less-version-does-not-exist-0a3a7000' + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-a-1.0.0 + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-a-1.0.0/pyproject.toml + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-a-1.0.0/src + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-a-1.0.0/src/requires_less_version_does_not_exist_0a3a7000_a + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-a-1.0.0/src/requires_less_version_does_not_exist_0a3a7000_a/__init__.py + INFO:packse.build:Building build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-a-1.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_a-1.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_a-1.0.0.tar.gz + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-2.0.0 + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-2.0.0/pyproject.toml + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-2.0.0/src + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-2.0.0/src/requires_less_version_does_not_exist_0a3a7000_b + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-2.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py + INFO:packse.build:Building build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-2.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-2.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-2.0.0.tar.gz + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-3.0.0 + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-3.0.0/pyproject.toml + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-3.0.0/src + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-3.0.0/src/requires_less_version_does_not_exist_0a3a7000_b + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-3.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py + INFO:packse.build:Building build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-3.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-3.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-3.0.0.tar.gz + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-4.0.0 + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-4.0.0/pyproject.toml + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-4.0.0/src + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-4.0.0/src/requires_less_version_does_not_exist_0a3a7000_b + INFO:packse.template:Creating requires-less-version-does-not-exist-0a3a7000-b-4.0.0/src/requires_less_version_does_not_exist_0a3a7000_b/__init__.py + INFO:packse.build:Building build/requires-less-version-does-not-exist-0a3a7000/requires-less-version-does-not-exist-0a3a7000-b-4.0.0 with hatch + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-4.0.0-py3-none-any.whl + INFO:packse.build:Linked distribution to dist/requires-less-version-does-not-exist-0a3a7000/requires_less_version_does_not_exist_0a3a7000_b-4.0.0.tar.gz ''', 'stdout': ''' - requires-does-not-exist-6ea3a390-a + requires-package-does-not-exist-291e5374-a + requires-exact-version-does-not-exist-9b7b4d86-a + requires-greater-version-does-not-exist-f72fdef3-a + requires-less-version-does-not-exist-0a3a7000-a ''', }) @@ -73,11 +409,32 @@ }), 'stderr': '', 'stdout': ''' - requires-does-not-exist-6ea3a390 + requires-package-does-not-exist-291e5374 └── a-1.0.0 └── requires b └── unsatisfied + requires-exact-version-does-not-exist-9b7b4d86 + └── a-1.0.0 + └── requires b==2.0.0 + └── unsatisfied + └── b-1.0.0 + + requires-greater-version-does-not-exist-f72fdef3 + └── a-1.0.0 + └── requires b>1.0.0 + └── unsatisfied + ├── b-0.1.0 + └── b-1.0.0 + + requires-less-version-does-not-exist-0a3a7000 + └── a-1.0.0 + └── requires b<2.0.0 + └── unsatisfied + ├── b-2.0.0 + ├── b-3.0.0 + └── b-4.0.0 + ''', })