Skip to content

Commit

Permalink
pkgs/sagemath-{categories,objects,standard}: Use sage-cython-native-f…
Browse files Browse the repository at this point in the history
…ile.ini
  • Loading branch information
Matthias Koeppe committed Jan 6, 2024
1 parent c2e3342 commit 54c95d6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/pkgs/sagelib/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$SAGE_EDITABLE" = yes ]; then

if [ "$SAGE_WHEELS" = yes ]; then
# Additionally build a wheel (for use in other venvs)
cd $SAGE_PKGS/sagelib/src && time python3 -m build --no-isolation --wheel --skip-dependency-check . && sdh_store_wheel .
cd $SAGE_PKGS/sagelib/src && time python3 -m build --no-isolation --wheel --skip-dependency-check -Csetup-args="--native-file=$(pwd)/sage-cython-native-file.ini" . && sdh_store_wheel .
fi
else
# Make sure that an installed old version of sagelib in which sage is an ordinary package
Expand All @@ -76,7 +76,7 @@ else
if [ "$SAGE_WHEELS" = yes ]; then
# Use --no-build-isolation to avoid rebuilds because of dependencies:
# Compiling sage/interfaces/sagespawn.pyx because it depends on /private/var/folders/38/wnh4gf1552g_crsjnv2vmmww0000gp/T/pip-build-env-609n5985/overlay/lib/python3.10/site-packages/Cython/Includes/posix/unistd.pxd
time sdh_pip_install --no-build-isolation .
time sdh_pip_install --no-build-isolation -Csetup-args="--native-file=$(pwd)/sage-cython-native-file.ini" .
else
SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS+="mcqd,tdlib,coxeter3,sirocco,meataxe,bliss"
time python3 -u setup.py --no-user-cfg build install || exit 1
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/sagemath_objects/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ export CXX=$(echo "$CXX" | sed 's/-std=[a-z0-9+]*//g')
export CYTHON=sage-cython
export CYTHON_FOR_BUILD=sage-cython


export PIP_NO_INDEX=true
export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS"

# Do not install the wheel.
DIST_DIR="$(mktemp -d)"
python3 -m build --no-isolation --wheel --skip-dependency-check --outdir "$DIST_DIR"/dist . || sdh_die "Failure building sdist and wheel"
python3 -m build --no-isolation --wheel --skip-dependency-check -Csetup-args="--native-file=$(pwd)/sage-cython-native-file.ini" --outdir "$DIST_DIR"/dist . || sdh_die "Failure building sdist and wheel"

wheel=$(cd "$DIST_DIR" && sdh_store_wheel . >&2 && echo $wheel)
ls -l "$wheel"
1 change: 1 addition & 0 deletions pkgs/sagemath-categories/sage-cython-native-file.ini
2 changes: 2 additions & 0 deletions pkgs/sagemath-objects/sage-cython-native-file.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[binaries]
cython = 'sage-cython'
1 change: 1 addition & 0 deletions pkgs/sagemath-standard/sage-cython-native-file.ini

0 comments on commit 54c95d6

Please sign in to comment.