-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] SQLAlchemy editable install failure references setuptools PEP 660 #3644
Comments
It looks like the C-compiler check is always happening, even though it's not actually needed.
|
Hi @hab6 thank you for reporting this. Am I correct to assume that no error happens if you run |
Thanks for the quick response @abravalheri. Correct, without the See below output
|
Thank you very much @hab6, I will have a look on this problem. It sounds a bit complicated, specially to get an available Windows machine with the same characteristics, so it may take some time, sorry for that.
@clach04, I am trying to understand this statement. I had a look on SQLAlchemy and it seems that they use Cython, so there is some compilation going on, right? Do you have any extra information why the compiler checks would not be needed? |
@abravalheri Cython may not be relevant to this issue since there are no Cython source ( SQLAlchemy v1.4.41 clone
SQLAlchemy v2.0.0 clone
|
Adding to the above comment, the (in development, i.e. no stable) 2.x in main does have the option to use Cython but it's currently not-mandatory.
so cython is a red-herring (at least with the current situation in October 2022). Both Kudos to whom ever added the legacy message, saved a bunch of time and bother figuring out a workaround! 👍 And thanks to @abravalheri for jumping on this so quickly! |
Thank you very much for the extra information guys. For the sake of transparency (and to manage expectations) I just would like to let you know that I will be away from the computer for the majority of this week, so I will not be able to work on this specifically. |
Thank you very much @clach04 , I had a quick look in the repo from my phone and I can see that Cython is listed in https://github.com/sqlalchemy/sqlalchemy/blob/main/pyproject.toml#L6 If I am not mistaking something, this means setuptools will always try to use Cython and build binary extensions, unless the user is using an alternative Python implementation (e.g. PyPy, IronPython, Jython, etc...) In practice, although Cython is "not mandatory", the build configuration is kind of forcing it to be used, right? It's a very weird (and this is the part I will try to investigate/fix once I am back to the computer) that the editable install differs from the regular install. |
Ahh, didn't spot that in the main branch. Thanks! I'll remember to check that in future. I can confirm that for @hab6's reported case, Cython is not used nor listed as a dependency the https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/pyproject.toml in the rel_1_4_41/rel_1_4 branch(es) do not list nor use Cython so I do not believe the build system is forcing the use of Cython with the reported test case. But for a new test case of the main (default) branch I suspect you are correct, that might then be a different problem to investigate (that might be combination of a setuptools and sqlalchemy issue). |
Thank you very much for the clarification @clach04. I think I know what is happening now, or at least I know why setuptools is running the compiler validation. In the I noticed that SQALachemy's setup.py script in When a developer tries to install the package in editable mode, If I am not wrong this part of the issue might be a duplicate of #3572. My suggestion there was to use the @hab6 if the missing compiler is a well know limitation for this build on windows, I think we can stop the investigation here. Effectively the issue is the same as the one discussed in #3572 and the solutions described there would apply. If the compiler tools are installed we can continue the investigation and try to understand what is going wrong... Could you please let me know which circumstance we are working with here? |
@abravalheri Greatly appreciate your informative help! My environment does not have the Cython tools installed. In looking at #3572, I think it stems from (and was opened 2 days after) SQLAlchemy issue #8458. So the SQLAlchemy team is aware of this issue and appears to have delivered a fix to address the problem in rel_2_0_0b1. Based on this information, I think we can close this issue. @clach04 Do you concur? |
setuptools version
63.2.0
Python version
3.10.7
OS
MSYS_NT-10.0-19042 3.3.6-341.x86_64
Additional environment information
pip v22.3, SQLAlchemy v1.4.42
Description
Attempt to build an editable install of project SQLAlchemy encounters an error due to a missing C++ compiler, which we expect, but then a setuptools problem is reported and references PEP 660.
References to similiar issues:
#3606 [Question] Editable install fails after introducing pyproject.toml
#3607 [BUG] If you are seeing this error, please report to
#3597 Struggling with fairseq installation
Expected behavior
The expectation is no error and a successfully built editable install, which does occur if using the suggested workaround with environment variable
SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
.How to Reproduce
git clone -b rel_1_4_41 https://github.com/sqlalchemy/sqlalchemy.git
cd sqlalchemy
python -m pip install -e .
Output
The text was updated successfully, but these errors were encountered: