Skip to content

Commit 97dacf8

Browse files
author
Release Manager
committed
Trac #34450: Standard wheel packages
We add a mechanism to install Python packages from (platform- independent) wheels instead of from source distributions. This will allow us to make packages such as `furo` and `jupyterlab` standard. Currently they are `pip` packages, as they need internet connectivity to get Javascript packages (via `nodeenv`). Here we make `furo` a standard wheel package. This is for #33833. URL: https://trac.sagemath.org/34450 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Kwankyu Lee
2 parents b37ed1c + d887d44 commit 97dacf8

File tree

14 files changed

+86
-20
lines changed

14 files changed

+86
-20
lines changed

build/bin/sage-spkg

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -451,20 +451,31 @@ echo "Setting up build directory for $PKG_NAME"
451451
cp -RLp "$PKG_SCRIPTS" "$PKG_NAME"
452452
cd "$PKG_NAME" || exit $?
453453

454-
sage-uncompress-spkg -d src "$PKG_SRC"
455-
if [ $? -ne 0 ]; then
456-
error_msg "Error: failed to extract $PKG_SRC"
457-
exit 1
458-
fi
459-
460-
echo "Finished extraction"
461-
462-
cd src
463-
if ! sage-apply-patches; then
464-
error_msg "Error applying patches"
465-
exit 1
466-
fi
467-
cd ..
454+
case "$PKG_SRC" in
455+
*.whl)
456+
# (Platform-independent) wheel
457+
# Do not extract, do not create a src directory,
458+
# just copy to dist/ and create a simple install script.
459+
mkdir -p dist
460+
cp "$PKG_SRC" dist/
461+
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
462+
;;
463+
*)
464+
# Source tarball
465+
sage-uncompress-spkg -d src "$PKG_SRC"
466+
if [ $? -ne 0 ]; then
467+
error_msg "Error: failed to extract $PKG_SRC"
468+
exit 1
469+
fi
470+
echo "Finished extraction"
471+
cd src
472+
if ! sage-apply-patches; then
473+
error_msg "Error applying patches"
474+
exit 1
475+
fi
476+
cd ..
477+
;;
478+
esac
468479

469480
##################################################################
470481
# The package has been extracted, prepare for installation

build/pkgs/furo/checksums.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tarball=furo-VERSION-py3-none-any.whl
2+
sha1=b9261dbe404cc13d399d50db0122fe48d7daeb23
3+
md5=fb331872d4d8a7d33f56aeb5df1f333f
4+
cksum=3430203884
5+
upstream_url=https://pypi.io/packages/py3/f/furo/furo-VERSION-py3-none-any.whl

build/pkgs/furo/dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(PYTHON) beautifulsoup4 sphinx pygments | $(PYTHON_TOOLCHAIN)
1+
$(PYTHON) beautifulsoup4 sphinx pygments sphinx_basic_ng | $(PYTHON_TOOLCHAIN)
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/furo/package-version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022.6.21

build/pkgs/furo/spkg-install.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd src
2+
sdh_pip_install .

build/pkgs/sphinx_basic_ng/SPKG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sphinx_basic_ng: A modern skeleton for Sphinx themes.
2+
=====================================================
3+
4+
Description
5+
-----------
6+
7+
A modern skeleton for Sphinx themes.
8+
9+
License
10+
-------
11+
12+
Upstream Contact
13+
----------------
14+
15+
https://pypi.org/project/sphinx-basic-ng/
16+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tarball=sphinx_basic_ng-VERSION.tar.gz
2+
sha1=03857ae3336e81db16599a68b826b6ed6053cd28
3+
md5=bdb1b36fd46f0b5b4f6c079e7350b860
4+
cksum=2230250036
5+
upstream_url=https://pypi.io/packages/source/s/sphinx_basic_ng/sphinx_basic_ng-VERSION.tar.gz
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$(PYTHON) sphinx | $(PYTHON_TOOLCHAIN)
2+
3+
----------
4+
All lines of this file are ignored except the first.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx-basic-ng

0 commit comments

Comments
 (0)