From 573fcfdfba04041260f8e06e54e37eb8a9f85da4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 18:26:36 -0800 Subject: [PATCH] build/make/Makefile.in: Move targets pypi-sdists, wheel, pypi-wheels here; use SPKG-sdist targets --- Makefile | 37 ------------------------------------- build/make/Makefile.in | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 393d0b62a78..257e3517bb1 100644 --- a/Makefile +++ b/Makefile @@ -80,42 +80,6 @@ download: dist: build/make/Makefile ./sage --sdist -pypi-sdists: sage_setup python_build - ./sage --sh build/pkgs/sage_conf/spkg-src - ./sage --sh build/pkgs/sage_sws2rst/spkg-src - ./sage --sh build/pkgs/sage_docbuild/spkg-src - ./sage --sh build/pkgs/sage_setup/spkg-src - ./sage --sh build/pkgs/sagelib/spkg-src - ./sage --sh build/pkgs/sagemath_objects/spkg-src - ./sage --sh build/pkgs/sagemath_categories/spkg-src - ./sage --sh build/pkgs/sagemath_environment/spkg-src - ./sage --sh build/pkgs/sagemath_repl/spkg-src - @echo "Built sdists are in upstream/" - -# Ensuring wheels are present, even for packages that may have been installed -# as editable. Until we have better uninstallation of script packages, we -# just remove the timestamps, which will lead to rebuilds of the packages. -PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories -pypi-wheels: - for a in $(PYPI_WHEEL_PACKAGES); do \ - rm -f venv/var/lib/sage/installed/$$a-*; \ - done - for a in $(PYPI_WHEEL_PACKAGES); do \ - $(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \ - done - @echo "Built wheels are in venv/var/lib/sage/wheels/" - -# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib -WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) sage_conf sagelib sage_docbuild -wheels: - for a in $(WHEEL_PACKAGES); do \ - rm -f venv/var/lib/sage/installed/$$a-*; \ - done - for a in $(WHEEL_PACKAGES); do \ - $(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \ - done - @echo "Built wheels are in venv/var/lib/sage/wheels/" - ############################################################################### # Cleaning up ############################################################################### @@ -380,7 +344,6 @@ list: @$(MAKE) --silent -f build/make/Makefile SAGE_PKGCONFIG=dummy $@ .PHONY: default build dist install micro_release \ - pypi-sdists pypi-wheels wheels \ misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \ test check testoptional testall testlong testoptionallong testallong \ ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \ diff --git a/build/make/Makefile.in b/build/make/Makefile.in index c2de6ab9892..e4957c4d481 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -128,7 +128,23 @@ PIP_PACKAGES = @SAGE_PIP_PACKAGES@ # Packages that use the 'script' package build rules SCRIPT_PACKAGES = @SAGE_SCRIPT_PACKAGES@ - +# Packages for which we build wheels for PyPI +PYPI_WHEEL_PACKAGES = \ + sage_sws2rst \ + sage_setup \ + sagemath_environment \ + sagemath_objects \ + sagemath_repl \ + sagemath_categories + +# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib +WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \ + sage_conf \ + sagelib \ + sage_docbuild + +# Packages for which build sdists for PyPI +PYPI_SDIST_PACKAGES = $(WHEEL_PACKAGES) # Generate the actual inst_ variables; for each package that is # actually built this generates a line like: @@ -198,6 +214,7 @@ SAGE_I_TARGETS = sagelib doc # Tell make not to look for files with these names: .PHONY: all all-sage all-toolchain all-build all-sageruntime \ all-start build-start base toolchain toolchain-deps base-toolchain \ + pypi-sdists pypi-wheels wheels \ sagelib \ doc doc-html doc-html-jsmath doc-html-mathjax doc-pdf \ doc-uninstall \ @@ -418,6 +435,26 @@ list-broken-packages: auditwheel_or_delocate echo >&2 "$$fix_broken_packages"; \ fi +pypi-sdists: $(PYPI_SDIST_PACKAGES:%=%-sdist) + @echo "Built sdists are in upstream/" + +# Ensuring wheels are present, even for packages that may have been installed +# as editable. Until we have better uninstallation of script packages, we +# just remove the timestamps, which will lead to rebuilds of the packages. +PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories +pypi-wheels: + for a in $(PYPI_WHEEL_PACKAGES); do \ + rm -f venv/var/lib/sage/installed/$$a-*; \ + done + $(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(PYPI_WHEEL_PACKAGES) + @echo "Built wheels are in venv/var/lib/sage/wheels/" + +wheels: + for a in $(WHEEL_PACKAGES); do \ + rm -f venv/var/lib/sage/installed/$$a-*; \ + done + $(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(WHEEL_PACKAGES) + @echo "Built wheels are in venv/var/lib/sage/wheels/" #============================================================================== # Setting SAGE_CHECK... variables