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

setup.py setup_requires seems useless now? #5869

Closed
webknjaz opened this issue Feb 26, 2021 · 8 comments
Closed

setup.py setup_requires seems useless now? #5869

webknjaz opened this issue Feb 26, 2021 · 8 comments

Comments

@webknjaz
Copy link
Contributor

I noticed that setup.py checks for setuptools_rust early and fails long before setuptools.setup() has a chance to attempt installing things from setup_requires. This is not a problem when PEP517 is used but than the whole setup_requires is unnecessary. Is there a desire to support old pip or editable installs that bypass pyproject.toml? Should this just be removed?

@reaperhulk
Copy link
Member

We do (unofficially) support editable installs for development purposes so I'm slightly inclined towards leaving this. Is there any signaling from pip, et al around the future of editable?

@webknjaz
Copy link
Contributor Author

webknjaz commented Mar 1, 2021

The last thing I heard was at PyCon 2019 — a few folks at PyPA sprint were supposed to work on a prototype on setuptools and pip sides that could then make it into a PEP (probably separate from the 517, I don't remember). But I don't think that ended up being implemented.

As for leaving the setup.py as is, I don't think this works out of the box. My understanding is that following https://cryptography.io/en/latest/development/getting-started.html#development-dependencies will crash because it does not tell people to pre-install setuptools_rust.
So maybe this should be documented (adding to dev-requirements.txt wouldn't work because it installs .)

@dfuentes77
Copy link

Yup, I'm getting this error when installing the latest cryptography 3.4.6 where it's a dependency of another package:

           Collecting cryptography>=1.3.4 (from requests[security]<2.19.0,>=2.18.4->sentry==8.22.0)

             Downloading https://files.pythonhosted.org/packages/fa/2d/2154d8cb773064570f48ec0b60258a4522490fcb115a6c7c9423482ca993/cryptography-3.4.6.tar.gz (546kB)
        Complete output from command python setup.py egg_info:

                =============================DEBUG ASSISTANCE==========================

                If you are seeing an error here please try the following to
                successfully install cryptography:

                Upgrade to the latest pip and try again. This will fix errors for most
                users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip

                =============================DEBUG ASSISTANCE==========================

        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-kHcAYA/cryptography/setup.py", line 14, in <module>
            from setuptools_rust import RustExtension
        ImportError: No module named setuptools_rust

@alex
Copy link
Member

alex commented Mar 4, 2021 via email

@reaperhulk
Copy link
Member

The error tells you how to resolve the problem: upgrade your pip. This issue is about a separate setuptools_rust nuance.

@dfuentes77
Copy link

Was about to attempt that next. Thanks for confirming.

@dfuentes77
Copy link

Just to confirm, this did work. Thanks!

@reaperhulk
Copy link
Member

#6465 removed this

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants