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

Unable to install drf-schema-adapter with setuptools>=67 #75

Closed
soerenbe opened this issue Jan 30, 2023 · 1 comment · Fixed by #76
Closed

Unable to install drf-schema-adapter with setuptools>=67 #75

soerenbe opened this issue Jan 30, 2023 · 1 comment · Fixed by #76

Comments

@soerenbe
Copy link

Hi everyone,
since today a lot of our pipelines failed. After some investigation I found the cause in a version incompatibility of setuptools=>67 and drf-schema-adapter.

I get following error:

error in drf-schema-adapter setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
          djangorestframework>=3.12<4.0

This may match with the changelog of setuptools: https://github.com/pypa/setuptools/blob/main/CHANGES.rst

Relevant part:

#3790: Bump vendored version of :pypi:packaging to 23.0 (:pypi:pyparsing is no longer required and was removed). As a consequence, users will experience a more strict parsing of requirements. Specifications that don't comply with PEP 440 and PEP 508 will result in build errors.

I am not a packaging specialist, but I think a minor change in

'djangorestframework>=3.12<4.0',
would fix this.

Steps to reproduce

[sob@host ] ~/tmp$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
[sob@host ] ~/tmp$ virtualenv venv
created virtual environment CPython3.10.6.final.0-64 in 75ms
[sob@host ] ~/tmp$ source venv/bin/activate
(venv) [sob@host ] ~/tmp$ pip install --upgrade setuptools
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (65.5.0)
Collecting setuptools
  Using cached setuptools-67.0.0-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 65.5.0
    Uninstalling setuptools-65.5.0:
      Successfully uninstalled setuptools-65.5.0
Successfully installed setuptools-67.0.0

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip
(venv) [sob@host ] ~/tmp$ pip install drf-schema-adapter
Collecting drf-schema-adapter
  Downloading drf-schema-adapter-3.0.0.tar.gz (33 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      error in drf-schema-adapter setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
          djangorestframework>=3.12<4.0
                             ~~~~~~^
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
rconvent added a commit to rconvent/drf-schema-adapter that referenced this issue Jan 31, 2023
rixx added a commit to rixx/drf-schema-adapter that referenced this issue Feb 16, 2023
@nanuxbe
Copy link
Contributor

nanuxbe commented Feb 21, 2023

Thanks to both of you, I'll merge @rixx's PR

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 a pull request may close this issue.

2 participants