Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation of pyquil and packaging-24.2 #1823

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pavoljuhas
Copy link

Description

Problem: setuptools-77 requires packaging>=24.2. Installation of pyquil
downgrades packaging to packaging-23 which breaks pre-installed setuptools.

Solution: Let packaging-24 and pyquil coexist in a Python environment.

Example:

$ pip install "setuptools>=77"
$ python -c "import setuptools" 
# OK

$ pip install pyquil
# packaging got downgraded to 23.2

$ python -c "import setuptools"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/t312/lib/python3.12/site-packages/setuptools/__init__.py", line 27, in <module>
    from .dist import Distribution
  File "/tmp/t312/lib/python3.12/site-packages/setuptools/dist.py", line 15, in <module>
    from packaging.licenses import canonicalize_license_expression
ModuleNotFoundError: No module named 'packaging.licenses'

Checklist

  • The PR targets the master branch
  • The above description motivates these changes.
  • The change is atomic and can be described by a single commit (your PR will be squashed on merge).
  • All changes to code are covered via unit tests.
  • Parameters and return values have type hints with PEP 484 syntax.
  • Functions and classes have useful Sphinx-style docstrings.
  • (New Feature) The docs have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using auto-close keywords.

@jselig-rigetti
Copy link
Contributor

Sorry to miss this - will try to fix the pipeline first with #1825 then will run the pipeline here.

@pavoljuhas
Copy link
Author

I see, thanks for the update!

Problem: setuptools-77 requires packaging>=24.2.  Installation of pyquil
downgrades packaging to packaging-23 which breaks pre-installed setuptools.

Solution: Let packaging-24 and pyquil coexist in a Python environment.
Executed  poetry lock --no-update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants