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

Commit

Permalink
build/bin/sage-dist-helpers (sdh_setup_bdist_wheel): New
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 5, 2020
1 parent a3077c7 commit c5a14a3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 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
5 changes: 1 addition & 4 deletions build/pkgs/pillow/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ if [ "$CONDA_PREFIX" != "" ]; then
fi

# Note: Avoid shared libraries inside egg files, Trac #19467
sage-python23 setup.py \
--no-user-cfg \
bdist_wheel \
--bdist-dir "$(mktemp -d)" \
sdh_setup_bdist_wheel \
build_ext \
--debug \
--disable-jpeg \
Expand Down
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 c5a14a3

Please sign in to comment.