Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/sagelib: Use python-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 27, 2022
1 parent 53df659 commit 73eccaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf sagemath_objects sagemath_categories sagemath_environment sagemath_repl singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup
FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy pycygwin $(PYTHON) requests rw sage_conf sagemath_objects sagemath_categories sagemath_environment sagemath_repl singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) python_build sage_setup

----------
All lines of this file are ignored except the first.
Expand Down
10 changes: 7 additions & 3 deletions build/pkgs/sagelib/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ else
(cd "$SITEPACKAGESDIR" && rm -f sage/__init__.py)
# Likewise, we should remove the egg-link that may have been installed previously.
(cd "$SITEPACKAGESDIR" && rm -f sagemath-standard.egg-link)
# Use --no-build-isolation to avoid rebuilds because of dependencies:
# First build the sdist, then build the wheel from the sdist.
# https://pypa-build.readthedocs.io/en/latest/#python--m-build
# (Important because sagemath-objects uses MANIFEST.in for filtering.)
DIST_DIR="$(mktemp -d)"
# Use --no-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
############# FIXME: Copy from sagemath_objects spkg-install
time sdh_pip_install --no-build-isolation .
python3 -m build --no-isolation --outdir "$DIST_DIR"/dist . || sdh_die "Failure building sdist and wheel"
wheel=$(cd "$DIST_DIR" && sdh_store_and_pip_install_wheel . && echo $wheel)
fi

# Trac #33103: The temp.* directories are large after a full build.
Expand Down

0 comments on commit 73eccaa

Please sign in to comment.