From b1a8c1d6089154fb7ea5fb76b62c8cd3ac0c1d2c Mon Sep 17 00:00:00 2001 From: "Elvis M. Wianda" <7077790+ewianda@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:35:50 -0400 Subject: [PATCH] feat: Add default dependencies fields (#108) --- docs/ext_lock_import.md | 17 +- docs/rules.md | 7 +- e2e/bzlmod/MODULE.bazel | 8 + e2e/bzlmod/lock_file/pdm_lock.bzl | 238 +++++++++++++++------ e2e/bzlmod/pdm.lock | 86 +++++--- e2e/bzlmod/pyproject.toml | 1 + e2e/bzlmod/uv.lock | 47 ++++ pycross/private/bzlmod/lock_import.bzl | 2 + pycross/private/bzlmod/tag_attrs.bzl | 3 + pycross/private/lock_attrs.bzl | 8 + pycross/private/tools/raw_lock_resolver.py | 35 ++- 11 files changed, 343 insertions(+), 109 deletions(-) diff --git a/docs/ext_lock_import.md b/docs/ext_lock_import.md index a96bcb3..c3cf4f5 100644 --- a/docs/ext_lock_import.md +++ b/docs/ext_lock_import.md @@ -9,15 +9,15 @@ The lock_import extension.
lock_import = use_extension("@rules_pycross//pycross/extensions:lock_import.bzl", "lock_import") lock_import.import_pdm(all_development_groups, all_optional_groups, default, - default_alias_single_version, development_groups, disallow_builds, - local_wheels, lock_file, optional_groups, project_file, repo, + default_alias_single_version, default_build_dependencies, development_groups, + disallow_builds, local_wheels, lock_file, optional_groups, project_file, repo, require_static_urls, target_environments) -lock_import.import_poetry(default_alias_single_version, disallow_builds, local_wheels, lock_file, - project_file, repo, target_environments) +lock_import.import_poetry(default_alias_single_version, default_build_dependencies, disallow_builds, + local_wheels, lock_file, project_file, repo, target_environments) lock_import.import_uv(all_development_groups, all_optional_groups, default, - default_alias_single_version, development_groups, disallow_builds, local_wheels, - lock_file, optional_groups, project_file, repo, require_static_urls, - target_environments) + default_alias_single_version, default_build_dependencies, development_groups, + disallow_builds, local_wheels, lock_file, optional_groups, project_file, repo, + require_static_urls, target_environments) lock_import.package(name, always_build, build_dependencies, build_target, ignore_dependencies, install_exclude_globs, repo)@@ -39,6 +39,7 @@ Import a PDM lock file. | all_optional_groups | Install all optional dependencies. | Boolean | optional | `False` | | default | Whether to install dependencies from the default group. | Boolean | optional | `True` | | default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | `False` | +| default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | `[]` | | development_groups | List of development dependency groups to install. | List of strings | optional | `[]` | | disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | `False` | | local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | `[]` | @@ -60,6 +61,7 @@ Import a Poetry lock file. | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | `False` | +| default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | `[]` | | disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | `False` | | local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | `[]` | | lock_file | The poetry.lock file. | Label | required | | @@ -81,6 +83,7 @@ Import a uv lock file. | all_optional_groups | Install all optional dependencies. | Boolean | optional | `False` | | default | Whether to install dependencies from the default group. | Boolean | optional | `True` | | default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | `False` | +| default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | `[]` | | development_groups | List of development dependency groups to install. | List of strings | optional | `[]` | | disallow_builds | If True, only pre-built wheels are allowed. | Boolean | optional | `False` | | local_wheels | A list of local .whl files to consider when processing lock files. | List of labels | optional | `[]` | diff --git a/docs/rules.md b/docs/rules.md index b8c6307..a09a5f7 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -8,9 +8,9 @@ Public build rule API re-exports
pycross_lock_file(name, out, always_include_sdist, annotations, default_alias_single_version, - disallow_builds, fully_qualified_environment_labels, generate_file_map, - local_wheels, lock_model_file, pypi_index, remote_wheels, repo_prefix, - target_environments) + default_build_dependencies, disallow_builds, fully_qualified_environment_labels, + generate_file_map, local_wheels, lock_model_file, pypi_index, remote_wheels, + repo_prefix, target_environments)@@ -25,6 +25,7 @@ pycross_lock_file(name, always_include_sdist | Always include an entry for a package's sdist if one exists. | Boolean | optional | `False` | | annotations | Optional annotations to apply to packages. | Dictionary: String -> String | optional | `{}` | | default_alias_single_version | Generate aliases for all packages that have a single version in the lock file. | Boolean | optional | `False` | +| default_build_dependencies | A list of package keys (name or name@version) that will be used as default build dependencies. | List of strings | optional | `[]` | | disallow_builds | Do not allow pycross_wheel_build targets in the final lock file (i.e., require wheels). | Boolean | optional | `False` | | fully_qualified_environment_labels | Generate fully-qualified environment labels. | Boolean | optional | `True` | | generate_file_map | Generate a FILES dict containing a mapping of filenames to repo labels. | Boolean | optional | `False` | diff --git a/e2e/bzlmod/MODULE.bazel b/e2e/bzlmod/MODULE.bazel index eca4c16..43b4440 100644 --- a/e2e/bzlmod/MODULE.bazel +++ b/e2e/bzlmod/MODULE.bazel @@ -81,6 +81,10 @@ lock_import.import_poetry( # lock_repo with PDM and some package overrides lock_import.import_pdm( default_alias_single_version = True, + default_build_dependencies = [ + "setuptools", + "wheel", + ], local_wheels = [ "//:cowsay-6.1-py3-none-any.whl", ], @@ -93,6 +97,10 @@ lock_import.import_pdm( # lock_repo with UV and some package overrides lock_import.import_uv( default_alias_single_version = True, + default_build_dependencies = [ + "setuptools", + "wheel", + ], local_wheels = [ "//:cowsay-6.1-py3-none-any.whl", ], diff --git a/e2e/bzlmod/lock_file/pdm_lock.bzl b/e2e/bzlmod/lock_file/pdm_lock.bzl index c33f209..0b615fa 100644 --- a/e2e/bzlmod/lock_file/pdm_lock.bzl +++ b/e2e/bzlmod/lock_file/pdm_lock.bzl @@ -2,7 +2,7 @@ # It is not intended for manual editing. """Pycross-generated dependency targets.""" -load("@@rules_pycross~//pycross:defs.bzl", "pycross_wheel_library") +load("@@rules_pycross~//pycross:defs.bzl", "pycross_wheel_build", "pycross_wheel_library") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") @@ -11,24 +11,25 @@ PINS = { "asttokens": "asttokens@2.4.1", "cowsay": "cowsay@6.1", "decorator": "decorator@5.1.1", - "exceptiongroup": "exceptiongroup@1.2.0", + "exceptiongroup": "exceptiongroup@1.2.1", "executing": "executing@2.0.1", "ipython": "ipython@8.17.2", "jedi": "jedi@0.19.1", - "matplotlib-inline": "matplotlib-inline@0.1.6", - "parso": "parso@0.8.3", + "matplotlib-inline": "matplotlib-inline@0.1.7", + "parso": "parso@0.8.4", "pexpect": "pexpect@4.9.0", - "prompt-toolkit": "prompt-toolkit@3.0.43", + "prompt-toolkit": "prompt-toolkit@3.0.47", "ptyprocess": "ptyprocess@0.7.0", "pure-eval": "pure-eval@0.2.2", - "pygments": "pygments@2.17.2", + "pygments": "pygments@2.18.0", "regex": "regex@2023.10.3", "setuptools": "setuptools@68.2.2", "six": "six@1.16.0", "stack-data": "stack-data@0.6.3", - "traitlets": "traitlets@5.14.1", + "traitlets": "traitlets@5.14.3", "wcwidth": "wcwidth@0.2.13", "wheel": "wheel@0.41.3", + "zope-interface": "zope-interface@5.5.2", "zstandard": "zstandard@0.22.0", } @@ -164,13 +165,13 @@ def targets(): ) native.alias( - name = "_wheel_exceptiongroup@1.2.0", - actual = "@pdm_lock_wheel_exceptiongroup_1.2.0_py3_none_any//file", + name = "_wheel_exceptiongroup@1.2.1", + actual = "@pdm_lock_wheel_exceptiongroup_1.2.1_py3_none_any//file", ) pycross_wheel_library( - name = "exceptiongroup@1.2.0", - wheel = ":_wheel_exceptiongroup@1.2.0", + name = "exceptiongroup@1.2.1", + wheel = ":_wheel_exceptiongroup@1.2.1", ) native.alias( @@ -186,22 +187,22 @@ def targets(): _ipython_8_17_2_deps = [ ":decorator@5.1.1", ":jedi@0.19.1", - ":matplotlib-inline@0.1.6", + ":matplotlib-inline@0.1.7", ":pexpect@4.9.0", - ":prompt-toolkit@3.0.43", - ":pygments@2.17.2", + ":prompt-toolkit@3.0.47", + ":pygments@2.18.0", ":stack-data@0.6.3", - ":traitlets@5.14.1", + ":traitlets@5.14.3", ] + select({ ":_env_python_3.10.11_aarch64-apple-darwin": [ ":appnope@0.1.4", - ":exceptiongroup@1.2.0", + ":exceptiongroup@1.2.1", ], ":_env_python_3.10.11_aarch64-unknown-linux-gnu": [ - ":exceptiongroup@1.2.0", + ":exceptiongroup@1.2.1", ], ":_env_python_3.10.11_x86_64-unknown-linux-gnu": [ - ":exceptiongroup@1.2.0", + ":exceptiongroup@1.2.1", ], ":_env_python_3.11.6_aarch64-apple-darwin": [ ":appnope@0.1.4", @@ -227,7 +228,7 @@ def targets(): ) _jedi_0_19_1_deps = [ - ":parso@0.8.3", + ":parso@0.8.4", ] native.alias( @@ -241,29 +242,29 @@ def targets(): wheel = ":_wheel_jedi@0.19.1", ) - _matplotlib_inline_0_1_6_deps = [ - ":traitlets@5.14.1", + _matplotlib_inline_0_1_7_deps = [ + ":traitlets@5.14.3", ] native.alias( - name = "_wheel_matplotlib-inline@0.1.6", - actual = "@pdm_lock_wheel_matplotlib_inline_0.1.6_py3_none_any//file", + name = "_wheel_matplotlib-inline@0.1.7", + actual = "@pdm_lock_wheel_matplotlib_inline_0.1.7_py3_none_any//file", ) pycross_wheel_library( - name = "matplotlib-inline@0.1.6", - deps = _matplotlib_inline_0_1_6_deps, - wheel = ":_wheel_matplotlib-inline@0.1.6", + name = "matplotlib-inline@0.1.7", + deps = _matplotlib_inline_0_1_7_deps, + wheel = ":_wheel_matplotlib-inline@0.1.7", ) native.alias( - name = "_wheel_parso@0.8.3", - actual = "@pdm_lock_wheel_parso_0.8.3_py2.py3_none_any//file", + name = "_wheel_parso@0.8.4", + actual = "@pdm_lock_wheel_parso_0.8.4_py2.py3_none_any//file", ) pycross_wheel_library( - name = "parso@0.8.3", - wheel = ":_wheel_parso@0.8.3", + name = "parso@0.8.4", + wheel = ":_wheel_parso@0.8.4", ) _pexpect_4_9_0_deps = [ @@ -281,19 +282,19 @@ def targets(): wheel = ":_wheel_pexpect@4.9.0", ) - _prompt_toolkit_3_0_43_deps = [ + _prompt_toolkit_3_0_47_deps = [ ":wcwidth@0.2.13", ] native.alias( - name = "_wheel_prompt-toolkit@3.0.43", - actual = "@pdm_lock_wheel_prompt_toolkit_3.0.43_py3_none_any//file", + name = "_wheel_prompt-toolkit@3.0.47", + actual = "@pdm_lock_wheel_prompt_toolkit_3.0.47_py3_none_any//file", ) pycross_wheel_library( - name = "prompt-toolkit@3.0.43", - deps = _prompt_toolkit_3_0_43_deps, - wheel = ":_wheel_prompt-toolkit@3.0.43", + name = "prompt-toolkit@3.0.47", + deps = _prompt_toolkit_3_0_47_deps, + wheel = ":_wheel_prompt-toolkit@3.0.47", ) native.alias( @@ -317,13 +318,13 @@ def targets(): ) native.alias( - name = "_wheel_pygments@2.17.2", - actual = "@pdm_lock_wheel_pygments_2.17.2_py3_none_any//file", + name = "_wheel_pygments@2.18.0", + actual = "@pdm_lock_wheel_pygments_2.18.0_py3_none_any//file", ) pycross_wheel_library( - name = "pygments@2.17.2", - wheel = ":_wheel_pygments@2.17.2", + name = "pygments@2.18.0", + wheel = ":_wheel_pygments@2.18.0", ) native.alias( @@ -387,13 +388,13 @@ def targets(): ) native.alias( - name = "_wheel_traitlets@5.14.1", - actual = "@pdm_lock_wheel_traitlets_5.14.1_py3_none_any//file", + name = "_wheel_traitlets@5.14.3", + actual = "@pdm_lock_wheel_traitlets_5.14.3_py3_none_any//file", ) pycross_wheel_library( - name = "traitlets@5.14.1", - wheel = ":_wheel_traitlets@5.14.1", + name = "traitlets@5.14.3", + wheel = ":_wheel_traitlets@5.14.3", ) native.alias( @@ -416,6 +417,47 @@ def targets(): wheel = ":_wheel_wheel@0.41.3", ) + _zope_interface_5_5_2_deps = [ + ":setuptools@68.2.2", + ] + + native.alias( + name = "_sdist_zope-interface@5.5.2", + actual = "@pdm_lock_sdist_zope.interface_5.5.2//file", + ) + + pycross_wheel_build( + name = "_build_zope-interface@5.5.2", + sdist = ":_sdist_zope-interface@5.5.2", + target_environment = _target, + deps = _zope_interface_5_5_2_deps, + tags = ["manual"], + ) + + native.alias( + name = "_wheel_zope-interface@5.5.2", + actual = select({ + ":_env_python_3.10.11_aarch64-apple-darwin": "@pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_macosx_11_0_arm64//file", + ":_env_python_3.10.11_aarch64-unknown-linux-gnu": "@pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_manylinux_2_17_aarch64.manylinux2014_aarch64//file", + ":_env_python_3.10.11_x86_64-unknown-linux-gnu": "@pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64//file", + ":_env_python_3.11.6_aarch64-apple-darwin": "@pdm_lock_wheel_zope.interface_5.5.2_cp311_cp311_macosx_11_0_arm64//file", + ":_env_python_3.11.6_aarch64-unknown-linux-gnu": "@pdm_lock_wheel_zope.interface_5.5.2_cp311_cp311_manylinux_2_17_aarch64.manylinux2014_aarch64//file", + ":_env_python_3.11.6_x86_64-unknown-linux-gnu": ":_build_zope-interface@5.5.2", + ":_env_python_3.12.0_aarch64-apple-darwin": ":_build_zope-interface@5.5.2", + ":_env_python_3.12.0_aarch64-unknown-linux-gnu": ":_build_zope-interface@5.5.2", + ":_env_python_3.12.0_x86_64-unknown-linux-gnu": ":_build_zope-interface@5.5.2", + ":_env_python_3.12_aarch64-apple-darwin": ":_build_zope-interface@5.5.2", + ":_env_python_3.12_aarch64-unknown-linux-gnu": ":_build_zope-interface@5.5.2", + ":_env_python_3.12_x86_64-unknown-linux-gnu": ":_build_zope-interface@5.5.2", + }), + ) + + pycross_wheel_library( + name = "zope-interface@5.5.2", + deps = _zope_interface_5_5_2_deps, + wheel = ":_wheel_zope-interface@5.5.2", + ) + native.alias( name = "_wheel_zstandard@0.22.0", actual = select({ @@ -443,6 +485,16 @@ def targets(): def repositories(): """Generated package repositories.""" + maybe( + http_file, + name = "pdm_lock_sdist_zope.interface_5.5.2", + urls = [ + "https://files.pythonhosted.org/packages/38/6f/fbfb7dde38be7e5644bb342c4c7cdc444cd5e2ffbd70d091263b3858a8cb/zope.interface-5.5.2.tar.gz", + ], + sha256 = "bfee1f3ff62143819499e348f5b8a7f3aa0259f9aca5e0ddae7391d059dce671", + downloaded_file_path = "zope.interface-5.5.2.tar.gz", + ) + maybe( http_file, name = "pdm_lock_wheel_appnope_0.1.4_py2.py3_none_any", @@ -485,12 +537,12 @@ def repositories(): maybe( http_file, - name = "pdm_lock_wheel_exceptiongroup_1.2.0_py3_none_any", + name = "pdm_lock_wheel_exceptiongroup_1.2.1_py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", + "https://files.pythonhosted.org/packages/01/90/79fe92dd413a9cab314ef5c591b5aa9b9ba787ae4cadab75055b0ae00b33/exceptiongroup-1.2.1-py3-none-any.whl", ], - sha256 = "4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", - downloaded_file_path = "exceptiongroup-1.2.0-py3-none-any.whl", + sha256 = "5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad", + downloaded_file_path = "exceptiongroup-1.2.1-py3-none-any.whl", ) maybe( @@ -525,22 +577,22 @@ def repositories(): maybe( http_file, - name = "pdm_lock_wheel_matplotlib_inline_0.1.6_py3_none_any", + name = "pdm_lock_wheel_matplotlib_inline_0.1.7_py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/f2/51/c34d7a1d528efaae3d8ddb18ef45a41f284eacf9e514523b191b7d0872cc/matplotlib_inline-0.1.6-py3-none-any.whl", + "https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl", ], - sha256 = "f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311", - downloaded_file_path = "matplotlib_inline-0.1.6-py3-none-any.whl", + sha256 = "df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca", + downloaded_file_path = "matplotlib_inline-0.1.7-py3-none-any.whl", ) maybe( http_file, - name = "pdm_lock_wheel_parso_0.8.3_py2.py3_none_any", + name = "pdm_lock_wheel_parso_0.8.4_py2.py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/05/63/8011bd08a4111858f79d2b09aad86638490d62fbf881c44e434a6dfca87b/parso-0.8.3-py2.py3-none-any.whl", + "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", ], - sha256 = "c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75", - downloaded_file_path = "parso-0.8.3-py2.py3-none-any.whl", + sha256 = "a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", + downloaded_file_path = "parso-0.8.4-py2.py3-none-any.whl", ) maybe( @@ -555,12 +607,12 @@ def repositories(): maybe( http_file, - name = "pdm_lock_wheel_prompt_toolkit_3.0.43_py3_none_any", + name = "pdm_lock_wheel_prompt_toolkit_3.0.47_py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/ee/fd/ca7bf3869e7caa7a037e23078539467b433a4e01eebd93f77180ab927766/prompt_toolkit-3.0.43-py3-none-any.whl", + "https://files.pythonhosted.org/packages/e8/23/22750c4b768f09386d1c3cc4337953e8936f48a888fa6dddfb669b2c9088/prompt_toolkit-3.0.47-py3-none-any.whl", ], - sha256 = "a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6", - downloaded_file_path = "prompt_toolkit-3.0.43-py3-none-any.whl", + sha256 = "0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10", + downloaded_file_path = "prompt_toolkit-3.0.47-py3-none-any.whl", ) maybe( @@ -585,12 +637,12 @@ def repositories(): maybe( http_file, - name = "pdm_lock_wheel_pygments_2.17.2_py3_none_any", + name = "pdm_lock_wheel_pygments_2.18.0_py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl", + "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", ], - sha256 = "b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c", - downloaded_file_path = "pygments-2.17.2-py3-none-any.whl", + sha256 = "b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", + downloaded_file_path = "pygments-2.18.0-py3-none-any.whl", ) maybe( @@ -715,12 +767,12 @@ def repositories(): maybe( http_file, - name = "pdm_lock_wheel_traitlets_5.14.1_py3_none_any", + name = "pdm_lock_wheel_traitlets_5.14.3_py3_none_any", urls = [ - "https://files.pythonhosted.org/packages/45/34/5dc77fdc7bb4bd198317eea5679edf9cc0a186438b5b19dbb9062fb0f4d5/traitlets-5.14.1-py3-none-any.whl", + "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", ], - sha256 = "2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74", - downloaded_file_path = "traitlets-5.14.1-py3-none-any.whl", + sha256 = "b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f", + downloaded_file_path = "traitlets-5.14.3-py3-none-any.whl", ) maybe( @@ -743,6 +795,56 @@ def repositories(): downloaded_file_path = "wheel-0.41.3-py3-none-any.whl", ) + maybe( + http_file, + name = "pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_macosx_11_0_arm64", + urls = [ + "https://files.pythonhosted.org/packages/01/45/9ff2b9281597da5fcf84995ca18cde71abf248c98bfc7c6bdee60af87dbb/zope.interface-5.5.2-cp310-cp310-macosx_11_0_arm64.whl", + ], + sha256 = "5334e2ef60d3d9439c08baedaf8b84dc9bb9522d0dacbc10572ef5609ef8db6d", + downloaded_file_path = "zope.interface-5.5.2-cp310-cp310-macosx_11_0_arm64.whl", + ) + + maybe( + http_file, + name = "pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_manylinux_2_17_aarch64.manylinux2014_aarch64", + urls = [ + "https://files.pythonhosted.org/packages/ed/c9/265a39c9933aef7cea402c25fb80f6455407d74ed761816496166f55d05a/zope.interface-5.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", + ], + sha256 = "dc26c8d44472e035d59d6f1177eb712888447f5799743da9c398b0339ed90b1b", + downloaded_file_path = "zope.interface-5.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", + ) + + maybe( + http_file, + name = "pdm_lock_wheel_zope.interface_5.5.2_cp310_cp310_manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64", + urls = [ + "https://files.pythonhosted.org/packages/48/fa/25d98f89f07e4524e465d4d5ca4164a443628eae0548f1ec085ea0ed2889/zope.interface-5.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", + ], + sha256 = "f98d4bd7bbb15ca701d19b93263cc5edfd480c3475d163f137385f49e5b3a3a7", + downloaded_file_path = "zope.interface-5.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", + ) + + maybe( + http_file, + name = "pdm_lock_wheel_zope.interface_5.5.2_cp311_cp311_macosx_11_0_arm64", + urls = [ + "https://files.pythonhosted.org/packages/1a/ba/ca524f2f7184346e93bae317580c4906bc2e81bdac6e3b68b64c632a7df0/zope.interface-5.5.2-cp311-cp311-macosx_11_0_arm64.whl", + ], + sha256 = "765d703096ca47aa5d93044bf701b00bbce4d903a95b41fff7c3796e747b1f1d", + downloaded_file_path = "zope.interface-5.5.2-cp311-cp311-macosx_11_0_arm64.whl", + ) + + maybe( + http_file, + name = "pdm_lock_wheel_zope.interface_5.5.2_cp311_cp311_manylinux_2_17_aarch64.manylinux2014_aarch64", + urls = [ + "https://files.pythonhosted.org/packages/fb/a7/4e2a58146d909115e102ce4038e3e8672f566174c55d8fa75325151b11fb/zope.interface-5.5.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", + ], + sha256 = "e945de62917acbf853ab968d8916290548df18dd62c739d862f359ecd25842a6", + downloaded_file_path = "zope.interface-5.5.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", + ) + maybe( http_file, name = "pdm_lock_wheel_zstandard_0.22.0_cp310_cp310_macosx_11_0_arm64", diff --git a/e2e/bzlmod/pdm.lock b/e2e/bzlmod/pdm.lock index 063e364..306f335 100644 --- a/e2e/bzlmod/pdm.lock +++ b/e2e/bzlmod/pdm.lock @@ -4,8 +4,8 @@ [metadata] groups = ["default"] strategy = ["cross_platform", "static_urls"] -lock_version = "4.4" -content_hash = "sha256:db7c9b59709d3a10ba22c02dab7553ef05d7db04c7d60d04bcade65131516597" +lock_version = "4.4.1" +content_hash = "sha256:63b2fd07de89a5ba60b753e26b9a1d3a4b797da81dd88e36cd7742538a178d1d" [[package]] name = "appnope" @@ -115,12 +115,12 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" requires_python = ">=3.7" summary = "Backport of PEP 654 (exception groups)" files = [ - {url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, - {url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {url = "https://files.pythonhosted.org/packages/01/90/79fe92dd413a9cab314ef5c591b5aa9b9ba787ae4cadab75055b0ae00b33/exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {url = "https://files.pythonhosted.org/packages/a0/65/d66b7fbaef021b3c954b3bbb196d21d8a4b97918ea524f82cfae474215af/exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [[package]] @@ -172,25 +172,25 @@ files = [ [[package]] name = "matplotlib-inline" -version = "0.1.6" -requires_python = ">=3.5" +version = "0.1.7" +requires_python = ">=3.8" summary = "Inline Matplotlib backend for Jupyter" dependencies = [ "traitlets", ] files = [ - {url = "https://files.pythonhosted.org/packages/d9/50/3af8c0362f26108e54d58c7f38784a3bdae6b9a450bab48ee8482d737f44/matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, - {url = "https://files.pythonhosted.org/packages/f2/51/c34d7a1d528efaae3d8ddb18ef45a41f284eacf9e514523b191b7d0872cc/matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, + {url = "https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca"}, + {url = "https://files.pythonhosted.org/packages/99/5b/a36a337438a14116b16480db471ad061c36c3694df7c2084a0da7ba538b7/matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90"}, ] [[package]] name = "parso" -version = "0.8.3" +version = "0.8.4" requires_python = ">=3.6" summary = "A Python Parser" files = [ - {url = "https://files.pythonhosted.org/packages/05/63/8011bd08a4111858f79d2b09aad86638490d62fbf881c44e434a6dfca87b/parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"}, - {url = "https://files.pythonhosted.org/packages/a2/0e/41f0cca4b85a6ea74d66d2226a7cda8e41206a624f5b330b958ef48e2e52/parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"}, + {url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, + {url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, ] [[package]] @@ -207,15 +207,15 @@ files = [ [[package]] name = "prompt-toolkit" -version = "3.0.43" +version = "3.0.47" requires_python = ">=3.7.0" summary = "Library for building powerful interactive command lines in Python" dependencies = [ "wcwidth", ] files = [ - {url = "https://files.pythonhosted.org/packages/cc/c6/25b6a3d5cd295304de1e32c9edbcf319a52e965b339629d37d42bb7126ca/prompt_toolkit-3.0.43.tar.gz", hash = "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d"}, - {url = "https://files.pythonhosted.org/packages/ee/fd/ca7bf3869e7caa7a037e23078539467b433a4e01eebd93f77180ab927766/prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"}, + {url = "https://files.pythonhosted.org/packages/47/6d/0279b119dafc74c1220420028d490c4399b790fc1256998666e3a341879f/prompt_toolkit-3.0.47.tar.gz", hash = "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360"}, + {url = "https://files.pythonhosted.org/packages/e8/23/22750c4b768f09386d1c3cc4337953e8936f48a888fa6dddfb669b2c9088/prompt_toolkit-3.0.47-py3-none-any.whl", hash = "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10"}, ] [[package]] @@ -238,22 +238,22 @@ files = [ [[package]] name = "pycparser" -version = "2.21" -requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.22" +requires_python = ">=3.8" summary = "C parser in Python" files = [ - {url = "https://files.pythonhosted.org/packages/5e/0b/95d387f5f4433cb0f53ff7ad859bd2c6051051cebbb564f139a999ab46de/pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, - {url = "https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {url = "https://files.pythonhosted.org/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {url = "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] [[package]] name = "pygments" -version = "2.17.2" -requires_python = ">=3.7" +version = "2.18.0" +requires_python = ">=3.8" summary = "Pygments is a syntax highlighting package written in Python." files = [ - {url = "https://files.pythonhosted.org/packages/55/59/8bccf4157baf25e4aa5a0bb7fa3ba8600907de105ebc22b0c78cfbf6f565/pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, - {url = "https://files.pythonhosted.org/packages/97/9c/372fef8377a6e340b1704768d20daaded98bf13282b5327beb2e2fe2c7ef/pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, + {url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, + {url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, ] [[package]] @@ -359,22 +359,22 @@ files = [ [[package]] name = "traitlets" -version = "5.14.1" +version = "5.14.3" requires_python = ">=3.8" summary = "Traitlets Python configuration system" files = [ - {url = "https://files.pythonhosted.org/packages/45/34/5dc77fdc7bb4bd198317eea5679edf9cc0a186438b5b19dbb9062fb0f4d5/traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"}, - {url = "https://files.pythonhosted.org/packages/f1/b9/19206da568095bbf2e57f9f7f7cb6b3b2af2af2670f8c83c23a53d6c00cd/traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"}, + {url = "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f"}, + {url = "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7"}, ] [[package]] name = "typing-extensions" -version = "4.9.0" +version = "4.12.2" requires_python = ">=3.8" summary = "Backported and Experimental Type Hints for Python 3.8+" files = [ - {url = "https://files.pythonhosted.org/packages/0c/1d/eb26f5e75100d531d7399ae800814b069bc2ed2a7410834d57374d010d96/typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, - {url = "https://files.pythonhosted.org/packages/b7/f4/6a90020cd2d93349b442bfcb657d0dc91eee65491600b2cb1d388bc98e6b/typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] @@ -396,6 +396,34 @@ files = [ {url = "https://files.pythonhosted.org/packages/fb/d0/0b4c18a0b85c20233b0c3bc33f792aefd7f12a5832b4da77419949ff6fd9/wheel-0.41.3.tar.gz", hash = "sha256:4d4987ce51a49370ea65c0bfd2234e8ce80a12780820d9dc462597a6e60d0841"}, ] +[[package]] +name = "zope-interface" +version = "5.5.2" +requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +summary = "Interfaces for Python" +dependencies = [ + "setuptools", +] +files = [ + {url = "https://files.pythonhosted.org/packages/01/3a/8e57724eeb9b75d366f0c11b24080c69e12f0b3bfe4dc771336f21271c99/zope.interface-5.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d514c269d1f9f5cd05ddfed15298d6c418129f3f064765295659798349c43e6f"}, + {url = "https://files.pythonhosted.org/packages/01/45/9ff2b9281597da5fcf84995ca18cde71abf248c98bfc7c6bdee60af87dbb/zope.interface-5.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5334e2ef60d3d9439c08baedaf8b84dc9bb9522d0dacbc10572ef5609ef8db6d"}, + {url = "https://files.pythonhosted.org/packages/05/2a/c863bd1e146b66795067677d7ba51290824c19e53f2c99bd0da36d545c43/zope.interface-5.5.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4087e253bd3bbbc3e615ecd0b6dd03c4e6a1e46d152d3be6d2ad08fbad742dcc"}, + {url = "https://files.pythonhosted.org/packages/06/cf/57513c4915d6288854694f2323d2d15d3fd39e7c7b5c744ebe81b62fcb77/zope.interface-5.5.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8a2ffadefd0e7206adc86e492ccc60395f7edb5680adedf17a7ee4205c530df4"}, + {url = "https://files.pythonhosted.org/packages/0f/9f/9e08ab4398974406a431be5a9ae4f83603d6d4e208ba276840f6192ec132/zope.interface-5.5.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7579960be23d1fddecb53898035a0d112ac858c3554018ce615cefc03024e46d"}, + {url = "https://files.pythonhosted.org/packages/12/78/83d8b9893d1a3933d772b2b2a542146f5d1465fc770c7618efb4bc1e265e/zope.interface-5.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fb68d212efd057596dee9e6582daded9f8ef776538afdf5feceb3059df2d2e7b"}, + {url = "https://files.pythonhosted.org/packages/1a/ba/ca524f2f7184346e93bae317580c4906bc2e81bdac6e3b68b64c632a7df0/zope.interface-5.5.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:765d703096ca47aa5d93044bf701b00bbce4d903a95b41fff7c3796e747b1f1d"}, + {url = "https://files.pythonhosted.org/packages/2f/2d/fa6e7f296f9580feff6c2003e70601f111318e032f37f7266bc0a56abc48/zope.interface-5.5.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:17ebf6e0b1d07ed009738016abf0d0a0f80388e009d0ac6e0ead26fc162b3b9c"}, + {url = "https://files.pythonhosted.org/packages/38/6f/fbfb7dde38be7e5644bb342c4c7cdc444cd5e2ffbd70d091263b3858a8cb/zope.interface-5.5.2.tar.gz", hash = "sha256:bfee1f3ff62143819499e348f5b8a7f3aa0259f9aca5e0ddae7391d059dce671"}, + {url = "https://files.pythonhosted.org/packages/48/fa/25d98f89f07e4524e465d4d5ca4164a443628eae0548f1ec085ea0ed2889/zope.interface-5.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f98d4bd7bbb15ca701d19b93263cc5edfd480c3475d163f137385f49e5b3a3a7"}, + {url = "https://files.pythonhosted.org/packages/5a/0d/37e87563031b0f35e8002428f7fd27275660c64ff4ebceca0fca8996afc9/zope.interface-5.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:7e66f60b0067a10dd289b29dceabd3d0e6d68be1504fc9d0bc209cf07f56d189"}, + {url = "https://files.pythonhosted.org/packages/9b/c9/5bf7b7f4c26f1b92bd836a5a764337689d06dfdd8852204e6b396029369d/zope.interface-5.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d692374b578360d36568dd05efb8a5a67ab6d1878c29c582e37ddba80e66c396"}, + {url = "https://files.pythonhosted.org/packages/b4/d5/1af2b1af567f428a09864c965778f00d8a550a86eabf6b1cd3b22e31a251/zope.interface-5.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:655796a906fa3ca67273011c9805c1e1baa047781fca80feeb710328cdbed87f"}, + {url = "https://files.pythonhosted.org/packages/ed/c9/265a39c9933aef7cea402c25fb80f6455407d74ed761816496166f55d05a/zope.interface-5.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc26c8d44472e035d59d6f1177eb712888447f5799743da9c398b0339ed90b1b"}, + {url = "https://files.pythonhosted.org/packages/f5/06/e5db832d195b33853227dfb8e89ccbc707afed7a097f4b1829387a953ad2/zope.interface-5.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:696f3d5493eae7359887da55c2afa05acc3db5fc625c49529e84bd9992313296"}, + {url = "https://files.pythonhosted.org/packages/fb/a7/4e2a58146d909115e102ce4038e3e8672f566174c55d8fa75325151b11fb/zope.interface-5.5.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e945de62917acbf853ab968d8916290548df18dd62c739d862f359ecd25842a6"}, + {url = "https://files.pythonhosted.org/packages/ff/a1/788d02d891a5abdf842eec244b432891f56f5c23cb30504c35f70b588b85/zope.interface-5.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:40f4065745e2c2fa0dff0e7ccd7c166a8ac9748974f960cd39f63d2c19f9231f"}, +] + [[package]] name = "zstandard" version = "0.22.0" diff --git a/e2e/bzlmod/pyproject.toml b/e2e/bzlmod/pyproject.toml index c390817..566d9c9 100644 --- a/e2e/bzlmod/pyproject.toml +++ b/e2e/bzlmod/pyproject.toml @@ -12,6 +12,7 @@ dependencies = [ "setuptools==68.2.2", "wheel==0.41.3", "zstandard==0.22.0", + "zope-interface==5.5.2" # Test that packages with default build deps don't throw MismatchedVersionException ] requires-python = ">=3.9, <3.13" license = {text = "MIT"} diff --git a/e2e/bzlmod/uv.lock b/e2e/bzlmod/uv.lock index 7c7dc1c..94182f8 100644 --- a/e2e/bzlmod/uv.lock +++ b/e2e/bzlmod/uv.lock @@ -349,6 +349,7 @@ dependencies = [ { name = "regex" }, { name = "setuptools" }, { name = "wheel" }, + { name = "zope-interface" }, { name = "zstandard" }, ] @@ -420,6 +421,52 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fa/7f/4c07234086edbce4a0a446209dc0cb08a19bb206a3ea53b2f56a403f983b/wheel-0.41.3-py3-none-any.whl", hash = "sha256:488609bc63a29322326e05560731bf7bfea8e48ad646e1f5e40d366607de0942", size = 65801 }, ] +[[distribution]] +name = "zope-interface" +version = "5.5.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/6f/fbfb7dde38be7e5644bb342c4c7cdc444cd5e2ffbd70d091263b3858a8cb/zope.interface-5.5.2.tar.gz", hash = "sha256:bfee1f3ff62143819499e348f5b8a7f3aa0259f9aca5e0ddae7391d059dce671", size = 300533 } +dependencies = [ + { name = "setuptools" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/61/e873d7006cd71df28319b2a2826fe1863b761d112598344920e383c58dcb/zope.interface-5.5.2-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:a2ad597c8c9e038a5912ac3cf166f82926feff2f6e0dabdab956768de0a258f5", size = 209579 }, + { url = "https://files.pythonhosted.org/packages/05/0b/ff478275c63e1b910c0605b0fdbb004cdf6730d17169fffb2ebe6a10fc44/zope.interface-5.5.2-cp27-cp27m-win_amd64.whl", hash = "sha256:65c3c06afee96c654e590e046c4a24559e65b0a87dbff256cd4bd6f77e1a33f9", size = 209851 }, + { url = "https://files.pythonhosted.org/packages/01/3a/8e57724eeb9b75d366f0c11b24080c69e12f0b3bfe4dc771336f21271c99/zope.interface-5.5.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d514c269d1f9f5cd05ddfed15298d6c418129f3f064765295659798349c43e6f", size = 209969 }, + { url = "https://files.pythonhosted.org/packages/01/45/9ff2b9281597da5fcf84995ca18cde71abf248c98bfc7c6bdee60af87dbb/zope.interface-5.5.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5334e2ef60d3d9439c08baedaf8b84dc9bb9522d0dacbc10572ef5609ef8db6d", size = 210221 }, + { url = "https://files.pythonhosted.org/packages/ed/c9/265a39c9933aef7cea402c25fb80f6455407d74ed761816496166f55d05a/zope.interface-5.5.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc26c8d44472e035d59d6f1177eb712888447f5799743da9c398b0339ed90b1b", size = 255094 }, + { url = "https://files.pythonhosted.org/packages/2f/2d/fa6e7f296f9580feff6c2003e70601f111318e032f37f7266bc0a56abc48/zope.interface-5.5.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:17ebf6e0b1d07ed009738016abf0d0a0f80388e009d0ac6e0ead26fc162b3b9c", size = 253867 }, + { url = "https://files.pythonhosted.org/packages/48/fa/25d98f89f07e4524e465d4d5ca4164a443628eae0548f1ec085ea0ed2889/zope.interface-5.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f98d4bd7bbb15ca701d19b93263cc5edfd480c3475d163f137385f49e5b3a3a7", size = 258877 }, + { url = "https://files.pythonhosted.org/packages/f5/06/e5db832d195b33853227dfb8e89ccbc707afed7a097f4b1829387a953ad2/zope.interface-5.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:696f3d5493eae7359887da55c2afa05acc3db5fc625c49529e84bd9992313296", size = 211712 }, + { url = "https://files.pythonhosted.org/packages/0f/9f/9e08ab4398974406a431be5a9ae4f83603d6d4e208ba276840f6192ec132/zope.interface-5.5.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7579960be23d1fddecb53898035a0d112ac858c3554018ce615cefc03024e46d", size = 210016 }, + { url = "https://files.pythonhosted.org/packages/1a/ba/ca524f2f7184346e93bae317580c4906bc2e81bdac6e3b68b64c632a7df0/zope.interface-5.5.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:765d703096ca47aa5d93044bf701b00bbce4d903a95b41fff7c3796e747b1f1d", size = 210220 }, + { url = "https://files.pythonhosted.org/packages/fb/a7/4e2a58146d909115e102ce4038e3e8672f566174c55d8fa75325151b11fb/zope.interface-5.5.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e945de62917acbf853ab968d8916290548df18dd62c739d862f359ecd25842a6", size = 257125 }, + { url = "https://files.pythonhosted.org/packages/b4/d5/1af2b1af567f428a09864c965778f00d8a550a86eabf6b1cd3b22e31a251/zope.interface-5.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:655796a906fa3ca67273011c9805c1e1baa047781fca80feeb710328cdbed87f", size = 211710 }, + { url = "https://files.pythonhosted.org/packages/51/af/60b486a1b09497343c08924cf43577f759532e0d8d85ff578c32233b10e5/zope.interface-5.5.2-cp35-cp35m-win_amd64.whl", hash = "sha256:0fb497c6b088818e3395e302e426850f8236d8d9f4ef5b2836feae812a8f699c", size = 211860 }, + { url = "https://files.pythonhosted.org/packages/2e/d3/3be31d3433e4df8901857e1a62e87cc69d17f91116fbc45e2b3662ca8c27/zope.interface-5.5.2-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:008b0b65c05993bb08912f644d140530e775cf1c62a072bf9340c2249e613c32", size = 209750 }, + { url = "https://files.pythonhosted.org/packages/2b/26/2dd8687863272cab8c34908b18c98c32f8cb6d3da6e23896622c1a8a4a2e/zope.interface-5.5.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:404d1e284eda9e233c90128697c71acffd55e183d70628aa0bbb0e7a3084ed8b", size = 248992 }, + { url = "https://files.pythonhosted.org/packages/f5/34/68ae976ee0f0accfc8845107210dcc4c7636f71998e056757c41ac5e5f55/zope.interface-5.5.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:3218ab1a7748327e08ef83cca63eea7cf20ea7e2ebcb2522072896e5e2fceedf", size = 247940 }, + { url = "https://files.pythonhosted.org/packages/d0/75/c80af74b361cedd35bdfb45ade9c22320d3431722186ff8ab1614df80059/zope.interface-5.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d169ccd0756c15bbb2f1acc012f5aab279dffc334d733ca0d9362c5beaebe88e", size = 253261 }, + { url = "https://files.pythonhosted.org/packages/b1/71/5fe40e244f8dae4f06608778a92027cf154a9a4242aca088326da508103e/zope.interface-5.5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:e1574980b48c8c74f83578d1e77e701f8439a5d93f36a5a0af31337467c08fcf", size = 211873 }, + { url = "https://files.pythonhosted.org/packages/d2/0a/87528a07ce42929cb655398b2df292d2bc7183447b89967cff54b3db89a1/zope.interface-5.5.2-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:0217a9615531c83aeedb12e126611b1b1a3175013bbafe57c702ce40000eb9a0", size = 209966 }, + { url = "https://files.pythonhosted.org/packages/c9/85/fd79a02eb965734bc4f5fd03b99b23bf34b42bc5b3665a42abbc0256248a/zope.interface-5.5.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:311196634bb9333aa06f00fc94f59d3a9fddd2305c2c425d86e406ddc6f2260d", size = 248969 }, + { url = "https://files.pythonhosted.org/packages/f4/3d/81815c8ad716c8a87dc4913472a1fe6fd51e185cb3812f556686049a3497/zope.interface-5.5.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6373d7eb813a143cb7795d3e42bd8ed857c82a90571567e681e1b3841a390d16", size = 248769 }, + { url = "https://files.pythonhosted.org/packages/5e/2e/1b0e9120ada342584ab82a4889a0c5dd21bd8846c356c2d5ccd2eb46db0f/zope.interface-5.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:959697ef2757406bff71467a09d940ca364e724c534efbf3786e86eee8591452", size = 254166 }, + { url = "https://files.pythonhosted.org/packages/31/01/297bd775394c46e051d3201c6600adfaf72c346d6201062bb61227615d64/zope.interface-5.5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:dbaeb9cf0ea0b3bc4b36fae54a016933d64c6d52a94810a63c00f440ecb37dd7", size = 211609 }, + { url = "https://files.pythonhosted.org/packages/a8/cc/c5ad39d8a2207c360d5b68708788984651f8e975e3bebfe8ddd38592d02f/zope.interface-5.5.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604cdba8f1983d0ab78edc29aa71c8df0ada06fb147cea436dc37093a0100a4e", size = 209968 }, + { url = "https://files.pythonhosted.org/packages/9c/8f/cbe5432a50a4cf0492574c1e9328c39f034d36fc86e4d3040443c3287e1c/zope.interface-5.5.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e74a578172525c20d7223eac5f8ad187f10940dac06e40113d62f14f3adb1e8f", size = 210214 }, + { url = "https://files.pythonhosted.org/packages/8a/76/a58e11281d2a014fd9b42e7b5fc71e083f686cc9a55d0300af8b3819b5c2/zope.interface-5.5.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0980d44b8aded808bec5059018d64692f0127f10510eca71f2f0ace8fb11188", size = 257156 }, + { url = "https://files.pythonhosted.org/packages/c1/d6/b1bec1e7f059f87905d78882821800340d74d58e190e38390f808a6ecd3e/zope.interface-5.5.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6e972493cdfe4ad0411fd9abfab7d4d800a7317a93928217f1a5de2bb0f0d87a", size = 256160 }, + { url = "https://files.pythonhosted.org/packages/bf/0e/fc2272397b7fd6a907c9c8c8ed310749db0b451ce5ca5cf90de1ac01c166/zope.interface-5.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9d783213fab61832dbb10d385a319cb0e45451088abd45f95b5bb88ed0acca1a", size = 261362 }, + { url = "https://files.pythonhosted.org/packages/84/5d/88c886d8d6f738d7b291ac3e4162be94c960e7b0fb74ba2886685eff4762/zope.interface-5.5.2-cp38-cp38-win_amd64.whl", hash = "sha256:a16025df73d24795a0bde05504911d306307c24a64187752685ff6ea23897cb0", size = 211764 }, + { url = "https://files.pythonhosted.org/packages/ff/a1/788d02d891a5abdf842eec244b432891f56f5c23cb30504c35f70b588b85/zope.interface-5.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:40f4065745e2c2fa0dff0e7ccd7c166a8ac9748974f960cd39f63d2c19f9231f", size = 209971 }, + { url = "https://files.pythonhosted.org/packages/06/cf/57513c4915d6288854694f2323d2d15d3fd39e7c7b5c744ebe81b62fcb77/zope.interface-5.5.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8a2ffadefd0e7206adc86e492ccc60395f7edb5680adedf17a7ee4205c530df4", size = 210212 }, + { url = "https://files.pythonhosted.org/packages/9b/c9/5bf7b7f4c26f1b92bd836a5a764337689d06dfdd8852204e6b396029369d/zope.interface-5.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d692374b578360d36568dd05efb8a5a67ab6d1878c29c582e37ddba80e66c396", size = 254149 }, + { url = "https://files.pythonhosted.org/packages/05/2a/c863bd1e146b66795067677d7ba51290824c19e53f2c99bd0da36d545c43/zope.interface-5.5.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4087e253bd3bbbc3e615ecd0b6dd03c4e6a1e46d152d3be6d2ad08fbad742dcc", size = 252769 }, + { url = "https://files.pythonhosted.org/packages/12/78/83d8b9893d1a3933d772b2b2a542146f5d1465fc770c7618efb4bc1e265e/zope.interface-5.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fb68d212efd057596dee9e6582daded9f8ef776538afdf5feceb3059df2d2e7b", size = 257948 }, + { url = "https://files.pythonhosted.org/packages/5a/0d/37e87563031b0f35e8002428f7fd27275660c64ff4ebceca0fca8996afc9/zope.interface-5.5.2-cp39-cp39-win_amd64.whl", hash = "sha256:7e66f60b0067a10dd289b29dceabd3d0e6d68be1504fc9d0bc209cf07f56d189", size = 211766 }, +] + [[distribution]] name = "zstandard" version = "0.22.0" diff --git a/pycross/private/bzlmod/lock_import.bzl b/pycross/private/bzlmod/lock_import.bzl index fdff73d..86af95f 100644 --- a/pycross/private/bzlmod/lock_import.bzl +++ b/pycross/private/bzlmod/lock_import.bzl @@ -16,6 +16,7 @@ def _generate_resolved_lock_repo(lock_info, serialized_lock_model): "lock_model": serialized_lock_model, "target_environments": lock_info.environments, "default_alias_single_version": lock_info.default_alias_single_version, + "default_build_dependencies": lock_info.default_build_dependencies, "disallow_builds": lock_info.disallow_builds, "local_wheels": lock_info.local_wheels, "annotations": {}, @@ -90,6 +91,7 @@ def _lock_struct(mctx, tag): environments = environment_files, local_wheels = tag.local_wheels, disallow_builds = tag.disallow_builds, + default_build_dependencies = tag.default_build_dependencies, packages = {}, ) diff --git a/pycross/private/bzlmod/tag_attrs.bzl b/pycross/private/bzlmod/tag_attrs.bzl index fdfa7ba..f7de8c8 100644 --- a/pycross/private/bzlmod/tag_attrs.bzl +++ b/pycross/private/bzlmod/tag_attrs.bzl @@ -36,6 +36,9 @@ COMMON_IMPORT_ATTRS = dict( disallow_builds = attr.bool( doc = "If True, only pre-built wheels are allowed.", ), + default_build_dependencies = attr.string_list( + doc = "A list of package keys (name or name@version) that will be used as default build dependencies.", + ), ) # Attrs for the package tag diff --git a/pycross/private/lock_attrs.bzl b/pycross/private/lock_attrs.bzl index b8d2b95..89f85b5 100644 --- a/pycross/private/lock_attrs.bzl +++ b/pycross/private/lock_attrs.bzl @@ -74,6 +74,9 @@ RESOLVE_ATTRS = dict( always_include_sdist = attr.bool( doc = "Always include an entry for a package's sdist if one exists.", ), + default_build_dependencies = attr.string_list( + doc = "A list of package keys (name or name@version) that will be used as default build dependencies.", + ), ) CREATE_REPOS_ATTRS = dict( @@ -172,6 +175,11 @@ def handle_resolve_attrs(attrs, environment_files_and_labels, local_wheel_names_ for wheel_name, wheel_label in local_wheel_names_and_labels: args.extend(["--local-wheel", wheel_name, wheel_label]) + # for dep in attrs.default_build_dependencies: + if attrs.default_build_dependencies: + args.append("--default-build-dependencies") + args.extend(attrs.default_build_dependencies) + return args def handle_render_attrs(attrs): diff --git a/pycross/private/tools/raw_lock_resolver.py b/pycross/private/tools/raw_lock_resolver.py index 5ba5148..3f7faa3 100644 --- a/pycross/private/tools/raw_lock_resolver.py +++ b/pycross/private/tools/raw_lock_resolver.py @@ -203,6 +203,7 @@ def __init__( package: RawPackage, context: GenerationContext, annotations: Optional[PackageAnnotations], + default_build_dependencies: List[PackageKey], ): annotations = annotations or PackageAnnotations() # Default to an empty set @@ -210,7 +211,11 @@ def __init__( self.package_name = package.name self.uses_sdist = False - self._build_deps = annotations.build_dependencies + build_dependencies = annotations.build_dependencies or default_build_dependencies + + # Filter out any dependencies that are already in the package's dependencies + self._build_deps = [dep for dep in build_dependencies if dep not in (p.key for p in package.dependencies)] + self._build_target = annotations.build_target self._install_exclude_globs = annotations.install_exclude_globs @@ -349,6 +354,24 @@ def collect_package_annotations(args: Any, lock_model: RawLockSet) -> Dict[Packa return dict(annotations) +def collect_default_build_dependencies(lock_model: RawLockSet, build_dependencies: list[str]) -> list[PackageKey]: + all_package_keys_by_canonical_name: Dict[NormalizedName, List[PackageKey]] = defaultdict(list) + resolved_build_penpendencies = [] + for package in lock_model.packages.values(): + all_package_keys_by_canonical_name[package.name].append(package.key) + + for dep in build_dependencies: + resolved_dep = resolve_single_version( + dep, + all_package_keys_by_canonical_name, + lock_model.packages.keys(), + "build_dependencies", + ) + resolved_build_penpendencies.append(resolved_dep) + + return resolved_build_penpendencies + + def resolve(args: Any) -> ResolvedLockSet: environment_pairs: List[LabelAndTargetEnv] = [] for target_environment in args.target_environment or []: @@ -389,6 +412,8 @@ def resolve(args: Any) -> ResolvedLockSet: # Collect package "annotations" annotations = collect_package_annotations(args, lock_model) + default_build_dependencies = collect_default_build_dependencies(lock_model, args.default_build_dependencies) + # Walk the dependency graph starting from the set if pinned packages (in pyproject.toml), computing the # transitive closure. work = list(lock_model.pins.values()) @@ -404,6 +429,7 @@ def resolve(args: Any) -> ResolvedLockSet: package, context, annotations.pop(next_package_key, None), + default_build_dependencies, ) packages_by_package_key[next_package_key] = entry work.extend(entry.all_dependency_keys) @@ -417,7 +443,6 @@ def resolve(args: Any) -> ResolvedLockSet: ) resolved_packages = sorted(packages_by_package_key.values(), key=lambda x: x.key) - # If builds are disallowed, ensure that none of the targets include an sdist build if args.disallow_builds: builds = [] @@ -518,6 +543,12 @@ def add_shared_flags(parser: ArgumentParser) -> None: type=Path, help="The path to the annotations JSON file.", ) + parser.add_argument( + "--default-build-dependencies", + nargs="*", + default=[], + help="A list of default build dependencies to include in all packages.", + ) def parse_flags() -> Any: