sagemath/sage

Install src/bin/* scripts via setup.py (scripts, console_scripts)

mkoeppe opened this issue · 9 comments

Currently the scripts in src/bin are installed by build/make/Makefile.

As part of #21507, for those scripts that should be considered part of sagelib, the installation should be done by src/setup.py instead, using the scripts and console-scripts features.

(Example, received from was: ​https://github.com/sagemathinc/smc/tree/master/src/smc_pyutil. See, in particular, the console_scripts section of setup.py: ​https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/setup.py#L58)

(Those scripts that don't belong into src/bin are moved to build/bin by #21559.
See also: #21570: Move non-scripts of src/bin/ elsewhere (and also move their install location; #21707: Split sage-env into sage-build-env and sage-env)

CC: @williamstein @vbraun @jdemeyer @embray @kiwifb @nexttime @tobihan @saraedum @dimpase @isuruf @fchapoton

Component: build

Reviewer: Dima Pasechnik

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

Description changed:

--- 
+++ 
@@ -2,6 +2,8 @@
 
 As part of #21507, for those scripts that should be considered part of `sagelib`, the installation should be done by `src/setup.py` instead, using the [scripts and console-scripts](http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html) features.
 
+(Example, [received from was](https://github.com/sagemath/sage/issues/21507#comment:14): ​https://github.com/sagemathinc/smc/tree/master/src/smc_pyutil. See, in particular, the console_scripts section of setup.py: ​https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/setup.py#L58)
+
 (Those scripts that don't belong into `src/bin` are moved to `build/bin` by #21559.)
 
 

Description changed:

--- 
+++ 
@@ -4,6 +4,6 @@
 
 (Example, [received from was](https://github.com/sagemath/sage/issues/21507#comment:14): ​https://github.com/sagemathinc/smc/tree/master/src/smc_pyutil. See, in particular, the console_scripts section of setup.py: ​https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/setup.py#L58)
 
-(Those scripts that don't belong into `src/bin` are moved to `build/bin` by #21559.)
+(Those scripts that don't belong into `src/bin` are moved to `build/bin` by #21559.
+See also:  #21570: Move non-scripts of `src/bin/` elsewhere (and also move their install location)
 
-
comment:4

+1

comment:5

Erik, Jeroen - should this be done on top of #21604 and #21600; or does it have to wait for other tickets?

comment:6

Normally this shouldn't be dependent on those tickets, and I can't think of any reason it would be. But I've come not to expect normalcy with sage.

Description changed:

--- 
+++ 
@@ -5,5 +5,5 @@
 (Example, [received from was](https://github.com/sagemath/sage/issues/21507#comment:14): ​https://github.com/sagemathinc/smc/tree/master/src/smc_pyutil. See, in particular, the console_scripts section of setup.py: ​https://github.com/sagemathinc/smc/blob/master/src/smc_pyutil/setup.py#L58)
 
 (Those scripts that don't belong into `src/bin` are moved to `build/bin` by #21559.
-See also:  #21570: Move non-scripts of `src/bin/` elsewhere (and also move their install location)
+See also:  #21570: Move non-scripts of `src/bin/` elsewhere (and also move their install location; #21707: Split sage-env into sage-build-env and sage-env)
 
comment:8

In #22731 comment 28, it is proposed to move scripts to $SAGE_LOCAL/libexec.
Could a setuptools expert comment whether setup.sh would be able to do this, or can it only install into bin (via the scripts and console_scripts features)?

comment:10

I'm taking care of this task in #21559.
The present ticket can be closed as a duplicate.

Reviewer: Dima Pasechnik