-
Notifications
You must be signed in to change notification settings - Fork 86
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
Build and test windows wheels #469
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #469 +/- ##
=======================================
Coverage 85.52% 85.52%
=======================================
Files 50 50
Lines 11656 11656
Branches 2202 2202
=======================================
Hits 9969 9969
Misses 1687 1687 ☔ View full report in Codecov by Sentry. |
Why aren't the patches related to mp_bitcnt_t (sp?) carried over to the Windows compilation of GMP? Question: Assuming we use delve-wheel, what GMP/MPFR/MPC libraries will a cython/C-API extension use when gmpy2 v2.2.0 is upgraded to v2.2.1? (The problem is (possible) shared internal state in the GMP library that is inherited by MPFR and MPC.) |
9b55149
to
dfb4ebb
Compare
That does make sense for me, but shouldn't you submit these patches to upstream? BTW, was this applied to previous stable release?
If we will bundle same versions of libraries across minor releases gmpy2 - I doubt there will be problems. I think we could adopt scipy-like approach (for openblas), i.e. with separate wheels for libraries. Probably, python-flint could reuse these libraries. But this issue might be more complex to address just in the next release. So, in a meantime I'll adopt same approach as for previous gmpy2 releases: no mangling (unless it can't be disabled as with auditwheel), libraries are in the gmpy2.libs directory. |
@casevh, I think it's ready for review. But I would appreciate if you take look on #470 first. open issues:
PS: As I have not access to M$ Windows - I would appreciate if someone else could test generated wheels. |
I have done a quick test of the Python 3.11 Windows wheel and it worked just fine. I don't think the version of Windows will matter but I would probably move to 2022 just to avoid having to move at some time in the future. |
Done. |
@casevh Where I can I find the windows wheels from this PR? |
Most recents wheels should be at https://github.com/aleaxit/gmpy/actions/runs/8229996172/artifacts/1314269722 This is a later build than I've tested so let us know if it doesn't work for you. |
Thanks! Installation went fine (python 3.12) and my code runs fine so far as I have tested. |
Build wheels should be available with every commit, that has green CI check. Go to any "Build wheels" job and then to the "Summary" page. Edit: last commit add documentation for building release wheels on M$. Let me know if this complicates code review: we can factor out this change for later prs. |
f8b66a9
to
43b7706
Compare
This documents building binary wheels for M$ Windows. The file wasn't referenced in docs, instead we suggests using msys2 to build everything. Also, this commit drop all binary files and scripts in mingw64/
Is this PR ready to merge? Has the mpbitcnt_t patch been included? Are there any ordering dependancies between the three PRs? |
Also enable --with-pic for all platforms
It's ready for review:)
No, for reasons I mentioned above. Now I did this (last commit). This seems to be a bad idea, however.
There is only one other ready for review pr: #471. I think it shouldn't conflict with the current one. |
The initial motivation to patch mp_bitcnt_t was based on this comment in the GMP manual: "Counts of bits of a multi-precision number are represented in the C type mp_bitcnt_t. Currently this is always an unsigned long, but on some systems it will be an unsigned long long in the future." Patched versions of GMP 6.2 were used for gmpy2 2.1.x. The second patch is coding error in a function introduced in GMP 6.3. It has been reported. The patch fixes the following problem.
|
Perhaps, we should prepare a real patch and convince gmp people to accept it.
Ok, I see. Should I adapt instructions in https://gmpy2.readthedocs.io/en/latest/install.html#installation to mention that patch? Sadly, we can't just instruct people to use gmp package from the msys2.
Sorry, I miss that. Is it was committed before? |
Last commit include the mp_bitcnt_t patch as a plain diff. |
I tested a couple of the wheels and they look fine. I will merge this PR and will merge #474 later. Then I'll do some extensive testing on Windows. |
Let me know if you find any problems. I would appreciate, if we could make new alpha release, with support for the CPython 3.13. BTW, as now we built wheels for all supported platforms in CI - you may consider using https://github.com/pypa/gh-action-pypi-publish to automate PyPI uploads. See mpmath workflow: https://github.com/mpmath/mpmath/blob/3512b74baa53122269a7e47a35f61e9d96b50725/.github/workflows/test.yml#L83-L88 |
I agree on a new alpha release with support for Python 3.13. I'd like to target a beta release shortly after Python 3.13.0b1 and a final release to coincide with the official release of 3.13.0. |
FYI. Error in the building of the Windows wheels. Here is the error message:
D:\a\gmpy\gmpy>set WHEELHOUSE=C:\Users\runneradmin\AppData\Local\Temp\cibw-run-df5edqr9\cp37-win_amd64\repaired_wheel D:\a\gmpy\gmpy>set WHEELNAME=C:\Users\runneradmin\AppData\Local\Temp\cibw-run-df5edqr9\cp37-win_amd64\built_wheel\gmpy2-2.2.0a2-cp37-cp37m-win_amd64.whl D:\a\gmpy\gmpy>msys2 -c scripts/cibw_repair_wheel_command_windows.sh
Error: Process completed with exit code 1. |
This is from #474? I'm working on this. It seems, the delvewheel, like the delocate-wheel, uses special directory in this case. |
Just let me know if I need to push #474.
Case
…On Sun, Mar 24, 2024 at 10:06 PM Sergey B Kirpichev < ***@***.***> wrote:
This is from #474 <#474>? I'm working
on this. It seems, the delvewheel
<https://github.com/adang1345/delvewheel/tree/bc55faf1ba382b7906b127ec9df15e35c44a941d/delvewheel>,
like the delocate-wheel, uses special directory in this case.
—
Reply to this email directly, view it on GitHub
<#469 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMR23YISLDW4L2KTBSUPDDYZ6WDZAVCNFSM6AAAAABEKNSXRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJXGIZDCMJUGU>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Closes #468