Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e24edf

Browse files
committed
Use *-wheel packages as a better fix for#2004
This installs the `python-pip-wheel`, `python-setuptools-wheel`,and `python-wheel-wheel` packages on Cygwini CI, which provide`.whl` files for `pip`, `setuptools`, and `wheel`.By making those wheels available, thisfixes#2004 better than theprevious workaround, allowing `ensurepip` to run without the error: Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details __import__(pkg_name) File "/usr/lib/python3.9/ensurepip/__init__.py", line [30](https://github.com/EliahKagan/GitPython/actions/runs/13454947366/job/37596811693#step:10:31), in <module> _SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") File "/usr/lib/python3.9/ensurepip/__init__.py", line 27, in _get_most_recent_wheel_version return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) ValueError: max() arg is an empty sequenceThis change takes the place of the main changes in#2007 and#2009.In particular, it should allow `test_installation` to pass again.This also delists non-wheel Cygwin packages such as `python39-pip`,which are not needed (or at least no longer needed).(The python-{pip,setuptools,wheel}-wheel packages are, as theirnames suggest, intentionally not specific to Python 3.9. However,this technique will not necessarily carry over to Python 3.12,depending on what versions are supplied and other factors. This maybe relevant when another attempt like#1988 is made to test/supportPython 3.12 on Cygwin. At least for now, though, this seemsworthwhile for fixing the Cygwin 3.9 environment, making it moresimilar to working local Cygwin environments and letting theworkflow be more usable as guidance to how to set up a local Cygwinenvironment for GitPython development, and letting the installationtest pass automatically.)
1 parent66955cc commit8e24edf

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

‎.github/workflows/cygwin-test.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
-name:Install Cygwin
4242
uses:cygwin/cygwin-install-action@v5
4343
with:
44-
packages:python39 python39-pip python39-virtualenv git wget
44+
packages:git python39 python-pip-wheel python-setuptools-wheel python-wheel-wheel
4545
add-to-path:false# No need to change $PATH outside the Cygwin environment.
4646

4747
-name:Arrange for verbose output
@@ -69,13 +69,9 @@ jobs:
6969
7070
-name:Set up virtual environment
7171
run:|
72-
python3.9 -m venv--without-pip.venv
72+
python3.9 -m venv .venv
7373
echo 'BASH_ENV=.venv/bin/activate' >>"$GITHUB_ENV"
7474
75-
-name:Bootstrap pip in virtualenv
76-
run:|
77-
wget -qO- https://bootstrap.pypa.io/get-pip.py | python
78-
7975
-name:Update PyPA packages
8076
run:|
8177
python -m pip install -U pip 'setuptools; python_version<"3.12"' wheel

‎test/test_installation.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,11 @@
44
importast
55
importos
66
importsubprocess
7-
importsys
8-
9-
importpytest
107

118
fromtest.libimportTestBase,VirtualEnvironment,with_rw_directory
129

1310

1411
classTestInstallation(TestBase):
15-
@pytest.mark.xfail(
16-
sys.platform=="cygwin"and"CI"inos.environ,
17-
reason="Trouble with pip on Cygwin CI, see issue #2004",
18-
raises=subprocess.CalledProcessError,
19-
)
2012
@with_rw_directory
2113
deftest_installation(self,rw_dir):
2214
venv=self._set_up_venv(rw_dir)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp