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

New modularized distributions sagemath-{flint,gap,giac,homfly,ntl,pari} #35663

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented May 22, 2023

📚 Description

We add new distributions that ship the Cython modules depending on a specific library.

To test: make pypi-wheels.
(This is also automatically run as part of the Build&Test workflow.)

Goals of this PR:

  • wheels for the distributions are separately buildable
  • disjointness of the wheels

Non-goals:

This PR:

Part of:

📝 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

…t from sage.libs.flint (only used by doctesting helper functions)
@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2023

You do "make sagemath_flint", as with any other package.
(It only builds the wheel -- installing it into the Sage venv makes no sense because it duplicates parts of the monolithic Sage library.)

Testing is documented in https://doc.sagemath.org/html/en/developer/packaging_sage_library.html#testing-the-distribution-in-virtual-environments-with-tox

@dimpase
Copy link
Member

dimpase commented Jun 13, 2023

I am getting

...
[sagemath_objects-10.1.beta3] ERROR: Could not find a version that satisfies the requirement sage-setup~=10.1b3
[sagemath_objects-10.1.beta3] ERROR: No matching distribution found for sage-setup~=10.1b3
[sagemath_objects-10.1.beta3]
... 

while running make sagemath_flint

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2023

Try make wheels first.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2023

@dimpase
Copy link
Member

dimpase commented Jun 13, 2023

why doesn't the target sagemath_flint depend on wheels ?

@dimpase
Copy link
Member

dimpase commented Jun 13, 2023

make wheels errors out with

[sagemath_flint-10.0] gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-rpath-link,/home/dimpase/work/software/sage/local/lib -L/home/dimpase/work/software/sage/local/lib -Wl,-rpath,/home/dimpase/work/software/sage/local/lib -Wl,-rpath-link,/home/dimpase/work/software/sage/local/lib -L/home/dimpase/work/software/sage/local/lib -Wl,-rpath,/home/dimpase/work/software/sage/local/lib -g -O2 build/temp.linux-x86_64-cpython-39/build/cythonized/sage/rings/polynomial/polynomial_complex_arb.o -L/usr/lib -lflint -larb -lgmp -o build/lib.linux-x86_64-cpython-39/sage/rings/polynomial/polynomial_complex_arb.cpython-39-x86_64-linux-gnu.so -lpari
[sagemath_flint-10.0] /usr/bin/ld: cannot find -larb
[sagemath_flint-10.0] collect2: error: ld returned 1 exit status
[sagemath_flint-10.0] error: command '/usr/bin/gcc' failed with exit code 1
[sagemath_flint-10.0] 
[sagemath_flint-10.0] ERROR Backend subprocess exited when trying to invoke build_wheel

@dimpase
Copy link
Member

dimpase commented Jun 13, 2023

The latter is most probably related to the fact that it's Debian, with SAGE_ARB_LIBRARY="flint-arb", not SAGE_ARB_LIBRARY="arb"

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2023

Try with this commit. (Need to re-run bootstrap.)

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 13, 2023

why doesn't the target sagemath_flint depend on wheels ?

That's a long story; there's something that I need to redesign in the relation between editable installations and normal installations. That work is best done as part of a switch of the editable installs to using PEP-660 editable wheels (#34209)

@mkoeppe mkoeppe force-pushed the t/30666/add__sage_setup__distribution__directives_to_all_cython_modules_needing_external_libraries branch from 6b688ba to 011decd Compare June 16, 2023 15:27
…rectives_to_all_cython_modules_needing_external_libraries

SageMath version 10.1.beta8, Release Date: 2023-07-30
@mkoeppe mkoeppe changed the title New modularized distributions sagemath-{flint,gap,giac,homfly,pari} New modularized distributions sagemath-{flint,gap,giac,homfly,ntl,pari} Jul 30, 2023
@mkoeppe mkoeppe removed this from the sage-10.1 milestone Aug 7, 2023
…ctives_to_all_cython_modules_needing_external_libraries

SageMath version 10.1.rc0, Release Date: 2023-08-13
@github-actions
Copy link

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 19, 2023

This has been merged into #35095

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.

Distributions sagemath-{flint-arb,homfly,giac,gap}, add "sage_setup: distribution" to Cython modules
2 participants