Closed smprather closed 4 months ago
Could you try
CFLAGS=-I<...> LDFLAGS=-L<...> pip install gmpy2
?
See also pypa/setuptools#3794.
I don't think that adding new build deps on pkgconfig will be a good idea for gmpy2. Rather we could document using compiler/linker flags to point on non-standard locations.
Can you just supply a wheel for my platform? I would much rather compilation not be attempted since it will just about always leads to "works ok on my machine" syndrome.
@smprather, unfortunately we can't guess your platform nor the gmpy2 version you are trying to install... Could you try latest alpha?
I pip install LOTS of pypi packages that have binary components but do not build during install. How are they able to guess my platform? For reference, it is Redhat EL 8.7 (Ootpa). I would think this is a fairly common one, especially in the enterprise world.
I am behind a Great Firewall, as in zero internet visibility (when in Linux; my Windows laptop is less restricted). We have a PyPI internal mirror on the Linux side. I cannot install arbitrary GitHub release/commits. Also, due to VM restrictions on my laptop, I cannot install Redhat 8.7. I can barely get WSL/Ubuntu working. I can run Docker from WSL, but I think that's beyond my pain point.
I could clone the alpha in WSL and transfer it over to the Redhat side. I may try that if I can find the time.
This is the only package I'm having trouble with so far, and it is only with Python 3.12. Hopefully you guys can catch up with everyone else that is shipping non-pure Python packages.
Thanks @skirpichev !
We have a PyPI internal mirror on the Linux side.
Is this a complete mirror or it has some restrictions (e.g. doesn't include alpha releases)?
If it has alpha versions - please try to do pip install gmpy2==2.2.0a1
.
I cannot install arbitrary GitHub release/commits.
Latest gmpy2 alpha is available on the PyPI.
the only package I'm having trouble with so far, and it is only with Python 3.12
3.12 support is available only in 2.2.0a1.
There is #446 with a patch for 2.1.x, but I doubt 2.1.6 is planned to be released. @casevh ?
@smprather, now v2.2 is released. Does this issue is valid for you?
Works! Thanks @skirpichev !
(3.12.2) $ pip install gmpy2
DEPRECATION: Loading egg at /******************/python_venv/3.12.2/lib/python3.12/site-packages/gdspy-1.6.13-py3.12-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
Looking in indexes: https://***************/artifactory/api/pypi/pypi-remote/simple/
Collecting gmpy2
Downloading https://*************/artifactory/api/pypi/pypi-remote/packages/packages/96/8d/d017599d6db8e9b96d6e84ea5102c33525cb71c82876b1813a2ece5d94ec/gmpy2-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 57.6 MB/s eta 0:00:00
Installing collected packages: gmpy2
Successfully installed gmpy2-2.2.1
(3.12.2) $
Then, maybe this should be closed?
I installed libmpc and libmpc-devel in my own space and wrote a .pc file, and set PKG_CONFIG_PATH accordingly.
But the build can't find it. I did some Googling on how pip/setuptools interacts with external lib requirements, but I couldn't find much.
I poked around in another project's setup.py and found this.
Thanks for the help!