sagemath/sage

Rename build/bin/sage-system-python to sage-bootstrap-python

mkoeppe opened this issue · 23 comments

... to indicate its purpose and identity in a clearer way.

(It has nothing to do with the python3 that configure --with-system-python3 is looking for in build/pkgs/python3/spkg-configure.m4.)

After #29355, sage-system-python is only used during configure and build:

$ git grep -i sage[-_]system[-_]python
build/bin/sage-download-file:#!/usr/bin/env sage-system-python
build/bin/sage-flock:#!/usr/bin/env sage-system-python
build/bin/sage-package:#!/usr/bin/env sage-system-python
build/bin/sage-spkg-uninstall:#!/usr/bin/env sage-system-python
build/bin/sage-uncompress-spkg:#!/usr/bin/env sage-system-python
build/pkgs/appnope/spkg-install.in:if sage-system-python -c 'from sys import *; exit(0 if platform == "darwin" else 1)'; then
build/pkgs/atlas/patches/atlas-config:#!/usr/bin/env sage-system-python
build/pkgs/atlas/spkg-install.in:exec sage-system-python spkg-install.py
build/pkgs/numpy/lapack_conf.py:#!/usr/bin/env sage-system-python
build/pkgs/openblas/spkg-check.in:if [ `sage-system-python -c "from __future__ import print_function; import platform; print(platform.architecture()[0])"` = "32bit" ]; then
build/pkgs/openblas/spkg-install.in:if [ `sage-system-python -c "from __future__ import print_function; import platform; print(platform.architecture()[0])"` = "32bit" ]; then
build/pkgs/openblas/write_pc_file.py:#!/usr/bin/env sage-system-python
build/pkgs/zn_poly/spkg-install.in:sage-system-python makemakefile.py >Makefile \
build/sage_bootstrap/flock.py:#!/usr/bin/env sage-system-python
build/setup.py:#!/usr/bin/env sage-system-python
build/setup.py:    scripts=['bin/sage-package', 'bin/sage-download-file', 'bin/sage-system-python'],
build/test/runnable.py:#!/usr/bin/env sage-system-python
configure.ac:if SAGE_SYSTEM_PYTHON=$(build/bin/sage-system-python -c "import sys; print(sys.executable)"); then
configure.ac:    AC_MSG_RESULT([$SAGE_SYSTEM_PYTHON])
src/doc/en/developer/packaging.rst:        exec sage-system-python spkg-install.py
src/doc/en/developer/packaging.rst:   In more detail: ``sage-system-python`` runs the version of Python

Depends on #29355

CC: @dimpase @jhpalmieri @seblabbe @orlitzky

Component: build

Author: Matthias Koeppe

Branch: 3749fe1

Reviewer: Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/30627

Dependencies: #29355

Changed dependencies from #29355 to #29355, #30008

Description changed:

--- 
+++ 
@@ -1,2 +1,29 @@
 ... to indicate its purpose and identity in a clearer way.
 
+After #29355, it is only used during configure and build:
+
+```
+$ git grep -i sage[-_]system[-_]python
+build/bin/sage-download-file:#!/usr/bin/env sage-system-python
+build/bin/sage-flock:#!/usr/bin/env sage-system-python
+build/bin/sage-package:#!/usr/bin/env sage-system-python
+build/bin/sage-spkg-uninstall:#!/usr/bin/env sage-system-python
+build/bin/sage-uncompress-spkg:#!/usr/bin/env sage-system-python
+build/pkgs/appnope/spkg-install.in:if sage-system-python -c 'from sys import *; exit(0 if platform == "darwin" else 1)'; then
+build/pkgs/atlas/patches/atlas-config:#!/usr/bin/env sage-system-python
+build/pkgs/atlas/spkg-install.in:exec sage-system-python spkg-install.py
+build/pkgs/numpy/lapack_conf.py:#!/usr/bin/env sage-system-python
+build/pkgs/openblas/spkg-check.in:if [ `sage-system-python -c "from __future__ import print_function; import platform; print(platform.architecture()[0])"` = "32bit" ]; then
+build/pkgs/openblas/spkg-install.in:if [ `sage-system-python -c "from __future__ import print_function; import platform; print(platform.architecture()[0])"` = "32bit" ]; then
+build/pkgs/openblas/write_pc_file.py:#!/usr/bin/env sage-system-python
+build/pkgs/zn_poly/spkg-install.in:sage-system-python makemakefile.py >Makefile \
+build/sage_bootstrap/flock.py:#!/usr/bin/env sage-system-python
+build/setup.py:#!/usr/bin/env sage-system-python
+build/setup.py:    scripts=['bin/sage-package', 'bin/sage-download-file', 'bin/sage-system-python'],
+build/test/runnable.py:#!/usr/bin/env sage-system-python
+configure.ac:if SAGE_SYSTEM_PYTHON=$(build/bin/sage-system-python -c "import sys; print(sys.executable)"); then
+configure.ac:    AC_MSG_RESULT([$SAGE_SYSTEM_PYTHON])
+src/doc/en/developer/packaging.rst:        exec sage-system-python spkg-install.py
+src/doc/en/developer/packaging.rst:   In more detail: ``sage-system-python`` runs the version of Python
+```
+

Description changed:

--- 
+++ 
@@ -1,6 +1,8 @@
-... to indicate its purpose and identity in a clearer way.
+... to indicate its purpose and identity in a clearer way.  
 
-After #29355, it is only used during configure and build:
+(It has nothing to do with the `python3` that `configure --with-system-python3` is looking for in `build/pkgs/python3/spkg-configure.m4`.)
+
+After #29355, `sage-system-python` is only used during configure and build:
 
 ```
 $ git grep -i sage[-_]system[-_]python

Author: Matthias Koeppe

Commit: 457b29f

New commits:

063a0afsrc/bin/sage-pypkg-location: Remove
f6dcc14src/bin/sage*: Do not use sage-system-python
6ba8f79Merge branch 't/29355/sagelib_s_scripts_in_src_bin_should_not_use_build_bin_sage_system_python__remove_sage_pypkg_location' into t/30627/rename_build_bin_sage_system_python_to_sage_bootstrap_python
9403629build/bin/sage-system-python: Work around LC_ALL=C
3b4cdeeMerge branch 't/30008/after__30053__sphinx_3_1_2_does_not_build_on_ubuntu__trusty_xenial_bionic___debian_jessie__centos_7__again_' into t/30627/rename_build_bin_sage_system_python_to_sage_bootstrap_python
457b29fRename build/bin/sage-system-python to sage-bootstrap-python

Branch pushed to git repo; I updated commit sha1. New commits:

2d8d2d8build/bin/sage-bootstrap-python: Update comments

Changed commit from 457b29f to 2d8d2d8

Branch pushed to git repo; I updated commit sha1. New commits:

f76082aMerge tag '9.2.beta13' into t/29355/sagelib_s_scripts_in_src_bin_should_not_use_build_bin_sage_system_python__remove_sage_pypkg_location
ab72437build/bin/sage-build-num-threads: Copy from src/bin/sage-num-threads.py, simplify src/bin/sage-num-threads.py
1e797a1build/make/install: Set SAGE_NUM_THREADS, SAGE_NUM_THREADS_PARALLEL using sage-build-num-threads
850f97csrc/bin/sage-env: If SAGE_NUM_THREADS, SAGE_NUM_THREADS_PARALLEL are set already, do not call sage-num-threads.py to set them
a8ef461Merge branch 't/29355/sagelib_s_scripts_in_src_bin_should_not_use_build_bin_sage_system_python__remove_sage_pypkg_location' into t/30627/rename_build_bin_sage_system_python_to_sage_bootstrap_python
ff0dbc6build/sage_bootstrap/uncompress/tar_file.py: Fix encoding to utf-8
08f5cfdMerge branch 't/30008/after__30053__sphinx_3_1_2_does_not_build_on_ubuntu__trusty_xenial_bionic___debian_jessie__centos_7__again_' into t/30627/rename_build_bin_sage_system_python_to_sage_bootstrap_python

Changed commit from 2d8d2d8 to 08f5cfd

Changed dependencies from #29355, #30008 to #29355

comment:13

It works for me.

My only comments would be that the commit history of the proposed branch is quite ugly. A rebase on top of #29355 or on top of 9.3.beta0 won't hurt. Or maybe that branch serves already as a dependency for other branches?

Anyway, please change the status to positive review on my behalf if you have good reason to keep the commit history as it is, or update the branch and I will come back to it after the elections.

Reviewer: Sébastien Labbé

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

ef1444aMerge tag '9.2.beta14' into t/29355/sagelib_s_scripts_in_src_bin_should_not_use_build_bin_sage_system_python__remove_sage_pypkg_location
f4a75a9Merge tag '9.3.beta0' into t/29355/sagelib_s_scripts_in_src_bin_should_not_use_build_bin_sage_system_python__remove_sage_pypkg_location
a4e757ebuild/pkgs/sagelib/src/setup.py: Remove bin/sage-pypkg-location
3749fe1Rename build/bin/sage-system-python to sage-bootstrap-python

Changed commit from 08f5cfd to 3749fe1

comment:15

I have squashed/rebased it on top of #29355.

comment:16

Great, thank you. Much easier to see what is happening.

comment:18

Thanks!

comment:20

Follow-up: #30995

Changed commit from 3749fe1 to none