[Bot] Update dependencies (#2845)

* Update dependencies

* fix: revert pip upgrade on graalpy for now

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: older pip for graalpy on Windows

Assisted-by: OpenCode:glm-5.1
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

---------

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: cibuildwheel-bot[bot] <83877280+cibuildwheel-bot[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
cibuildwheel-bot[bot]
2026-05-12 21:59:10 -04:00
committed by GitHub
co-authored by Henry Schreiner pre-commit-ci[bot]
parent 3617733645
commit ec0977e5f6
17 changed files with 85 additions and 54 deletions
+2 -1
View File
@@ -32,7 +32,7 @@ from cibuildwheel.util.cmd import call, shell
from cibuildwheel.util.file import CIBW_CACHE_PATH, copy_test_sources, download, move_file from cibuildwheel.util.file import CIBW_CACHE_PATH, copy_test_sources, download, move_file
from cibuildwheel.util.helpers import prepare_command, unwrap from cibuildwheel.util.helpers import prepare_command, unwrap
from cibuildwheel.util.packaging import find_compatible_wheel, get_pip_version from cibuildwheel.util.packaging import find_compatible_wheel, get_pip_version
from cibuildwheel.venv import constraint_flags, find_uv, virtualenv from cibuildwheel.venv import constraint_flags, find_uv, target_marker_env, virtualenv
@functools.cache @functools.cache
@@ -246,6 +246,7 @@ def setup_python(
venv_path, venv_path,
dependency_constraint, dependency_constraint,
use_uv=use_uv, use_uv=use_uv,
marker_env=target_marker_env(implementation_id=implementation_id),
) )
venv_bin_path = venv_path / "bin" venv_bin_path = venv_path / "bin"
assert venv_bin_path.exists() assert venv_bin_path.exists()
+2 -1
View File
@@ -34,7 +34,7 @@ from cibuildwheel.util.file import (
) )
from cibuildwheel.util.helpers import prepare_command, unwrap from cibuildwheel.util.helpers import prepare_command, unwrap
from cibuildwheel.util.packaging import find_compatible_wheel, get_pip_version from cibuildwheel.util.packaging import find_compatible_wheel, get_pip_version
from cibuildwheel.venv import constraint_flags, find_uv, virtualenv from cibuildwheel.venv import constraint_flags, find_uv, target_marker_env, virtualenv
def get_nuget_args( def get_nuget_args(
@@ -284,6 +284,7 @@ def setup_python(
venv_path, venv_path,
dependency_constraint, dependency_constraint,
use_uv=use_uv, use_uv=use_uv,
marker_env=target_marker_env(implementation_id=implementation_id),
) )
# set up environment variables for run_with_env # set up environment variables for run_with_env
+14 -14
View File
@@ -158,12 +158,12 @@ python_configurations = [
{ identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" }, { identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" },
{ identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" }, { identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" },
{ identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" }, { identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.13/python-3.13.13-macos11.pkg" },
{ identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp314t-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314t-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp314t-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314t-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp314t-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-macos11.pkg" }, { identifier = "cp314t-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-macos11.pkg" },
{ identifier = "cp315-macosx_x86_64", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" }, { identifier = "cp315-macosx_x86_64", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" },
{ identifier = "cp315-macosx_arm64", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" }, { identifier = "cp315-macosx_arm64", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" },
{ identifier = "cp315-macosx_universal2", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" }, { identifier = "cp315-macosx_universal2", version = "3.15", url = "https://www.python.org/ftp/python/3.15.0/python-3.15.0b1-macos11.pkg" },
@@ -194,10 +194,10 @@ python_configurations = [
{ identifier = "cp312-win_amd64", version = "3.12.10" }, { identifier = "cp312-win_amd64", version = "3.12.10" },
{ identifier = "cp313-win32", version = "3.13.13" }, { identifier = "cp313-win32", version = "3.13.13" },
{ identifier = "cp313-win_amd64", version = "3.13.13" }, { identifier = "cp313-win_amd64", version = "3.13.13" },
{ identifier = "cp314-win32", version = "3.14.4" }, { identifier = "cp314-win32", version = "3.14.5" },
{ identifier = "cp314t-win32", version = "3.14.4" }, { identifier = "cp314t-win32", version = "3.14.5" },
{ identifier = "cp314-win_amd64", version = "3.14.4" }, { identifier = "cp314-win_amd64", version = "3.14.5" },
{ identifier = "cp314t-win_amd64", version = "3.14.4" }, { identifier = "cp314t-win_amd64", version = "3.14.5" },
{ identifier = "cp315-win32", version = "3.15.0-b1" }, { identifier = "cp315-win32", version = "3.15.0-b1" },
{ identifier = "cp315t-win32", version = "3.15.0-b1" }, { identifier = "cp315t-win32", version = "3.15.0-b1" },
{ identifier = "cp315-win_amd64", version = "3.15.0-b1" }, { identifier = "cp315-win_amd64", version = "3.15.0-b1" },
@@ -207,8 +207,8 @@ python_configurations = [
{ identifier = "cp311-win_arm64", version = "3.11.9" }, { identifier = "cp311-win_arm64", version = "3.11.9" },
{ identifier = "cp312-win_arm64", version = "3.12.10" }, { identifier = "cp312-win_arm64", version = "3.12.10" },
{ identifier = "cp313-win_arm64", version = "3.13.13" }, { identifier = "cp313-win_arm64", version = "3.13.13" },
{ identifier = "cp314-win_arm64", version = "3.14.4" }, { identifier = "cp314-win_arm64", version = "3.14.5" },
{ identifier = "cp314t-win_arm64", version = "3.14.4" }, { identifier = "cp314t-win_arm64", version = "3.14.5" },
{ identifier = "cp315-win_arm64", version = "3.15.0-b1" }, { identifier = "cp315-win_arm64", version = "3.15.0-b1" },
{ identifier = "cp315t-win_arm64", version = "3.15.0-b1" }, { identifier = "cp315t-win_arm64", version = "3.15.0-b1" },
{ identifier = "pp39-win_amd64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip" }, { identifier = "pp39-win_amd64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip" },
@@ -229,8 +229,8 @@ python_configurations = [
python_configurations = [ python_configurations = [
{ identifier = "cp313-android_arm64_v8a", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.13/python-3.13.13-aarch64-linux-android.tar.gz" }, { identifier = "cp313-android_arm64_v8a", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.13/python-3.13.13-aarch64-linux-android.tar.gz" },
{ identifier = "cp313-android_x86_64", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.13/python-3.13.13-x86_64-linux-android.tar.gz" }, { identifier = "cp313-android_x86_64", version = "3.13", url = "https://repo.maven.apache.org/maven2/com/chaquo/python/python/3.13.13/python-3.13.13-x86_64-linux-android.tar.gz" },
{ identifier = "cp314-android_arm64_v8a", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-aarch64-linux-android.tar.gz" }, { identifier = "cp314-android_arm64_v8a", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-aarch64-linux-android.tar.gz" },
{ identifier = "cp314-android_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.4/python-3.14.4-x86_64-linux-android.tar.gz" }, { identifier = "cp314-android_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.5/python-3.14.5-x86_64-linux-android.tar.gz" },
] ]
[ios] [ios]
@@ -23,7 +23,7 @@ filelock==3.29.0
# via # via
# python-discovery # python-discovery
# virtualenv # virtualenv
idna==3.13 idna==3.14
# via requests # via requests
leb128==1.0.9 leb128==1.0.9
# via auditwheel-emscripten # via auditwheel-emscripten
@@ -64,7 +64,7 @@ pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.3.0 python-discovery==1.3.0
# via virtualenv # via virtualenv
requests==2.33.1 requests==2.34.0
# via pyodide-build # via pyodide-build
rich==15.0.0 rich==15.0.0
# via # via
@@ -79,7 +79,7 @@ typing-extensions==4.15.0
# typing-inspection # typing-inspection
typing-inspection==0.4.2 typing-inspection==0.4.2
# via pydantic # via pydantic
urllib3==2.6.3 urllib3==2.7.0
# via requests # via requests
virtualenv==21.3.1 virtualenv==21.3.1
# via # via
@@ -23,7 +23,7 @@ filelock==3.29.0
# via # via
# python-discovery # python-discovery
# virtualenv # virtualenv
idna==3.13 idna==3.14
# via requests # via requests
leb128==1.0.9 leb128==1.0.9
# via auditwheel-emscripten # via auditwheel-emscripten
@@ -64,7 +64,7 @@ pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.3.0 python-discovery==1.3.0
# via virtualenv # via virtualenv
requests==2.33.1 requests==2.34.0
# via pyodide-build # via pyodide-build
rich==15.0.0 rich==15.0.0
# via # via
@@ -79,7 +79,7 @@ typing-extensions==4.15.0
# typing-inspection # typing-inspection
typing-inspection==0.4.2 typing-inspection==0.4.2
# via pydantic # via pydantic
urllib3==2.6.3 urllib3==2.7.0
# via requests # via requests
virtualenv==21.3.1 virtualenv==21.3.1
# via # via
@@ -23,7 +23,7 @@ filelock==3.29.0
# via # via
# python-discovery # python-discovery
# virtualenv # virtualenv
idna==3.13 idna==3.14
# via requests # via requests
leb128==1.0.9 leb128==1.0.9
# via auditwheel-emscripten # via auditwheel-emscripten
@@ -64,7 +64,7 @@ pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.3.0 python-discovery==1.3.0
# via virtualenv # via virtualenv
requests==2.33.1 requests==2.34.0
# via pyodide-build # via pyodide-build
rich==15.0.0 rich==15.0.0
# via # via
@@ -79,7 +79,7 @@ typing-extensions==4.15.0
# typing-inspection # typing-inspection
typing-inspection==0.4.2 typing-inspection==0.4.2
# via pydantic # via pydantic
urllib3==2.6.3 urllib3==2.7.0
# via requests # via requests
virtualenv==21.3.1 virtualenv==21.3.1
# via # via
@@ -20,7 +20,7 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -28,7 +28,7 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
tomli==2.4.1 tomli==2.4.1
# via build # via build
@@ -36,7 +36,7 @@ typing-extensions==4.15.0
# via # via
# delocate # delocate
# virtualenv # virtualenv
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
zipp==3.23.1 zipp==3.23.1
# via importlib-metadata # via importlib-metadata
@@ -18,7 +18,8 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +27,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -18,7 +18,8 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1; implementation_name != "graalpy" or platform_system != "Windows"
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +27,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -18,7 +18,7 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +26,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -18,7 +18,7 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +26,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -18,7 +18,7 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.1 pip==26.1.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +26,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.3.0 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
@@ -28,7 +28,7 @@ platformdirs==4.4.0
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
tomli==2.4.1 tomli==2.4.1
# via build # via build
@@ -36,7 +36,7 @@ typing-extensions==4.15.0
# via # via
# delocate # delocate
# virtualenv # virtualenv
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
zipp==3.23.1 zipp==3.23.1
# via importlib-metadata # via importlib-metadata
+3 -3
View File
@@ -18,7 +18,7 @@ packaging==26.2
# via # via
# build # build
# delocate # delocate
pip==26.0.1 pip==26.1.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
platformdirs==4.9.6 platformdirs==4.9.6
# via # via
@@ -26,9 +26,9 @@ platformdirs==4.9.6
# virtualenv # virtualenv
pyproject-hooks==1.2.0 pyproject-hooks==1.2.0
# via build # via build
python-discovery==1.2.2 python-discovery==1.3.0
# via virtualenv # via virtualenv
typing-extensions==4.15.0 typing-extensions==4.15.0
# via delocate # via delocate
virtualenv==21.2.1 virtualenv==21.3.1
# via -r cibuildwheel/resources/constraints.in # via -r cibuildwheel/resources/constraints.in
+1 -1
View File
@@ -1 +1 @@
default = { version = "21.2.1", url = "https://github.com/pypa/get-virtualenv/releases/download/21.2.1/virtualenv.pyz" } default = { version = "21.3.1", url = "https://github.com/pypa/get-virtualenv/releases/download/21.3.1/virtualenv.pyz" }
+30 -3
View File
@@ -6,9 +6,10 @@ import sys
import tomllib import tomllib
from collections.abc import Sequence from collections.abc import Sequence
from pathlib import Path from pathlib import Path
from typing import Final from typing import Final, cast
from filelock import FileLock from filelock import FileLock
from packaging.markers import default_environment
from packaging.requirements import InvalidRequirement, Requirement from packaging.requirements import InvalidRequirement, Requirement
from packaging.version import Version from packaging.version import Version
@@ -19,6 +20,24 @@ from cibuildwheel.util.file import CIBW_CACHE_PATH, download
_IS_WIN: Final[bool] = sys.platform.startswith("win") _IS_WIN: Final[bool] = sys.platform.startswith("win")
def target_marker_env(
*,
implementation_id: str,
) -> dict[str, str]:
"""
Build a PEP 508 marker environment dict for the target Python,
overriding the host's values with the target implementation info.
"""
env = cast("dict[str, str]", default_environment())
if implementation_id.startswith("gp"):
env["implementation_name"] = "graalpy"
env["platform_python_implementation"] = "GraalPy"
elif implementation_id.startswith("pp"):
env["implementation_name"] = "pypy"
env["platform_python_implementation"] = "PyPy"
return env
@functools.cache @functools.cache
def _ensure_virtualenv(version: str) -> tuple[Path, Version]: def _ensure_virtualenv(version: str) -> tuple[Path, Version]:
version_parts = version.split(".") version_parts = version.split(".")
@@ -47,6 +66,7 @@ def constraint_flags(
def _parse_pip_constraint_for_virtualenv( def _parse_pip_constraint_for_virtualenv(
constraint_path: Path | None, constraint_path: Path | None,
marker_env: dict[str, str] | None = None,
) -> str: ) -> str:
""" """
Parses the constraints file referenced by `dependency_constraint_flags` and returns a dict where Parses the constraints file referenced by `dependency_constraint_flags` and returns a dict where
@@ -56,7 +76,12 @@ def _parse_pip_constraint_for_virtualenv(
The function does not try to be too smart and just handles basic constraints. The function does not try to be too smart and just handles basic constraints.
If it can't get an exact version, the real constraint will be handled by the If it can't get an exact version, the real constraint will be handled by the
{macos|windows}.setup_python function. {macos|windows}.setup_python function.
If marker_env is provided, marker-bearing constraints are evaluated against it;
otherwise, marker-bearing constraints are skipped.
""" """
env: dict[str, str] = (
marker_env if marker_env is not None else cast("dict[str, str]", default_environment())
)
if constraint_path: if constraint_path:
assert constraint_path.exists() assert constraint_path.exists()
with constraint_path.open(encoding="utf-8") as constraint_file: with constraint_path.open(encoding="utf-8") as constraint_file:
@@ -72,11 +97,12 @@ def _parse_pip_constraint_for_virtualenv(
if ( if (
package != "pip" package != "pip"
or requirement.url is not None or requirement.url is not None
or requirement.marker is not None
or len(requirement.extras) != 0 or len(requirement.extras) != 0
or len(requirement.specifier) != 1 or len(requirement.specifier) != 1
): ):
continue continue
if requirement.marker is not None and not requirement.marker.evaluate(env):
continue
specifier = next(iter(requirement.specifier)) specifier = next(iter(requirement.specifier))
if specifier.operator != "==": if specifier.operator != "==":
continue continue
@@ -95,6 +121,7 @@ def virtualenv(
use_uv: bool, use_uv: bool,
env: dict[str, str] | None = None, env: dict[str, str] | None = None,
pip_version: str | None = None, pip_version: str | None = None,
marker_env: dict[str, str] | None = None,
) -> dict[str, str]: ) -> dict[str, str]:
""" """
Create a virtual environment. If `use_uv` is True, Create a virtual environment. If `use_uv` is True,
@@ -114,7 +141,7 @@ def virtualenv(
else: else:
virtualenv_app, virtualenv_version = _ensure_virtualenv(version) virtualenv_app, virtualenv_version = _ensure_virtualenv(version)
if pip_version is None: if pip_version is None:
pip_version = _parse_pip_constraint_for_virtualenv(dependency_constraint) pip_version = _parse_pip_constraint_for_virtualenv(dependency_constraint, marker_env)
additional_flags = [f"--pip={pip_version}", "--no-setuptools"] additional_flags = [f"--pip={pip_version}", "--no-setuptools"]
if virtualenv_version < Version("20.31") or Version(version) < Version("3.9"): if virtualenv_version < Version("20.31") or Version(version) < Version("3.9"):
additional_flags.append("--no-wheel") additional_flags.append("--no-wheel")
+2 -2
View File
@@ -80,8 +80,8 @@ title: Working examples
| [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] ![pyodide icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. | | [sourmash][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] ![pyodide icon][] | Quickly search, compare, and analyze genomic and metagenomic data sets. |
| [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson | | [python-rapidjson][] | ![travisci icon][] ![gitlab icon][] | ![windows icon][] ![linux icon][] | Python wrapper around rapidjson |
| [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] ![pyodide icon][] | Example pybind11 module built with a Python-based build system | | [pybind11 python_example][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] ![pyodide icon][] | Example pybind11 module built with a Python-based build system |
| [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. |
| [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library | | [python-snappy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Python bindings for the snappy google library |
| [abess][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | A fast best-subset selection library. It uses cibuildwheel to build a large project with C++ extensions. |
| [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` | | [Confluent client for Kafka][] | ![travisci icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | setup in `tools/wheels/build-wheels.bat` |
| [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq | | [jq.py][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Python bindings for jq |
| [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing | | [cyvcf2][] | ![github icon][] | ![apple icon][] ![linux icon][] | cython + htslib == fast VCF and BCF processing |
@@ -191,8 +191,8 @@ title: Working examples
[sourmash]: https://github.com/sourmash-bio/sourmash [sourmash]: https://github.com/sourmash-bio/sourmash
[python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson [python-rapidjson]: https://github.com/python-rapidjson/python-rapidjson
[pybind11 python_example]: https://github.com/pybind/python_example [pybind11 python_example]: https://github.com/pybind/python_example
[abess]: https://github.com/abess-team/abess
[python-snappy]: https://github.com/intake/python-snappy [python-snappy]: https://github.com/intake/python-snappy
[abess]: https://github.com/abess-team/abess
[Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python [Confluent client for Kafka]: https://github.com/confluentinc/confluent-kafka-python
[jq.py]: https://github.com/mwilliamson/jq.py [jq.py]: https://github.com/mwilliamson/jq.py
[cyvcf2]: https://github.com/brentp/cyvcf2 [cyvcf2]: https://github.com/brentp/cyvcf2