GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix Cygwin installation on CI for `pip` by EliahKagan · Pull Request #2053 · gitpython-developers/GitPython

Conversation

@EliahKagan

@EliahKagan EliahKagan commented Jun 14, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This switches to the *-wheel Cygwin packages on Cygwin CI, providing the necessary files for ensurepip to work by fixing the error described in #2004 (comment), and thus allowing venv without --without-pip to install pip normally through its implicit use of ensurepip.

This is a true fix for #2004, and thus an improvement on the workarounds in #2007 and #2009. In particular, this allows test_installation to run and pass. Accordingly, it is no longer marked xfail. See 8e24edf for full details.

(Whether this would also fix ensurepip for Python 3.12 when an effort like #1988 is picked back up is uncertain. 3.12 is blocked on Cygwin by the unrelated problem described in #1988 comments.)

This also does some minor housekeeping of the CI workflows in 66955cc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Byron reacted with heart emoji
All reactions
  • ❤️ 1 reaction
EliahKagan added 2 commits June 14, 2025 14:53
@EliahKagan
Minor CI clarifications
66955cc
- In the Cygwin CI workflow, move `runs-on` below `strategy`, for
  greater consistency with other workflows.

- In the Cygwin CI jobs, use `pwsh` rather than `bash` for the
  `git config` command run outside of Cygwin, since `pwsh` is the
  default shell for such commands, it's the shell the Cygwin setup
  action uses, and it avoids creating the wrong impression that
  `bash` is needed.

- Use "virtual environment" instead of "virtualenv" in some step
  names to avoid possible confusion with the `virtualenv` pacakge.

- Remove comments in the PyPA package upgrade steps, which are
  more self-documenting since 727f4e9 (gitpython-developers#2043).
@EliahKagan
Use *-wheel packages as a better fix for gitpython-developers#2004
8e24edf
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, this fixes gitpython-developers#2004 better than the
previous 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 sequence

This change takes the place of the main changes in gitpython-developers#2007 and gitpython-developers#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 their
names 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 may
be relevant when another attempt like gitpython-developers#1988 is made to test/support
Python 3.12 on Cygwin. At least for now, though, this seems
worthwhile for fixing the Cygwin 3.9 environment, making it more
similar to working local Cygwin environments and letting the
workflow be more usable as guidance to how to set up a local Cygwin
environment for GitPython development, and letting the installation
test pass automatically.)
@EliahKagan EliahKagan mentioned this pull request Jun 14, 2025
Cygwin job is broken on "Set up virtualenv" step #2004
Closed
@EliahKagan
EliahKagan marked this pull request as ready for review June 14, 2025 19:53
@EliahKagan
EliahKagan merged commit 46c439b into gitpython-developers:main Jun 14, 2025
@EliahKagan
EliahKagan deleted the cygwin-wheel-packages branch June 14, 2025 19:53
@EliahKagan EliahKagan mentioned this pull request Jun 16, 2025
Fail test_installation on warnings, and remove deprecated license classifier #2054
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@EliahKagan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.