Open joseguerr opened 1 week ago
Hi @joseguerr could you please try to reduce the reproducer by removing any unnecessary 3rd party code? Please see https://stackoverflow.com/help/minimal-reproducible-example.
I suspect that the only thing you need to do is to ensure you have the latest version of packaging
installed (or that packaging
is not installed at all, so that setuptools uses its own vendored version). This is conclusion is reached via the following test:
cd /tmp
python3.12 -m venv .venv
.venv/bin/python -m pip install -U pip setuptools
.venv/bin/python -m pip uninstall packaging # Let's make sure setuptools uses the bundled version of packaging
.venv/bin/python
Python 3.12.7 (main, Oct 1 2024, 08:52:11) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools # => changes sys.path so that vendored packaging is exposed
>>> from packaging.requirements import Requirement
>>> req = "greenlet==3.1.1; python_version < '3.13' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))"
>>> Requirement(req)
<Requirement('greenlet==3.1.1; python_version < "3.13" and platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32")))))')>
Another part that is a bit worrying about your logs is the following:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
Here we see that a deprecated feature is used, the deprecated feature in question is the CLI capabilities setup.py
[^1]. This seems to indicated that a pyproject.toml
file is missing. Please make sure your project has one. You can find more info in https://setuptools.pypa.io/en/latest/build_meta.html.
[^1]: setup.py
is a valid configuration file for setuptools, but using it as a CLI tool is deprecated and as such is no longer fully supported.
setuptools version
setuptools==75.1.0
Python version
Python 3.11
OS
macOS
Additional environment information
Description
After updating greenlet to 3.1.1 the marker expression is set to:
greenlet==3.1.1; python_version < '3.13' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))
It's not the best to build the expression but it's still valid. To which I get the error in the output section.
If I change to manually include start and ending parenthesis, i.e: greenlet==3.1.1; (python_version < '3.13' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32'))))))
I no longer have the issue.
Expected behavior
Expected setuptools to parse the marker expression
How to Reproduce
Output