Skip to content
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

gmp 6.3.0, mpc 1.3.1, mpfr 4.2.1, mpfrcx 0.6.3, gmpy2 2.2.0a1 #36351

Merged
merged 19 commits into from
Jan 14, 2024

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Sep 28, 2023

The unreleased 2.2.x series has work on support for Python 3.12

https://github.com/aleaxit/gmpy

The new version makes it necessary to tighten the requirements for MPC and MPFR.
We do the version check without pkg-config as before; changing it to pkg-config is #31348.

(The upgrade of the packages was previously done in #36775, but has now been merged here.)

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@tornaria
Copy link
Contributor

FWIW, we are shipping 2.2.0a1 in void linux since september. This supports python 3.12 and is available on pypi: https://pypi.org/project/gmpy2/2.2.0a1/

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 13, 2023

Thanks @tornaria, I'll try switching to this release!

@mkoeppe mkoeppe changed the title build/pkgs/gmpy2: Update to 2.2.x (unreleased) build/pkgs/gmpy2: Update to 2.2.0a1 Dec 13, 2023
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

Full tests at https://github.com/mkoeppe/sage/actions/runs/7205490817

debian-bullseye has MPC 1.2.0, which passes my test in spkg-configure but is rejected by gmpy2 (it needs 1.2.1).

@dimpase
Copy link
Member

dimpase commented Dec 14, 2023

we can as we often do get the MPC version from mpc.h - akin to what we do for NTL 😭

/* Define MPC version number */
#define MPC_VERSION_MAJOR 1
#define MPC_VERSION_MINOR 3
#define MPC_VERSION_PATCHLEVEL 1
#define MPC_VERSION_STRING "1.3.1"

/* Macros dealing with MPC VERSION */
#define MPC_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
#define MPC_VERSION                                                     \
  MPC_VERSION_NUM(MPC_VERSION_MAJOR,MPC_VERSION_MINOR,MPC_VERSION_PATCHLEVEL)

a bit shorter than NTL code will use MPC_VERSION - which is 66049 for 1.2.1

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

I'm just copying the test from gmpy.h

@dimpase
Copy link
Member

dimpase commented Dec 14, 2023

Do you mean AC_RUN_ and not AC_LINK_?!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

No

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

This is a compile-time test

@dimpase
Copy link
Member

dimpase commented Dec 14, 2023

It's AC_COMPILE_ then.

Also not clear how you make sure to test for -lmpc, as you took AC_SEARCH_LIBS out.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

I'll get back to it later when I have a bit more time. Feel free to push a fix

@dimpase
Copy link
Member

dimpase commented Dec 14, 2023

ready now, I think

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Dec 14, 2023

Thanks. I've switched the lib test to use a newer function, like I did previously in 109671e

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 1, 2024

With the gmpy2 upgrade here, passes all tests on the same machine where I reproduced the failures reported in #36775 (comment) with the old gmpy2.

Copy link

github-actions bot commented Jan 1, 2024

Documentation preview for this PR (built with commit 4bdb76d; changes) is ready! 🎉

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 1, 2024

All tests passed, let's get this in.

vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 5, 2024
…6.3, `gmpy2` 2.2.0a1

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
The unreleased 2.2.x series has work on support for Python 3.12

https://github.com/aleaxit/gmpy

The new version makes it necessary to tighten the requirements for MPC
and MPFR.
We do the version check without pkg-config as before; changing it to
pkg-config is sagemath#31348.

(The upgrade of the packages was previously done in sagemath#36775, but has now
been merged here.)

<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36351
Reported by: Matthias Köppe
Reviewer(s):
@vbraun vbraun merged commit 729f03f into sagemath:develop Jan 14, 2024
42 of 44 checks passed
@saraedum
Copy link
Member

if conda tests fail, we need to make sure this gmpy2 version (released on PyPI) makes it to Conda quickly.

Note that conda usually does not package alphas. Is the alpha absolutely necessary now? Does anything break badly if I just install sagelib with gmpy 2.1.x?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2024

Check what's declared in build/pkgs/gmpy2/install-requires.txt build/pkgs/gmpy2/version_requirements.txt

@saraedum
Copy link
Member

It says gmpy2 ~=2.1.b999. Which means yes. Though that . before the b confuses me.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2024

This should accept all 2.1.x versions, or at least so I claimed in the 4bdb76d commit.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2024

Though that . before the b confuses me.

Right, that's not normalized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants