Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From sagemath/sage#31396, squashed.
This version of
sage_conf
is for making a wheel that packages the precompiled non-Python bits of the Sage distribution, makingSAGE_ROOT
(and thusSAGE_LOCAL=$SAGE_ROOT/local
) relocatable using Marc Culler's symbolic link surgery (the method proposed in #31076, usingSAGE_ROOT=/var/tmp/sage-...
and a symlink).The
sage
script invokessage-config
to determineSAGE_ROOT
andSAGE_LOCAL
. In the version ofsage-config
supplied by this version ofsage_conf
, we ensure that the symlink from/var/tmp/sage-....
to the actual install location is set.So far, a wheel has been built for XCode python 3.8 on macOS 10.15. The wheel is 670MB in size, an order of magnitude above the standard file size limit on PyPI; but a file size limit increase (requested in pypi/support#985) has kindly been granted by the PyPI team.
The wheel declares dependencies (
install-requires
) to all Python packages in the Sage distribution that have extension modules. The dependencies are specific using@
to URLs onhttps://github.com/sagemath/sage-wheels/releases/tag/9.5.rc2, where I have uploaded the binary wheels. Unfortunately, by PyPI policy, such
@
references are not allowed for packages on PyPI.Hence, the pip invocation needs to use a URL.
(See also https://twitter.com/mkoeppe_math/status/1378860285537054723)
Instructions for testing:
bin
directory of the user installation scheme is inPATH
. For example, on macOS:Procedure for building the sage_conf wheel and compatible wheels:
For building wheels on macOS Catalina that uses XCode python 3.8:
or
This creates (uploaded to https://github.com/sagemath/sage-wheels/releases/tag/9.5.rc2)
Build for macOS Big Sur (requires a machine running Big Sur or Monterey) (uploaded to https://github.com/sagemath/sage-wheels/releases/tag/9.5.rc2)
Build for macOS Monterey (requires a machine running Monterey)
Build for Linux (does not work yet):
Follow-up steps:
manylinux
usingtox -e docker-manylinux....
RuntimeError: Invalid binary wheel, found the following shared library/libraries in purelib folder:
; so we should replace our current abuse of package data (install_data
) by platlib (install_lib
). pypa/build on Linux - extension / binary modules in purelib pypa/packaging-problems#542 (comment): subclassbuild_ext
instead ofbuild_py
sage_root.tar
(with symlinks) instead of including the sage root as a directory - https://docs.python.org/3/library/tarfile.html#tarfile.opensage_root
fromsage_conf
and use install-requires in thesage_conf
sdist/wheel with @ links to GH releases to thesage_root
wheel and the built non-any
wheels.Same as sagemath/sage#36366