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

Commit

Permalink
Merge branch 't/31002/public/build/bdist_wsl' into t/30315/switch_jsm…
Browse files Browse the repository at this point in the history
…ol_to_jupyter_jsmol__make_jmol_optional
  • Loading branch information
Matthias Koeppe committed Dec 8, 2020
2 parents ca088c9 + fb10429 commit e57f927
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
8 changes: 8 additions & 0 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ sdh_make_install() {
sdh_die "Error installing $PKG_NAME"
}

sdh_setup_bdist_wheel() {
mkdir -p dist
rm -f dist/*.whl
BDIST_DIR="$(mktemp -d)"
sage-python23 setup.py --no-user-cfg \
bdist_wheel --bdist-dir "$BDIST_DIR" \
"$@" || sdh_die "Error building a wheel for $PKG_NAME"
}

sdh_pip_install() {
echo "Installing $PKG_NAME"
Expand Down
6 changes: 1 addition & 5 deletions build/pkgs/gambit/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@ cd src/python
rm gambit/lib/libgambit.cpp

# pip doesn't work (https://github.com/gambitproject/gambit/issues/207)
sage-python23 setup.py --no-user-cfg bdist_wheel
if [ $? -ne 0 ]; then
echo "Error installing Python API"
exit 1
fi
sdh_setup_bdist_wheel
sdh_store_and_pip_install_wheel .
5 changes: 1 addition & 4 deletions build/pkgs/numpy/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export NUMPY_FCONFIG="config_fc --noopt --noarch"

################################################

sage-python23 setup.py \
--no-user-cfg \
bdist_wheel \
${NUMPY_FCONFIG} || sdh_die "Error building wheel for numpy"
sdh_setup_bdist_wheel ${NUMPY_FCONFIG}

sdh_store_and_pip_install_wheel .
6 changes: 2 additions & 4 deletions build/pkgs/pillow/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ if [ "$CONDA_PREFIX" != "" ]; then
fi

# Note: Avoid shared libraries inside egg files, Trac #19467
sage-python23 setup.py \
--no-user-cfg \
bdist_wheel \
sdh_setup_bdist_wheel \
build_ext \
--debug \
--disable-jpeg \
$extra_build_ext || sdh_die "Error building/installing Pillow"
$extra_build_ext

sdh_store_and_pip_install_wheel .
3 changes: 1 addition & 2 deletions build/pkgs/python_igraph/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cd src

sage-python23 setup.py bdist_wheel \
--use-pkg-config || sdh_die "Error building wheel for python_igraph"
sdh_setup_bdist_wheel --use-pkg-config

sdh_store_and_pip_install_wheel .
4 changes: 4 additions & 0 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,10 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
arguments. If ``$SAGE_DESTDIR`` is not set then the command is run
with ``$SAGE_SUDO``, if set.
- ``sdh_setup_bdist_wheel [...]``: Runs ``setup.py bdist_wheel`` with
the given arguments, as well as additional default arguments used for
installing packages into Sage.
- ``sdh_pip_install [...]``: The equivalent of running ``pip install``
with the given arguments, as well as additional default arguments used for
installing packages into Sage with pip. The last argument must be
Expand Down

0 comments on commit e57f927

Please sign in to comment.