Comments (15)
I am trying to release 2.2.0a1 in the next day or so. Just finishing up on the Windows builds.
from gmpy.
I unzipped the release 2.2.0a1 in my git folder, and tried to install it with PyCharm 2022.3's packaging tool (Windows), to this response:
It seems you are trying to build the module from sources. This is a tricky story on windows (see how our CI job does this and mingw64/msys2_build.txt). But there are binary wheels, which you could install with pip install gmpy2==2.2.0a1
. Is this inappropriate for you, @brubsby, for some reason?
what algorithm the actual implementation of mpz_prevprime is implementing
This might be documented in the GMP manual, section "Algorithms".
from gmpy.
Hey! It appears that the prerelease 2.2.0a1 has been available for some time. Do you have thoughts on when to fully release 2.2.0?
from gmpy.
I would guess the major trouble is #352.
from gmpy.
And it would be nice to have wheels for CPython 3.12.
from gmpy.
👍
from gmpy.
I finally have completed Windows builds. I will release 2.2.0a1 as soon as I can.
from gmpy.
I have published gmpy2 2.2.0a1.
I just realized that I missed including the source. I will release a2 in couple of days.
from gmpy.
I just realized that I missed including the source.
Hmm, why you can't just add the source tarball? E.g. with twine upload
.
BTW, releases could be automated, see e.g. the diofant workflow. (To release a new version, I tag the latest commit in the master branch and publish this release tag.) One obstacle for the gmpy - windows builds. But these artifacts could be added later by hand.
from gmpy.
Thanks. I was always under the impression that publishing a release was a single event.
I have pushed the source tarball.
Thanks again for your help.
from gmpy.
I was always under the impression that publishing a release was a single event.
In some sense. E.g. you can't change uploaded files. But you can completely remove some file. Or you can add a missing file.
from gmpy.
Might not be appropriate for this issue, but since it seemed related to the ongoing tasks mentioned in here, I figured I'd comment here rather than make a new one.
I've had trouble installing the new prerelease version. It's very possible I'm missing something obvious, but I unzipped the release 2.2.0a1 in my git folder, and tried to install it with PyCharm 2022.3's packaging tool (Windows), to this response:
Processing c:\gitprojects\gmpy-gmpy2-2.2.0a1
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: gmpy2
Building wheel for gmpy2 (pyproject.toml): started
Building wheel for gmpy2 (pyproject.toml): finished with status 'error'
Failed to build gmpy2
error: subprocess-exited-with-error
Building wheel for gmpy2 (pyproject.toml) did not run successfully.
exit code: 1
[27 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\gmpy2
copying gmpy2\__init__.py -> build\lib.win-amd64-cpython-310\gmpy2
running egg_info
writing gmpy2.egg-info\PKG-INFO
writing dependency_links to gmpy2.egg-info\dependency_links.txt
writing requirements to gmpy2.egg-info\requires.txt
writing top-level names to gmpy2.egg-info\top_level.txt
reading manifest file 'gmpy2.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'COPYING'
adding license file 'COPYING.LESSER'
writing manifest file 'gmpy2.egg-info\SOURCES.txt'
copying gmpy2\__init__.pxd -> build\lib.win-amd64-cpython-310\gmpy2
running build_ext
building 'gmpy2.gmpy2' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
creating build\temp.win-amd64-cpython-310\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I./src -IC:\Python3\include -IC:\Python3\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc/gmpy2.c /Fobuild\temp.win-amd64-cpython-310\Release\src/gmpy2.obj /DSHARED=1
gmpy2.c
C:\GitProjects\gmpy-gmpy2-2.2.0a1\src\gmpy2.h(80): fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gmpy2
ERROR: Could not build wheels for gmpy2, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 23.1.2 -> 23.2.1
[notice] To update, run: python.exe -m pip install --upgrade pip
I'm aware that PyCharm's packaging tool may not be appropriate here, but I figured I'd allow it a chance to perform correctly.
and it says it's attempting to run this command
C:\Python3\python.exe C:/Program Files/JetBrains/PyCharm Community Edition 2022.3/plugins/python-ce/helpers/packaging_tool.py install file://C:\GitProjects\gmpy-gmpy2-2.2.0a1
fwiw, gmp.h
seems to be at least sitting in C:\GitProjects\gmpy-gmpy2-2.2.0a1\mingw64\shared\include
and C:\GitProjects\gmpy-gmpy2-2.2.0a1\mingw64\static\include
, so maybe I don't have my development environment set up correctly to build the windows binaries or something. When unzipping the release, I did get an error that it couldn't make a symlink for gmp.h
, but then when I reran 7z as admin it didn't give me the error, so it may not be that either.
Alternatively, I was only grabbing the prerelease because it seemed to give access to mpz_prevprime
for the first time, which I wanted to use for calculating OEIS sequence A031442. And my brain isn't quite adept enough at parsing gmp library code to comprehend what algorithm the actual implementation of mpz_prevprime is implementing. Otherwise it could possibly be less hassle for me to implement it in python myself. (I first tried with primesieve-python to do something like:
def previous_prime(val):
iterator = primesieve.Iterator()
iterator.skipto(val)
return iterator.prev_prime()
but either primesieve itself or primesieve-python does not have bignum support)
Some assistance with either problem would help me greatly.
from gmpy.
But there are binary wheels, which you could install with pip install gmpy2==2.2.0a1
Ah that worked! I didn't realize prereleases were distributed on pip as well.
from gmpy.
I didn't realize prereleases were distributed on pip as well.
Yeah, on the GH releases page only source code is available, looks like a minor issue. It should be possible to upload here other assets (e.g. wheels). But I realize it's too difficult to do now without proper automation of the release process (see suggestion above).
from gmpy.
Any news on a full 3.12
release on PyPI? numba recently released 3.12 support, so I'm keen to make the move
from gmpy.
Related Issues (20)
- 2.1.5: test suite fails with errors `invalid option: '+SKIP_MPC_LESS_THAN_110'` HOT 9
- 2.1.5: *.h and *.pxd files are installed HOT 5
- Is the `is_strong_bpsw_prp` code correct? HOT 2
- Assessment of the difficulty in porting CPU architecture for the gmpy
- Description of `is_euler_prp` HOT 1
- mpz object missing to_bytes() method HOT 4
- complex conjugate crash HOT 2
- Linux wheels in the latest release (2.2.0a1) are broken HOT 10
- What is the paper that `is_extra_strong_lucas_prp` is referring to? HOT 4
- About the case where `k=0` is input to `lucasu_mod` and `lucasv_mod` HOT 2
- gmpy-2.1.5 fails to compile with python-3.12 HOT 10
- cython C-API is broken in published wheels (and in the build_wheels.yml CI workflow) HOT 9
- Pip install build fails, can't find mpc.h HOT 6
- Deprecate local_context()? HOT 18
- Impending release of gmpy2 2.2.0a2 HOT 10
- Issue with large factorial HOT 6
- Access to gmplib.org
- Alternatives to using private API for conversion to/from CPython int's HOT 1
- Build & tests wheels for M$ Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmpy.