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

Peewee installation fails #2889

Closed
SheGe opened this issue May 10, 2024 · 2 comments
Closed

Peewee installation fails #2889

SheGe opened this issue May 10, 2024 · 2 comments

Comments

@SheGe
Copy link

SheGe commented May 10, 2024

Hi,

the installation of peewee specified in the requirements.txt file is failing with this error:

Collecting peewee
  Using cached peewee-3.17.3.tar.gz (3.0 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
 (stderr:   ERROR: Command errored out with exit status 1:
   command: /opt/stackstorm/virtualenvs/MY_PACK/bin/python /opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmpxnoi_0dy
       cwd: /pip-install-n9u1a_0i/peewee_6e7c882e54424ea1af25d4c0c4aa3220
  Complete output (10 lines):
  Traceback (most recent call last):
    File \"/opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 280, in <module>
      main()
    File \"/opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File \"/opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 108, in get_requires_for_build_wheel
      backend = _build_backend()
    File \"/opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py\", line 99, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/stackstorm/virtualenvs/MY_PACK/bin/python /opt/stackstorm/virtualenvs/MY_PACK/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmpxnoi_0dy Check the logs for full command output.

More information about the system:

  • Python 3.6
  • VENV creation command: /opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python --system-site-packages --verbose --no-download /opt/stackstorm/virtualenvs/MY_PACK
  • Command used for the installation of requirements: /opt/stackstorm/virtualenvs/MY_PACK/bin/pip install -U -r /opt/stackstorm/packs/MY_PACK/requirements.txt.
  • Setup tools version inside MY_PACK venv: 51.3.3
  • Setup tools version which peewee is trying to use comes from venv system-site-packages: 39.2.0

The problem I'm experiencing could be related to this: pypa/setuptools#1694 (comment)

I am confident that the issue I’m currently facing could be resolved by adding build-backend="setuptools.build_meta" into the pyproject.toml file. However, I have concerns about how this modification might affect the compatibility of your project with various Python versions currently supported.

@SheGe
Copy link
Author

SheGe commented May 10, 2024

When I temporarily modified the stack storm configuration and removed --system-site-packages from the virtual environment creation command - the peewee installation was completed.
In the systems where we use newer versions of Python, like 3.8 - the issue does not exist. This test proves the findings in the description are correct and the problem I'm experiencing is related to this pip bug with build isolation: pypa/pip#6264 for which the fix won't released for pip versions that work with Python <= 3.6

Implementing the change I've suggested might help to keep peewee compatible with older versions of Python and different environment setups.

@coleifer
Copy link
Owner

I've gone ahead and tried your fix in a new version, 3.17.4. Hopefully this addresses your issue, however unlikely the circumstances required to produce it.

I hate @pypa so much it's unreal!

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

No branches or pull requests

2 participants