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?
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?
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 .)
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
Have you followed the instructions about making sure you're running a
recent version of pip?
On Thu, Mar 4, 2021 at 6:48 PM Damian Fuentes notifications@github.com
wrote:
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—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pyca/cryptography/issues/5869#issuecomment-791035395,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBF46YQUKVB4FCRUQWTTCAL4TANCNFSM4YI2UTOA
.
--
All that is necessary for evil to succeed is for good people to do nothing.
The error tells you how to resolve the problem: upgrade your pip. This issue is about a separate setuptools_rust nuance.
Was about to attempt that next. Thanks for confirming.
Just to confirm, this did work. Thanks!
Most helpful comment
The error tells you how to resolve the problem: upgrade your pip. This issue is about a separate setuptools_rust nuance.