From 6c9dffebd1e999be2ea752466085fb28ca1022c2 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Wed, 20 Apr 2016 13:28:22 +0200 Subject: [PATCH 01/13] Use pip to install most Python-based dependencies; see http://trac.sagemath.org/ticket/20218 This adds a $PIP_INSTALL variable exported from build/make/install so that all spkg-install scripts can consistently use pip with the same default options (specifically ensuring that packages are always reinstalled, and that no dependencies from the internet are used). This includes some additional tweaks to spkg-installs, most notably in several cases removing `rm -rf` commands to "uninstall" previous installations of those packages. This is not always 100% reliable, and pip will uninstall previous installations anyways (and even restore them if building the new version of the package fails). Some spkg-installs also broke the `setup.py` calls into separate `build` and `install` commands. There's nothing wrong with this, but pip runs the `setup.py install` command runs the `build` command implictly anyways, and there's no neat way to break up the steps with pip. One other notable change is that in each package's dependencies files `pip` is included (and sometimes `setuptools` though it's redundant as a dependency of pip). However, it's include as an order-only dependency since it's very rare that updating the pip version will in any way affect how a package must be installed. It will be useful to be able to update pip regularly without rebuilding already installed packages. --- build/make/install | 11 +++++++++++ build/pkgs/backports_abc/dependencies | 2 +- build/pkgs/backports_abc/spkg-install | 3 ++- .../backports_ssl_match_hostname/dependencies | 2 +- .../backports_ssl_match_hostname/spkg-install | 3 ++- build/pkgs/certifi/dependencies | 2 +- build/pkgs/certifi/spkg-install | 3 ++- build/pkgs/cvxopt/dependencies | 2 +- build/pkgs/cvxopt/spkg-install | 8 +------- build/pkgs/cycler/dependencies | 2 +- build/pkgs/cycler/spkg-install | 2 +- build/pkgs/cython/dependencies | 2 +- build/pkgs/cython/spkg-install | 5 +---- build/pkgs/dateutil/dependencies | 2 +- build/pkgs/dateutil/spkg-install | 2 +- build/pkgs/decorator/dependencies | 2 +- build/pkgs/decorator/spkg-install | 2 +- build/pkgs/docutils/dependencies | 2 +- build/pkgs/docutils/spkg-install | 6 ++---- build/pkgs/dot2tex/dependencies | 2 +- build/pkgs/dot2tex/spkg-install | 11 +---------- build/pkgs/functools32/dependencies | 2 +- build/pkgs/functools32/spkg-install | 3 ++- build/pkgs/giacpy/dependencies | 2 +- build/pkgs/giacpy/spkg-install | 9 +-------- build/pkgs/git_trac/dependencies | 2 +- build/pkgs/git_trac/spkg-install | 3 ++- build/pkgs/ipykernel/dependencies | 2 +- build/pkgs/ipykernel/spkg-install | 2 +- build/pkgs/ipython/dependencies | 2 +- build/pkgs/ipython/spkg-install | 14 +------------- build/pkgs/ipython_genutils/dependencies | 2 +- build/pkgs/ipython_genutils/spkg-install | 2 +- build/pkgs/ipywidgets/dependencies | 2 +- build/pkgs/ipywidgets/spkg-install | 2 +- build/pkgs/jinja2/dependencies | 2 +- build/pkgs/jinja2/spkg-install | 6 +----- build/pkgs/jsonschema/dependencies | 2 +- build/pkgs/jsonschema/spkg-install | 3 ++- build/pkgs/jupyter_client/dependencies | 2 +- build/pkgs/jupyter_client/spkg-install | 2 +- build/pkgs/jupyter_core/dependencies | 2 +- build/pkgs/jupyter_core/spkg-install | 2 +- build/pkgs/markupsafe/dependencies | 2 +- build/pkgs/markupsafe/spkg-install | 3 ++- build/pkgs/matplotlib/dependencies | 2 +- build/pkgs/matplotlib/spkg-install | 12 ++---------- build/pkgs/mistune/dependencies | 2 +- build/pkgs/mistune/spkg-install | 2 +- build/pkgs/mpmath/dependencies | 2 +- build/pkgs/mpmath/spkg-install | 8 +------- build/pkgs/nbconvert/dependencies | 2 +- build/pkgs/nbconvert/spkg-install | 2 +- build/pkgs/nbformat/dependencies | 2 +- build/pkgs/nbformat/spkg-install | 2 +- build/pkgs/networkx/dependencies | 2 +- build/pkgs/networkx/spkg-install | 7 +------ build/pkgs/nose/dependencies | 2 +- build/pkgs/nose/spkg-install | 13 +------------ build/pkgs/notebook/dependencies | 2 +- build/pkgs/notebook/spkg-install | 3 +-- build/pkgs/numpy/dependencies | 2 +- build/pkgs/numpy/spkg-install | 10 ++++------ build/pkgs/ore_algebra/dependencies | 2 +- build/pkgs/ore_algebra/spkg-install | 4 ++-- build/pkgs/pari_jupyter/dependencies | 2 +- build/pkgs/pari_jupyter/spkg-install | 2 +- build/pkgs/pathpy/dependencies | 2 +- build/pkgs/pathpy/spkg-install | 2 +- build/pkgs/pexpect/dependencies | 2 +- build/pkgs/pexpect/spkg-install | 6 +----- build/pkgs/pickleshare/dependencies | 2 +- build/pkgs/pickleshare/spkg-install | 2 +- build/pkgs/pip/spkg-install | 5 ++++- build/pkgs/pkgconfig/dependencies | 2 +- build/pkgs/pkgconfig/spkg-install | 2 +- build/pkgs/ptyprocess/dependencies | 2 +- build/pkgs/ptyprocess/spkg-install | 2 +- build/pkgs/pycrypto/dependencies | 2 +- build/pkgs/pycrypto/spkg-install | 3 ++- build/pkgs/pygments/dependencies | 2 +- build/pkgs/pygments/spkg-install | 6 ++---- build/pkgs/pyparsing/dependencies | 2 +- build/pkgs/pyparsing/spkg-install | 3 ++- build/pkgs/python_igraph/dependencies | 2 +- build/pkgs/python_igraph/spkg-install | 7 +------ build/pkgs/pyzmq/dependencies | 2 +- build/pkgs/pyzmq/spkg-install | 4 +--- build/pkgs/rpy2/dependencies | 2 +- build/pkgs/rpy2/spkg-install | 2 +- build/pkgs/scipy/dependencies | 2 +- build/pkgs/scipy/spkg-install | 14 ++------------ build/pkgs/scons/spkg-install | 1 + build/pkgs/setuptools/spkg-install | 5 ++++- build/pkgs/setuptools_scm/dependencies | 2 +- build/pkgs/setuptools_scm/spkg-install | 2 +- build/pkgs/simplegeneric/dependencies | 2 +- build/pkgs/simplegeneric/spkg-install | 2 +- build/pkgs/singledispatch/dependencies | 2 +- build/pkgs/singledispatch/spkg-install | 3 ++- build/pkgs/six/dependencies | 2 +- build/pkgs/six/spkg-install | 3 ++- build/pkgs/sphinx/dependencies | 2 +- build/pkgs/sphinx/spkg-install | 13 +------------ build/pkgs/sympy/dependencies | 2 +- build/pkgs/sympy/spkg-install | 15 +-------------- build/pkgs/tornado/dependencies | 2 +- build/pkgs/tornado/spkg-install | 2 +- build/pkgs/traitlets/dependencies | 2 +- build/pkgs/traitlets/spkg-install | 2 +- build/pkgs/vcversioner/dependencies | 2 +- build/pkgs/vcversioner/spkg-install | 3 ++- 112 files changed, 148 insertions(+), 241 deletions(-) diff --git a/build/make/install b/build/make/install index c0ab28194e5..6c506a4d786 100755 --- a/build/make/install +++ b/build/make/install @@ -22,6 +22,17 @@ export PATH="$SAGE_ROOT/build/bin:$SAGE_SRC/bin:$SAGE_LOCAL/bin:$PATH" export PYTHONPATH="$SAGE_LOCAL" +# Default arguments for all packages insalled with `pip install` +# env PYTHONPATH=. : Sage's Python unconditionally removes . from sys.path +# which can break several packages' installation +# --ignore-installed : Force pip to re-install package even if it thinks it's +# already installed (for which it sometimes gets false +# positives for partially-installed packages). +# --no-deps : Don't install runtime dependencies from PyPI. +# --no-index : Don't even look at any package index--this also disables +# pip's version self-check +export PIP_INSTALL="env PYTHONPATH=. pip install --ignore-installed --no-deps --no-index" + # Storing the start time of the build process. The time is stored in # seconds since 1970-01-01 in a hidden file called # "SAGE_ROOT/.BUILDSTART". See ticket #6744. diff --git a/build/pkgs/backports_abc/dependencies b/build/pkgs/backports_abc/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/backports_abc/dependencies +++ b/build/pkgs/backports_abc/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/backports_abc/spkg-install b/build/pkgs/backports_abc/spkg-install index 6255967da12..31c16661b2e 100755 --- a/build/pkgs/backports_abc/spkg-install +++ b/build/pkgs/backports_abc/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing backports_abc ... exiting" exit 1 diff --git a/build/pkgs/backports_ssl_match_hostname/dependencies b/build/pkgs/backports_ssl_match_hostname/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/backports_ssl_match_hostname/dependencies +++ b/build/pkgs/backports_ssl_match_hostname/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/backports_ssl_match_hostname/spkg-install b/build/pkgs/backports_ssl_match_hostname/spkg-install index 4a5b463c4d5..ee38690b97a 100755 --- a/build/pkgs/backports_ssl_match_hostname/spkg-install +++ b/build/pkgs/backports_ssl_match_hostname/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing backports.ssl_match_hostname ... exiting" exit 1 diff --git a/build/pkgs/certifi/dependencies b/build/pkgs/certifi/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/certifi/dependencies +++ b/build/pkgs/certifi/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/certifi/spkg-install b/build/pkgs/certifi/spkg-install index 8dcb7725688..4d63bf368c6 100755 --- a/build/pkgs/certifi/spkg-install +++ b/build/pkgs/certifi/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing certifi ... exiting" exit 1 diff --git a/build/pkgs/cvxopt/dependencies b/build/pkgs/cvxopt/dependencies index b87a32f09e4..40d5b939804 100644 --- a/build/pkgs/cvxopt/dependencies +++ b/build/pkgs/cvxopt/dependencies @@ -1,4 +1,4 @@ -numpy $(BLAS) cephes gsl glpk | pkgconfig matplotlib +numpy $(BLAS) cephes gsl glpk | pkgconfig pip matplotlib matplotlib is needed to test cvxopt (i.e., if SAGE_CHECK=yes). See #12742. diff --git a/build/pkgs/cvxopt/spkg-install b/build/pkgs/cvxopt/spkg-install index f97739a9bbe..1751581663c 100755 --- a/build/pkgs/cvxopt/spkg-install +++ b/build/pkgs/cvxopt/spkg-install @@ -37,14 +37,8 @@ if [ "$UNAME" = FreeBSD ]; then export CPPFLAGS="$CPPFLAGS -I$SAGE_LOCAL/include" fi -# Delete old version -site_packages="$SAGE_LOCAL/lib/python/site-packages" -rm -rf "$site_packages"/cvxopt "$site_packages"/cvxopt-*.egg* +$PIP_INSTALL . -# Note: Avoid shared libraries inside egg files, Trac #19467 -python setup.py install \ - --single-version-externally-managed \ - --record /dev/null if [ $? -ne 0 ]; then echo "Error building/installing cvxopt" exit 1 diff --git a/build/pkgs/cycler/dependencies b/build/pkgs/cycler/dependencies index d25c35a3142..d7188c0a5cd 100644 --- a/build/pkgs/cycler/dependencies +++ b/build/pkgs/cycler/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools six +$(PYTHON) six | setuptools pip ---------- All lines of this file are ignored except the first. It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/cycler/spkg-install b/build/pkgs/cycler/spkg-install index a536f3232ac..3fe96387576 100644 --- a/build/pkgs/cycler/spkg-install +++ b/build/pkgs/cycler/spkg-install @@ -8,7 +8,7 @@ fi cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing cycler ... exiting" exit 1 diff --git a/build/pkgs/cython/dependencies b/build/pkgs/cython/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/cython/dependencies +++ b/build/pkgs/cython/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/cython/spkg-install b/build/pkgs/cython/spkg-install index 93f5756b54d..fd37e87d14d 100755 --- a/build/pkgs/cython/spkg-install +++ b/build/pkgs/cython/spkg-install @@ -19,10 +19,7 @@ for patch in ../patches/*.patch; do fi done -# Remove old copies of Cython -rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/Cython* - -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing Cython" diff --git a/build/pkgs/dateutil/dependencies b/build/pkgs/dateutil/dependencies index 93d4612e17e..9a1ab0b0247 100644 --- a/build/pkgs/dateutil/dependencies +++ b/build/pkgs/dateutil/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) six setuptools +$(PYTHON) six | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/dateutil/spkg-install b/build/pkgs/dateutil/spkg-install index 05fd2118aae..3270167e0d7 100755 --- a/build/pkgs/dateutil/spkg-install +++ b/build/pkgs/dateutil/spkg-install @@ -8,7 +8,7 @@ fi cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing dateutil ... exiting" exit 1 diff --git a/build/pkgs/decorator/dependencies b/build/pkgs/decorator/dependencies index ae35f4f0477..2573414ce8a 100644 --- a/build/pkgs/decorator/dependencies +++ b/build/pkgs/decorator/dependencies @@ -1,4 +1,4 @@ -setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/decorator/spkg-install b/build/pkgs/decorator/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/decorator/spkg-install +++ b/build/pkgs/decorator/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/docutils/dependencies b/build/pkgs/docutils/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/docutils/dependencies +++ b/build/pkgs/docutils/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/docutils/spkg-install b/build/pkgs/docutils/spkg-install index a6bf40db945..42a2e155cbf 100755 --- a/build/pkgs/docutils/spkg-install +++ b/build/pkgs/docutils/spkg-install @@ -6,13 +6,11 @@ if [ "$SAGE_LOCAL" = "" ]; then exit 1 fi -#Remove the old version -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/docutils* - #Install new version cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing docutils." exit 1 diff --git a/build/pkgs/dot2tex/dependencies b/build/pkgs/dot2tex/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/dot2tex/dependencies +++ b/build/pkgs/dot2tex/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/dot2tex/spkg-install b/build/pkgs/dot2tex/spkg-install index 7c09bc6dd7f..243279b77e1 100755 --- a/build/pkgs/dot2tex/spkg-install +++ b/build/pkgs/dot2tex/spkg-install @@ -6,10 +6,6 @@ if [ -z "$SAGE_LOCAL" ]; then exit 1 fi -# Delete any old version or setup.py refuses to overwrite it -rm -rf "$SAGE_LOCAL/lib/python/site-packages/dot2tex" - -ls -al cd src for patch in ../patches/*.patch; do @@ -21,13 +17,8 @@ for patch in ../patches/*.patch; do fi done -python setup.py build -if [ $? -ne 0 ]; then - echo >&2 "Error building dot2tex." - exit 1 -fi +$PIP_INSTALL . -python setup.py install if [ $? -ne 0 ]; then echo >&2 "Error installing dot2tex." exit 1 diff --git a/build/pkgs/functools32/dependencies b/build/pkgs/functools32/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/functools32/dependencies +++ b/build/pkgs/functools32/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/functools32/spkg-install b/build/pkgs/functools32/spkg-install index c88abf870df..aaca01e55e6 100755 --- a/build/pkgs/functools32/spkg-install +++ b/build/pkgs/functools32/spkg-install @@ -13,7 +13,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing functools32 ... exiting" exit 1 diff --git a/build/pkgs/giacpy/dependencies b/build/pkgs/giacpy/dependencies index ca9f5905e73..dc79dd5cebc 100644 --- a/build/pkgs/giacpy/dependencies +++ b/build/pkgs/giacpy/dependencies @@ -1,4 +1,4 @@ -cython giac cysignals | sympy maxima +$(PYTHON) cython giac cysignals | pip sympy maxima The doctest suite (SAGE_CHECK=yes) also uses Sympy and Maxima ---------- diff --git a/build/pkgs/giacpy/spkg-install b/build/pkgs/giacpy/spkg-install index 496a406837f..dee560ec230 100755 --- a/build/pkgs/giacpy/spkg-install +++ b/build/pkgs/giacpy/spkg-install @@ -13,14 +13,7 @@ fi cd src - -# It is very important that we have SAGE_LOCAL set, otherwise this -# might potentially delete stuff in /lib -echo "Deleting $SAGE_LOCAL/lib/python/site-packages/giacpy*" -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/giacpy* - - -sage setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then exit 1 diff --git a/build/pkgs/git_trac/dependencies b/build/pkgs/git_trac/dependencies index 304d0c987a2..2573414ce8a 100644 --- a/build/pkgs/git_trac/dependencies +++ b/build/pkgs/git_trac/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/git_trac/spkg-install b/build/pkgs/git_trac/spkg-install index 3d4782ac29d..5b7eb5e1419 100755 --- a/build/pkgs/git_trac/spkg-install +++ b/build/pkgs/git_trac/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo >&2 "Error installing git-trac, exiting." exit 1 diff --git a/build/pkgs/ipykernel/dependencies b/build/pkgs/ipykernel/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/ipykernel/dependencies +++ b/build/pkgs/ipykernel/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ipykernel/spkg-install b/build/pkgs/ipykernel/spkg-install index 1836e0e425b..b8d6730d1db 100755 --- a/build/pkgs/ipykernel/spkg-install +++ b/build/pkgs/ipykernel/spkg-install @@ -11,4 +11,4 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/ipython/dependencies b/build/pkgs/ipython/dependencies index a2d05555a7d..5f6e1885d08 100644 --- a/build/pkgs/ipython/dependencies +++ b/build/pkgs/ipython/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | backports_shutil_get_terminal_size wcwidth prompt_toolkit +$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | pip backports_shutil_get_terminal_size wcwidth prompt_toolkit ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ipython/spkg-install b/build/pkgs/ipython/spkg-install index bdf8bc0750b..5dc33c93fd1 100755 --- a/build/pkgs/ipython/spkg-install +++ b/build/pkgs/ipython/spkg-install @@ -21,20 +21,8 @@ for patch in ../patches/*.patch; do fi done -python setup.py build -if [ $? -ne 0 ]; then - echo >&2 "Error building IPython." - exit 1 -fi - -echo "Removing old version of IPython..." -rm -rf "$SAGE_LOCAL/lib/python/site-packages/IPython" -if [ $? -ne 0 ]; then - echo >&2 "Error deleting previous version" - exit 1 -fi +$PIP_INSTALL . -python setup.py install if [ $? -ne 0 ]; then echo >&2 "Error installing IPython" exit 1 diff --git a/build/pkgs/ipython_genutils/dependencies b/build/pkgs/ipython_genutils/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/ipython_genutils/dependencies +++ b/build/pkgs/ipython_genutils/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ipython_genutils/spkg-install b/build/pkgs/ipython_genutils/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/ipython_genutils/spkg-install +++ b/build/pkgs/ipython_genutils/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/ipywidgets/dependencies b/build/pkgs/ipywidgets/dependencies index f98021feeb4..a254e5c7c4e 100644 --- a/build/pkgs/ipywidgets/dependencies +++ b/build/pkgs/ipywidgets/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) widgetsnbextension +$(PYTHON) widgetsnbextension | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ipywidgets/spkg-install b/build/pkgs/ipywidgets/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/ipywidgets/spkg-install +++ b/build/pkgs/ipywidgets/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/jinja2/dependencies b/build/pkgs/jinja2/dependencies index 143cfbd7264..4c96a0f18f3 100644 --- a/build/pkgs/jinja2/dependencies +++ b/build/pkgs/jinja2/dependencies @@ -1,4 +1,4 @@ -markupsafe setuptools docutils +$(PYTHON) markupsafe docutils | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jinja2/spkg-install b/build/pkgs/jinja2/spkg-install index 95a95aceaee..14b77cfe40e 100755 --- a/build/pkgs/jinja2/spkg-install +++ b/build/pkgs/jinja2/spkg-install @@ -13,14 +13,10 @@ success() { fi } -# Remove old versions of Jinja2 -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Jinja2-* -success 'Error deleting previous version(s) of Jinja2' - # Install new version cd src -python setup.py install +$PIP_INSTALL . success 'Error installing Jinja2' ### The Jinja2 docs use Sphinx which requires Jinja2... do not build! diff --git a/build/pkgs/jsonschema/dependencies b/build/pkgs/jsonschema/dependencies index 3b4afcd7779..c95949f63bb 100644 --- a/build/pkgs/jsonschema/dependencies +++ b/build/pkgs/jsonschema/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools vcversioner functools32 +$(PYTHON) vcversioner functools32 | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jsonschema/spkg-install b/build/pkgs/jsonschema/spkg-install index 0f46088d4af..de9d16eac6b 100755 --- a/build/pkgs/jsonschema/spkg-install +++ b/build/pkgs/jsonschema/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing jsonschema ... exiting" exit 1 diff --git a/build/pkgs/jupyter_client/dependencies b/build/pkgs/jupyter_client/dependencies index 02751254b1d..17f6a9dd72a 100644 --- a/build/pkgs/jupyter_client/dependencies +++ b/build/pkgs/jupyter_client/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) jupyter_core +$(PYTHON) jupyter_core | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jupyter_client/spkg-install b/build/pkgs/jupyter_client/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/jupyter_client/spkg-install +++ b/build/pkgs/jupyter_client/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/jupyter_core/dependencies b/build/pkgs/jupyter_core/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/jupyter_core/dependencies +++ b/build/pkgs/jupyter_core/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jupyter_core/spkg-install b/build/pkgs/jupyter_core/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/jupyter_core/spkg-install +++ b/build/pkgs/jupyter_core/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/markupsafe/dependencies b/build/pkgs/markupsafe/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/markupsafe/dependencies +++ b/build/pkgs/markupsafe/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/markupsafe/spkg-install b/build/pkgs/markupsafe/spkg-install index f0ac21a8211..19b7aa34bd7 100755 --- a/build/pkgs/markupsafe/spkg-install +++ b/build/pkgs/markupsafe/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing markupsafe ... exiting" exit 1 diff --git a/build/pkgs/matplotlib/dependencies b/build/pkgs/matplotlib/dependencies index 42b838e8213..b9b70d80b49 100644 --- a/build/pkgs/matplotlib/dependencies +++ b/build/pkgs/matplotlib/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) numpy freetype libpng dateutil pyparsing tornado six cycler | pytz setuptools +$(PYTHON) numpy freetype libpng dateutil pyparsing tornado six cycler | setuptools pip pytz ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/matplotlib/spkg-install b/build/pkgs/matplotlib/spkg-install index e3c8c5bd917..8e7f248a9b4 100755 --- a/build/pkgs/matplotlib/spkg-install +++ b/build/pkgs/matplotlib/spkg-install @@ -27,17 +27,9 @@ for patch in ../patches/*.patch; do fi done -# Now build -python setup.py build -if [ $? -ne 0 ]; then - echo "Error building matplotlib package." - exit 1 -fi - -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/matplotlib - # Finally install -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing matplotlib package." exit 1 diff --git a/build/pkgs/mistune/dependencies b/build/pkgs/mistune/dependencies index 8caaa24b86f..b078da4ff6a 100644 --- a/build/pkgs/mistune/dependencies +++ b/build/pkgs/mistune/dependencies @@ -1,4 +1,4 @@ -setuptools cython +$(PYTHON) cython | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/mistune/spkg-install b/build/pkgs/mistune/spkg-install index bb4e7d3a143..8c4e1ec171c 100755 --- a/build/pkgs/mistune/spkg-install +++ b/build/pkgs/mistune/spkg-install @@ -8,7 +8,7 @@ fi cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing mistune ... exiting" exit 1 diff --git a/build/pkgs/mpmath/dependencies b/build/pkgs/mpmath/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/mpmath/dependencies +++ b/build/pkgs/mpmath/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/mpmath/spkg-install b/build/pkgs/mpmath/spkg-install index 1ce15960504..605cb4f5bea 100755 --- a/build/pkgs/mpmath/spkg-install +++ b/build/pkgs/mpmath/spkg-install @@ -6,12 +6,6 @@ if [ "$SAGE_LOCAL" = "" ]; then exit 1 fi -# We need to delete the old path, so that there are no leftovers from the -# previous installation, otherwise mpmath could get broken (for example by -# importing some local files instead of the standard library ones...) -echo "Deleting $SAGE_LOCAL/lib/python/site-packages/mpmath*" -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/mpmath* - cd src/ -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/nbconvert/dependencies b/build/pkgs/nbconvert/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/nbconvert/dependencies +++ b/build/pkgs/nbconvert/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/nbconvert/spkg-install b/build/pkgs/nbconvert/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/nbconvert/spkg-install +++ b/build/pkgs/nbconvert/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/nbformat/dependencies b/build/pkgs/nbformat/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/nbformat/dependencies +++ b/build/pkgs/nbformat/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/nbformat/spkg-install b/build/pkgs/nbformat/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/nbformat/spkg-install +++ b/build/pkgs/nbformat/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/networkx/dependencies b/build/pkgs/networkx/dependencies index d3e1d781429..72dd898b463 100644 --- a/build/pkgs/networkx/dependencies +++ b/build/pkgs/networkx/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) decorator +$(PYTHON) decorator | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/networkx/spkg-install b/build/pkgs/networkx/spkg-install index 5cd75ee5791..d20eb4f50da 100755 --- a/build/pkgs/networkx/spkg-install +++ b/build/pkgs/networkx/spkg-install @@ -8,11 +8,6 @@ fi export MAKE=make -echo "Deleting old networkX installs" -rm -rf "$SAGE_LOCAL"/lib/python/networkx* -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/networkx* -rm -rf "$SAGE_LOCAL"/spkg/network* - cd src -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/nose/dependencies b/build/pkgs/nose/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/nose/dependencies +++ b/build/pkgs/nose/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/nose/spkg-install b/build/pkgs/nose/spkg-install index e7b812cdbdf..aecc703595e 100755 --- a/build/pkgs/nose/spkg-install +++ b/build/pkgs/nose/spkg-install @@ -18,19 +18,8 @@ CUR=`pwd` cd src -# Build new version -echo "Building nose..." -python setup.py build -success 'Error building nose' -echo - -echo "Removing old version of nose..." -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Nose-* -success 'Error deleting previous version' -echo - # Install new version echo "Installing nose..." -python setup.py install +$PIP_INSTALL . success 'Error installing nose' echo diff --git a/build/pkgs/notebook/dependencies b/build/pkgs/notebook/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/notebook/dependencies +++ b/build/pkgs/notebook/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/notebook/spkg-install b/build/pkgs/notebook/spkg-install index a42c3ed659d..cba1314b91d 100755 --- a/build/pkgs/notebook/spkg-install +++ b/build/pkgs/notebook/spkg-install @@ -11,8 +11,7 @@ for patch in ../patches/*.patch; do fi done - -python setup.py install +$PIP_INSTALL . # Install the Jupyter notebook configuration ETC_JUPYTER="$SAGE_ETC"/jupyter diff --git a/build/pkgs/numpy/dependencies b/build/pkgs/numpy/dependencies index 9ec26429455..a918e9080c5 100644 --- a/build/pkgs/numpy/dependencies +++ b/build/pkgs/numpy/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) $(BLAS) | pkgconfig +$(PYTHON) $(BLAS) | setuptools pip pkgconfig ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/numpy/spkg-install b/build/pkgs/numpy/spkg-install index 40b8b5c81d3..ee9666edb98 100755 --- a/build/pkgs/numpy/spkg-install +++ b/build/pkgs/numpy/spkg-install @@ -54,15 +54,13 @@ export NUMPY_FCONFIG="config_fc --noopt --noarch" ################################################ -rm -rf "$SAGE_LOCAL/lib/python/site-packages/numpy" - # Program around a bug in SciPY's distutils. unset CFLAGS -python setup.py install \ - --single-version-externally-managed \ - --record /dev/null \ - ${NUMPY_FCONFIG} +# Split NUMPY_FCONFIG into --global-option flags for pip +PIP_INSTALL_FLAGS=$(echo $NUMPY_FCONFIG | sed -e 's/\(\S*\)/--global-option \1/g') + +$PIP_INSTALL $PIP_INSTALL_FLAGS . # Touch all includes such that dependency checking works properly: # the timestamp of the includes should be *now*, not the time when diff --git a/build/pkgs/ore_algebra/dependencies b/build/pkgs/ore_algebra/dependencies index 304d0c987a2..2573414ce8a 100644 --- a/build/pkgs/ore_algebra/dependencies +++ b/build/pkgs/ore_algebra/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ore_algebra/spkg-install b/build/pkgs/ore_algebra/spkg-install index 93676fbc539..1412cae9952 100755 --- a/build/pkgs/ore_algebra/spkg-install +++ b/build/pkgs/ore_algebra/spkg-install @@ -7,9 +7,9 @@ if [ -z "$SAGE_LOCAL" ]; then fi cd src -export PYTHONPATH="." echo "building ore_algebra" -python setup.py install + +$PIP_INSTALL . if [ $? -ne 0 ]; then echo >&2 "Error building ore_algebra" diff --git a/build/pkgs/pari_jupyter/dependencies b/build/pkgs/pari_jupyter/dependencies index dea225c2717..516d7089387 100644 --- a/build/pkgs/pari_jupyter/dependencies +++ b/build/pkgs/pari_jupyter/dependencies @@ -1 +1 @@ -pari jupyter_core | cython +$(PYTHON) pari jupyter_core | pip cython diff --git a/build/pkgs/pari_jupyter/spkg-install b/build/pkgs/pari_jupyter/spkg-install index 94ac1fed30e..c1a2289ade0 100755 --- a/build/pkgs/pari_jupyter/spkg-install +++ b/build/pkgs/pari_jupyter/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && ./setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pathpy/dependencies b/build/pkgs/pathpy/dependencies index 6aa47098100..b148b64d76c 100644 --- a/build/pkgs/pathpy/dependencies +++ b/build/pkgs/pathpy/dependencies @@ -1,4 +1,4 @@ -setuptools_scm +$(PYTHON) | setuptools setuptools_scm pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pathpy/spkg-install b/build/pkgs/pathpy/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/pathpy/spkg-install +++ b/build/pkgs/pathpy/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pexpect/dependencies b/build/pkgs/pexpect/dependencies index 3cf8bde9662..75051ac8933 100644 --- a/build/pkgs/pexpect/dependencies +++ b/build/pkgs/pexpect/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) ptyprocess +$(PYTHON) ptyprocess | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pexpect/spkg-install b/build/pkgs/pexpect/spkg-install index 8f14ad098d2..e9fcb7b961e 100755 --- a/build/pkgs/pexpect/spkg-install +++ b/build/pkgs/pexpect/spkg-install @@ -12,11 +12,7 @@ for patch in ../patches/*.patch; do fi done -# On some systems pexpect doesn't upgrade correctly without -# first removing the old version. -rm -f "$SAGE_LOCAL"/lib/python*/site-packages/pexpect.* - -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing pexpect" diff --git a/build/pkgs/pickleshare/dependencies b/build/pkgs/pickleshare/dependencies index 7f16f620fe4..b13bdf2e19c 100644 --- a/build/pkgs/pickleshare/dependencies +++ b/build/pkgs/pickleshare/dependencies @@ -1,4 +1,4 @@ -setuptools pathpy pathlib2 +$(PYTHON) pathpy pathlib2 | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pickleshare/spkg-install b/build/pkgs/pickleshare/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/pickleshare/spkg-install +++ b/build/pkgs/pickleshare/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pip/spkg-install b/build/pkgs/pip/spkg-install index 2389e74f6e4..ebb7e2a2ec0 100755 --- a/build/pkgs/pip/spkg-install +++ b/build/pkgs/pip/spkg-install @@ -12,4 +12,7 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +# pip can install itself! +# need to use --upgrade or else pip, which is importing itself, will think +# itself is already installed +python -m $PIP_INSTALL --upgrade . diff --git a/build/pkgs/pkgconfig/dependencies b/build/pkgs/pkgconfig/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/pkgconfig/dependencies +++ b/build/pkgs/pkgconfig/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pkgconfig/spkg-install b/build/pkgs/pkgconfig/spkg-install index 85f379bd0ad..8cc615fc20e 100755 --- a/build/pkgs/pkgconfig/spkg-install +++ b/build/pkgs/pkgconfig/spkg-install @@ -11,7 +11,7 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo >&2 "Error installing pkgconfig." exit 1 diff --git a/build/pkgs/ptyprocess/dependencies b/build/pkgs/ptyprocess/dependencies index 304d0c987a2..d5dab729e18 100644 --- a/build/pkgs/ptyprocess/dependencies +++ b/build/pkgs/ptyprocess/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ptyprocess/spkg-install b/build/pkgs/ptyprocess/spkg-install index 748dd14901f..7326b5d7928 100755 --- a/build/pkgs/ptyprocess/spkg-install +++ b/build/pkgs/ptyprocess/spkg-install @@ -12,7 +12,7 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing ptyprocess" diff --git a/build/pkgs/pycrypto/dependencies b/build/pkgs/pycrypto/dependencies index 304d0c987a2..2573414ce8a 100644 --- a/build/pkgs/pycrypto/dependencies +++ b/build/pkgs/pycrypto/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pycrypto/spkg-install b/build/pkgs/pycrypto/spkg-install index 1af6e790d6d..8690a43237c 100755 --- a/build/pkgs/pycrypto/spkg-install +++ b/build/pkgs/pycrypto/spkg-install @@ -34,7 +34,8 @@ fi CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib $CFLAGS" -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo >&2 "Error: Failed to install PyCrypto." exit 1 diff --git a/build/pkgs/pygments/dependencies b/build/pkgs/pygments/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/pygments/dependencies +++ b/build/pkgs/pygments/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pygments/spkg-install b/build/pkgs/pygments/spkg-install index a13a45231ff..0f1f7663293 100755 --- a/build/pkgs/pygments/spkg-install +++ b/build/pkgs/pygments/spkg-install @@ -6,9 +6,6 @@ if [ "$SAGE_LOCAL" = "" ]; then exit 1 fi -#Remove old version -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Pygments-* - #Install new version cd src @@ -22,7 +19,8 @@ for p in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing Pygments." exit 1 diff --git a/build/pkgs/pyparsing/dependencies b/build/pkgs/pyparsing/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/pyparsing/dependencies +++ b/build/pkgs/pyparsing/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pyparsing/spkg-install b/build/pkgs/pyparsing/spkg-install index aa8729d6a64..be288e8af53 100755 --- a/build/pkgs/pyparsing/spkg-install +++ b/build/pkgs/pyparsing/spkg-install @@ -18,7 +18,8 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing pyparsing ... exiting" exit 1 diff --git a/build/pkgs/python_igraph/dependencies b/build/pkgs/python_igraph/dependencies index e1b87143435..661ac2bfdcf 100644 --- a/build/pkgs/python_igraph/dependencies +++ b/build/pkgs/python_igraph/dependencies @@ -1,4 +1,4 @@ -igraph $(PYTHON) +igraph $(PYTHON) | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/python_igraph/spkg-install b/build/pkgs/python_igraph/spkg-install index 684a8386010..f710c5a4c12 100755 --- a/build/pkgs/python_igraph/spkg-install +++ b/build/pkgs/python_igraph/spkg-install @@ -2,13 +2,8 @@ cd src -python setup.py build -if [ $? -ne 0 ]; then - echo >&2 "Error building python_igraph." - exit 1 -fi +$PIP_INSTALL . -python setup.py install if [ $? -ne 0 ]; then echo >&2 "Error installing python_igraph." exit 1 diff --git a/build/pkgs/pyzmq/dependencies b/build/pkgs/pyzmq/dependencies index f9b36d71611..ee0a2bd37f3 100644 --- a/build/pkgs/pyzmq/dependencies +++ b/build/pkgs/pyzmq/dependencies @@ -1,4 +1,4 @@ -cython zeromq setuptools +$(PYTHON) cython zeromq | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pyzmq/spkg-install b/build/pkgs/pyzmq/spkg-install index 269f0550b2a..cb1c8e14808 100755 --- a/build/pkgs/pyzmq/spkg-install +++ b/build/pkgs/pyzmq/spkg-install @@ -14,6 +14,4 @@ echo "include_dirs = $SAGE_LOCAL/include/" >> src/setup.cfg cd src # Configure and install -python setup.py configure --zmq="$SAGE_LOCAL" -python setup.py install - +$PIP_INSTALL --global-option configure --global-option --zmq="$SAGE_LOCAL" . diff --git a/build/pkgs/rpy2/dependencies b/build/pkgs/rpy2/dependencies index c4acc281947..e02edd2f9e4 100644 --- a/build/pkgs/rpy2/dependencies +++ b/build/pkgs/rpy2/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) r six singledispatch +$(PYTHON) r six singledispatch | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/rpy2/spkg-install b/build/pkgs/rpy2/spkg-install index 6d0f61027f5..e96e265f4e5 100755 --- a/build/pkgs/rpy2/spkg-install +++ b/build/pkgs/rpy2/spkg-install @@ -18,4 +18,4 @@ done export RHOMES="$SAGE_LOCAL"/lib/R -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/scipy/dependencies b/build/pkgs/scipy/dependencies index 62890ba73c9..5f5d5cecc38 100644 --- a/build/pkgs/scipy/dependencies +++ b/build/pkgs/scipy/dependencies @@ -1,4 +1,4 @@ -$(BLAS) numpy +$(PYTHON) $(BLAS) numpy | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/scipy/spkg-install b/build/pkgs/scipy/spkg-install index 8dafd648147..509c3f45b3e 100755 --- a/build/pkgs/scipy/spkg-install +++ b/build/pkgs/scipy/spkg-install @@ -34,10 +34,6 @@ UMFPACK="None"; export UMFPACK # (Currently SWIG gets invoked by scipy when building the umfpack interface, # which is bad.) - -# Remove previous installation (if any): -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/scipy - cd src/ # Apply patches (if any): @@ -50,15 +46,9 @@ for patch in ../patches/*.patch; do fi done -# Build: -python setup.py build -if [ $? -ne 0 ]; then - echo >&2 "Error building scipy." - exit 1 -fi - # Install: -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo >&2 "Error installing scipy." exit 1 diff --git a/build/pkgs/scons/spkg-install b/build/pkgs/scons/spkg-install index 72286703c07..1ee7dd21617 100755 --- a/build/pkgs/scons/spkg-install +++ b/build/pkgs/scons/spkg-install @@ -10,6 +10,7 @@ cd src/ rm -rf $SAGE_LOCAL/lib/scons-* +# scons does not work with pip python setup.py install if [ $? -ne 0 ]; then diff --git a/build/pkgs/setuptools/spkg-install b/build/pkgs/setuptools/spkg-install index 87588a7fb69..d120df8cf38 100755 --- a/build/pkgs/setuptools/spkg-install +++ b/build/pkgs/setuptools/spkg-install @@ -8,6 +8,8 @@ fi # distribute doesn't allow itself to be replaced by setuptools # so we manually have to delete it +# (pip actually can uninstall setuptools but we may not have pip +# install yet) rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/setuptools* rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/distribute* @@ -26,4 +28,5 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +# Prevent setuptools from installing itself with easy_install +python setup.py install --single-version-externally-managed --record=/dev/null diff --git a/build/pkgs/setuptools_scm/dependencies b/build/pkgs/setuptools_scm/dependencies index ae35f4f0477..2573414ce8a 100644 --- a/build/pkgs/setuptools_scm/dependencies +++ b/build/pkgs/setuptools_scm/dependencies @@ -1,4 +1,4 @@ -setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/setuptools_scm/spkg-install b/build/pkgs/setuptools_scm/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/setuptools_scm/spkg-install +++ b/build/pkgs/setuptools_scm/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/simplegeneric/dependencies b/build/pkgs/simplegeneric/dependencies index b331dcf836b..719cbd07335 100644 --- a/build/pkgs/simplegeneric/dependencies +++ b/build/pkgs/simplegeneric/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip # simplegeneric does not strictly require setuptools, but it does try # to use setuptools if it is available. However, there is a problem diff --git a/build/pkgs/simplegeneric/spkg-install b/build/pkgs/simplegeneric/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/simplegeneric/spkg-install +++ b/build/pkgs/simplegeneric/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/singledispatch/dependencies b/build/pkgs/singledispatch/dependencies index dbe70854dc0..b1ea6cd2264 100644 --- a/build/pkgs/singledispatch/dependencies +++ b/build/pkgs/singledispatch/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools six +$(PYTHON) six | setuptools pip ---------- All lines of this file are ignored except the first. It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/singledispatch/spkg-install b/build/pkgs/singledispatch/spkg-install index b00d7c10981..2a79a783438 100644 --- a/build/pkgs/singledispatch/spkg-install +++ b/build/pkgs/singledispatch/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing singledispatch ... exiting" exit 1 diff --git a/build/pkgs/six/dependencies b/build/pkgs/six/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/six/dependencies +++ b/build/pkgs/six/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/six/spkg-install b/build/pkgs/six/spkg-install index c7273d364ff..e22850fc27b 100755 --- a/build/pkgs/six/spkg-install +++ b/build/pkgs/six/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing six ... exiting" exit 1 diff --git a/build/pkgs/sphinx/dependencies b/build/pkgs/sphinx/dependencies index cc22818e6d1..cc85f403234 100644 --- a/build/pkgs/sphinx/dependencies +++ b/build/pkgs/sphinx/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | setuptools docutils jinja2 pygments six snowballstemmer imagesize babel alabaster +$(PYTHON) | setuptools pip docutils jinja2 pygments six snowballstemmer imagesize babel alabaster ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sphinx/spkg-install b/build/pkgs/sphinx/spkg-install index 07456f306bb..2274b29306f 100755 --- a/build/pkgs/sphinx/spkg-install +++ b/build/pkgs/sphinx/spkg-install @@ -27,20 +27,9 @@ for p in ../patches/*.patch; do done echo -# Build new version -echo "Building Sphinx..." -python setup.py build -success 'Error building Sphinx' -echo - -echo "Removing old version of Sphinx..." -rm -rf "$SAGE_LOCAL"/lib/python/site-packages/Sphinx-* -success 'Error deleting previous version' -echo - # Install new version echo "Installing Sphinx..." -python setup.py install +$PIP_INSTALL . success 'Error installing Sphinx' echo diff --git a/build/pkgs/sympy/dependencies b/build/pkgs/sympy/dependencies index 4e8909eb765..a0975d6f483 100644 --- a/build/pkgs/sympy/dependencies +++ b/build/pkgs/sympy/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) mpmath +$(PYTHON) mpmath | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sympy/spkg-install b/build/pkgs/sympy/spkg-install index 25bf02aee46..7c14f77ea55 100755 --- a/build/pkgs/sympy/spkg-install +++ b/build/pkgs/sympy/spkg-install @@ -17,21 +17,8 @@ for patch in ../patches/*.patch; do fi done -echo "building sympy" -python setup.py build - -if [ $? -ne 0 ]; then - echo >&2 "Error building sympy" - exit 1 -fi - -# It is very important that we have SAGE_LOCAL set, otherwise this -# might potentially delete stuff in /lib -echo "Deleting $SAGE_LOCAL/lib/python*/site-packages/sympy*" -rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/sympy* - echo "installing sympy" -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo >&2 "Error installing sympy" diff --git a/build/pkgs/tornado/dependencies b/build/pkgs/tornado/dependencies index 6a3a81ec358..7ac8b7bac09 100644 --- a/build/pkgs/tornado/dependencies +++ b/build/pkgs/tornado/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools backports_abc backports_ssl_match_hostname certifi singledispatch +$(PYTHON) backports_abc backports_ssl_match_hostname certifi singledispatch | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/tornado/spkg-install b/build/pkgs/tornado/spkg-install index 878608147af..e5b0876a4c0 100755 --- a/build/pkgs/tornado/spkg-install +++ b/build/pkgs/tornado/spkg-install @@ -8,7 +8,7 @@ fi cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing tornado ... exiting" exit 1 diff --git a/build/pkgs/traitlets/dependencies b/build/pkgs/traitlets/dependencies index c81739d92bc..4935b093c01 100644 --- a/build/pkgs/traitlets/dependencies +++ b/build/pkgs/traitlets/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) ipython_genutils decorator +$(PYTHON) ipython_genutils decorator | pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/traitlets/spkg-install b/build/pkgs/traitlets/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/traitlets/spkg-install +++ b/build/pkgs/traitlets/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/vcversioner/dependencies b/build/pkgs/vcversioner/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/vcversioner/dependencies +++ b/build/pkgs/vcversioner/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/vcversioner/spkg-install b/build/pkgs/vcversioner/spkg-install index b2ad7e3c051..3a64e54ef88 100755 --- a/build/pkgs/vcversioner/spkg-install +++ b/build/pkgs/vcversioner/spkg-install @@ -8,7 +8,8 @@ fi cd src -python setup.py install +$PIP_INSTALL . + if [ $? -ne 0 ]; then echo "Error installing vcversioner ... exiting" exit 1 From 63cade457c484ab1451998ffab0be665f53c10bd Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Wed, 27 Apr 2016 16:22:43 +0200 Subject: [PATCH 02/13] This is no longer needed. The comment was inaccurate anyways, and the issue it was addressing is worked around better by #20481 --- build/make/install | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/make/install b/build/make/install index 6c506a4d786..d7587c20798 100755 --- a/build/make/install +++ b/build/make/install @@ -23,15 +23,13 @@ export PATH="$SAGE_ROOT/build/bin:$SAGE_SRC/bin:$SAGE_LOCAL/bin:$PATH" export PYTHONPATH="$SAGE_LOCAL" # Default arguments for all packages insalled with `pip install` -# env PYTHONPATH=. : Sage's Python unconditionally removes . from sys.path -# which can break several packages' installation # --ignore-installed : Force pip to re-install package even if it thinks it's # already installed (for which it sometimes gets false # positives for partially-installed packages). # --no-deps : Don't install runtime dependencies from PyPI. # --no-index : Don't even look at any package index--this also disables # pip's version self-check -export PIP_INSTALL="env PYTHONPATH=. pip install --ignore-installed --no-deps --no-index" +export PIP_INSTALL="pip install --ignore-installed --no-deps --no-index" # Storing the start time of the build process. The time is stored in # seconds since 1970-01-01 in a hidden file called From a692a300c47526f4ab7987bcc109ca23e9acee20 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Fri, 27 May 2016 14:10:53 +0200 Subject: [PATCH 03/13] Update some packages that were added since the start of this branch to use pip. --- build/pkgs/alabaster/spkg-install | 2 +- build/pkgs/babel/spkg-install | 2 +- build/pkgs/backports_shutil_get_terminal_size/spkg-install | 2 +- build/pkgs/flask/spkg-install | 2 +- build/pkgs/flask_autoindex/spkg-install | 2 +- build/pkgs/flask_babel/spkg-install | 2 +- build/pkgs/flask_oldsessions/spkg-install | 2 +- build/pkgs/flask_openid/spkg-install | 2 +- build/pkgs/flask_silk/spkg-install | 2 +- build/pkgs/future/spkg-install | 2 +- build/pkgs/imagesize/spkg-install | 2 +- build/pkgs/itsdangerous/spkg-install | 2 +- build/pkgs/pathlib2/spkg-install | 2 +- build/pkgs/python_openid/spkg-install | 2 +- build/pkgs/pytz/spkg-install | 2 +- build/pkgs/snowballstemmer/spkg-install | 2 +- build/pkgs/speaklater/spkg-install | 2 +- build/pkgs/twisted/spkg-install | 2 +- build/pkgs/werkzeug/spkg-install | 2 +- build/pkgs/widgetsnbextension/spkg-install | 2 +- build/pkgs/zope_interface/spkg-install | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/build/pkgs/alabaster/spkg-install b/build/pkgs/alabaster/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/alabaster/spkg-install +++ b/build/pkgs/alabaster/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/babel/spkg-install b/build/pkgs/babel/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/babel/spkg-install +++ b/build/pkgs/babel/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/backports_shutil_get_terminal_size/spkg-install b/build/pkgs/backports_shutil_get_terminal_size/spkg-install index 1836e0e425b..b8d6730d1db 100755 --- a/build/pkgs/backports_shutil_get_terminal_size/spkg-install +++ b/build/pkgs/backports_shutil_get_terminal_size/spkg-install @@ -11,4 +11,4 @@ for patch in ../patches/*.patch; do fi done -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/flask/spkg-install b/build/pkgs/flask/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask/spkg-install +++ b/build/pkgs/flask/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/flask_autoindex/spkg-install b/build/pkgs/flask_autoindex/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask_autoindex/spkg-install +++ b/build/pkgs/flask_autoindex/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/flask_babel/spkg-install b/build/pkgs/flask_babel/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask_babel/spkg-install +++ b/build/pkgs/flask_babel/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/flask_oldsessions/spkg-install b/build/pkgs/flask_oldsessions/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask_oldsessions/spkg-install +++ b/build/pkgs/flask_oldsessions/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/flask_openid/spkg-install b/build/pkgs/flask_openid/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask_openid/spkg-install +++ b/build/pkgs/flask_openid/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/flask_silk/spkg-install b/build/pkgs/flask_silk/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/flask_silk/spkg-install +++ b/build/pkgs/flask_silk/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/future/spkg-install b/build/pkgs/future/spkg-install index 40129e37a19..9a9ff03a47b 100755 --- a/build/pkgs/future/spkg-install +++ b/build/pkgs/future/spkg-install @@ -2,7 +2,7 @@ cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo "Error installing future ... exiting" exit 1 diff --git a/build/pkgs/imagesize/spkg-install b/build/pkgs/imagesize/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/imagesize/spkg-install +++ b/build/pkgs/imagesize/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/itsdangerous/spkg-install b/build/pkgs/itsdangerous/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/itsdangerous/spkg-install +++ b/build/pkgs/itsdangerous/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pathlib2/spkg-install b/build/pkgs/pathlib2/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/pathlib2/spkg-install +++ b/build/pkgs/pathlib2/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/python_openid/spkg-install b/build/pkgs/python_openid/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/python_openid/spkg-install +++ b/build/pkgs/python_openid/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pytz/spkg-install b/build/pkgs/pytz/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/pytz/spkg-install +++ b/build/pkgs/pytz/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/snowballstemmer/spkg-install b/build/pkgs/snowballstemmer/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/snowballstemmer/spkg-install +++ b/build/pkgs/snowballstemmer/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/speaklater/spkg-install b/build/pkgs/speaklater/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/speaklater/spkg-install +++ b/build/pkgs/speaklater/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/twisted/spkg-install b/build/pkgs/twisted/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/twisted/spkg-install +++ b/build/pkgs/twisted/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/werkzeug/spkg-install b/build/pkgs/werkzeug/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/werkzeug/spkg-install +++ b/build/pkgs/werkzeug/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/widgetsnbextension/spkg-install b/build/pkgs/widgetsnbextension/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/widgetsnbextension/spkg-install +++ b/build/pkgs/widgetsnbextension/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/zope_interface/spkg-install b/build/pkgs/zope_interface/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/zope_interface/spkg-install +++ b/build/pkgs/zope_interface/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . From 3e16e00113042fd2d0348db07310e0bfc57f815c Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Fri, 27 May 2016 12:38:26 +0000 Subject: [PATCH 04/13] Some of the packages changed to use pip in 2fe1d357600e60d3422141ba5a7fb16efb3a691b needed pip added to their build deps. --- build/pkgs/backports_shutil_get_terminal_size/dependencies | 2 +- build/pkgs/future/dependencies | 2 +- build/pkgs/pathlib2/dependencies | 2 +- build/pkgs/widgetsnbextension/dependencies | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/backports_shutil_get_terminal_size/dependencies b/build/pkgs/backports_shutil_get_terminal_size/dependencies index 2094dae2d20..2573414ce8a 100644 --- a/build/pkgs/backports_shutil_get_terminal_size/dependencies +++ b/build/pkgs/backports_shutil_get_terminal_size/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/future/dependencies b/build/pkgs/future/dependencies index dbe5d796c45..2573414ce8a 100644 --- a/build/pkgs/future/dependencies +++ b/build/pkgs/future/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | setuptools pip ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/pathlib2/dependencies b/build/pkgs/pathlib2/dependencies index ece9b98b1d3..e9c4df60abc 100644 --- a/build/pkgs/pathlib2/dependencies +++ b/build/pkgs/pathlib2/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | setuptools six +$(PYTHON) | setuptools pip six ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/widgetsnbextension/dependencies b/build/pkgs/widgetsnbextension/dependencies index 374b7da81ae..8603e9c842a 100644 --- a/build/pkgs/widgetsnbextension/dependencies +++ b/build/pkgs/widgetsnbextension/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | setuptools notebook +$(PYTHON) | setuptools pip notebook ---------- All lines of this file are ignored except the first. From 332d91561b060f22f6af8539bc5440659403447a Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Fri, 5 Aug 2016 09:13:05 +0000 Subject: [PATCH 05/13] Move PIP_INSTALL into sage-env so that it's available so long as the Sage environment is activated --- build/make/install | 9 --------- src/bin/sage-env | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/make/install b/build/make/install index d7587c20798..c0ab28194e5 100755 --- a/build/make/install +++ b/build/make/install @@ -22,15 +22,6 @@ export PATH="$SAGE_ROOT/build/bin:$SAGE_SRC/bin:$SAGE_LOCAL/bin:$PATH" export PYTHONPATH="$SAGE_LOCAL" -# Default arguments for all packages insalled with `pip install` -# --ignore-installed : Force pip to re-install package even if it thinks it's -# already installed (for which it sometimes gets false -# positives for partially-installed packages). -# --no-deps : Don't install runtime dependencies from PyPI. -# --no-index : Don't even look at any package index--this also disables -# pip's version self-check -export PIP_INSTALL="pip install --ignore-installed --no-deps --no-index" - # Storing the start time of the build process. The time is stored in # seconds since 1970-01-01 in a hidden file called # "SAGE_ROOT/.BUILDSTART". See ticket #6744. diff --git a/src/bin/sage-env b/src/bin/sage-env index 0e639ea01ae..1c94ac7a060 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -639,6 +639,15 @@ if [ "${MAKEFLAGS-__unset__}" != "__unset__" ]; then fi export MAKE +# Default arguments for all packages installed with `pip install` +# --ignore-installed : Force pip to re-install package even if it thinks it's +# already installed (for which it sometimes gets false +# positives for partially-installed packages). +# --no-deps : Don't install runtime dependencies from PyPI. +# --no-index : Don't even look at any package index--this also disables +# pip's version self-check +export PIP_INSTALL="pip install --ignore-installed --no-deps --no-index" + # When building documentation, use MathJax by default. To turn it off, # set SAGE_DOC_MATHJAX to be "no" or "False". if [ -z "$SAGE_DOC_MATHJAX" ]; then From d6121b21c29ba65f71b8804edbd621282854bcd7 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Mon, 8 Aug 2016 10:08:18 +0200 Subject: [PATCH 06/13] pip install sagenb_exports --- build/pkgs/sagenb_export/spkg-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/sagenb_export/spkg-install b/build/pkgs/sagenb_export/spkg-install index 8700dc59a98..711553f4568 100755 --- a/build/pkgs/sagenb_export/spkg-install +++ b/build/pkgs/sagenb_export/spkg-install @@ -1,7 +1,7 @@ #!/usr/bin/env bash cd src -python setup.py install +$PIP_INSTALL . if [ $? -ne 0 ]; then echo >&2 "Error installing SageNB Export" exit 1 From d7218a077e4c2bffe8a8cd6a496e62313191a36b Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Tue, 16 Aug 2016 11:36:47 +0200 Subject: [PATCH 07/13] Three new Python packages were added that should use pip for installation --- build/pkgs/prompt_toolkit/spkg-install | 2 +- build/pkgs/pyx/spkg-install | 2 +- build/pkgs/wcwidth/spkg-install | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pkgs/prompt_toolkit/spkg-install b/build/pkgs/prompt_toolkit/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/prompt_toolkit/spkg-install +++ b/build/pkgs/prompt_toolkit/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . diff --git a/build/pkgs/pyx/spkg-install b/build/pkgs/pyx/spkg-install index 36e81e21f22..d389c2cbae3 100755 --- a/build/pkgs/pyx/spkg-install +++ b/build/pkgs/pyx/spkg-install @@ -1,4 +1,4 @@ #!/usr/bin/env bash cd src -python setup.py install +$PIP_INSTALL . diff --git a/build/pkgs/wcwidth/spkg-install b/build/pkgs/wcwidth/spkg-install index afb3f302fd1..c1a2289ade0 100755 --- a/build/pkgs/wcwidth/spkg-install +++ b/build/pkgs/wcwidth/spkg-install @@ -1,3 +1,3 @@ #!/usr/bin/env bash -cd src && python setup.py install +cd src && $PIP_INSTALL . From fd131c1a550242299e367080fa1a77a5823daaed Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Tue, 16 Aug 2016 13:40:51 +0200 Subject: [PATCH 08/13] Add --verbose flag to pip --- src/bin/sage-env | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 1c94ac7a060..da1ffaf2dd5 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -643,10 +643,11 @@ export MAKE # --ignore-installed : Force pip to re-install package even if it thinks it's # already installed (for which it sometimes gets false # positives for partially-installed packages). +# --verbose : Display the output when running setup.py. # --no-deps : Don't install runtime dependencies from PyPI. -# --no-index : Don't even look at any package index--this also disables -# pip's version self-check -export PIP_INSTALL="pip install --ignore-installed --no-deps --no-index" +# --no-index : Don't look at the package index. +# This also disables pip's version self-check. +export PIP_INSTALL="pip install --ignore-installed --verbose --no-deps --no-index" # When building documentation, use MathJax by default. To turn it off, # set SAGE_DOC_MATHJAX to be "no" or "False". From 7054c41c14c7a619fee1ccaa79da1273e5713727 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Tue, 16 Aug 2016 16:22:48 +0200 Subject: [PATCH 09/13] Fix installation of Jupyter packages --- build/pkgs/ipython/dependencies | 2 +- build/pkgs/jupyter_core/dependencies | 2 +- build/pkgs/nbconvert/dependencies | 2 +- build/pkgs/nbformat/dependencies | 2 +- build/pkgs/notebook/dependencies | 2 +- build/pkgs/notebook/{patches => }/jupyter_notebook_config.py | 0 build/pkgs/notebook/spkg-install | 4 +++- build/pkgs/widgetsnbextension/dependencies | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) rename build/pkgs/notebook/{patches => }/jupyter_notebook_config.py (100%) diff --git a/build/pkgs/ipython/dependencies b/build/pkgs/ipython/dependencies index 5f6e1885d08..180ba582242 100644 --- a/build/pkgs/ipython/dependencies +++ b/build/pkgs/ipython/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | pip backports_shutil_get_terminal_size wcwidth prompt_toolkit +$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | pip backports_shutil_get_terminal_size wcwidth prompt_toolkit pygments pexpect ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jupyter_core/dependencies b/build/pkgs/jupyter_core/dependencies index d5dab729e18..541b33eec62 100644 --- a/build/pkgs/jupyter_core/dependencies +++ b/build/pkgs/jupyter_core/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | pip +$(PYTHON) | pip traitlets ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/nbconvert/dependencies b/build/pkgs/nbconvert/dependencies index d5dab729e18..7e47dcabb96 100644 --- a/build/pkgs/nbconvert/dependencies +++ b/build/pkgs/nbconvert/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | pip +$(PYTHON) | pip entrypoints pygments mistune ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/nbformat/dependencies b/build/pkgs/nbformat/dependencies index d5dab729e18..ce52858c220 100644 --- a/build/pkgs/nbformat/dependencies +++ b/build/pkgs/nbformat/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | pip +$(PYTHON) | pip jsonschema ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/notebook/dependencies b/build/pkgs/notebook/dependencies index d5dab729e18..1f206344809 100644 --- a/build/pkgs/notebook/dependencies +++ b/build/pkgs/notebook/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | pip +$(PYTHON) | pip ipython jupyter_client ipykernel nbconvert nbformat jinja2 tornado terminado ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/notebook/patches/jupyter_notebook_config.py b/build/pkgs/notebook/jupyter_notebook_config.py similarity index 100% rename from build/pkgs/notebook/patches/jupyter_notebook_config.py rename to build/pkgs/notebook/jupyter_notebook_config.py diff --git a/build/pkgs/notebook/spkg-install b/build/pkgs/notebook/spkg-install index cba1314b91d..e1ff6cfe24f 100755 --- a/build/pkgs/notebook/spkg-install +++ b/build/pkgs/notebook/spkg-install @@ -11,9 +11,11 @@ for patch in ../patches/*.patch; do fi done +set -e + $PIP_INSTALL . # Install the Jupyter notebook configuration ETC_JUPYTER="$SAGE_ETC"/jupyter mkdir -p "$ETC_JUPYTER" -cp ../patches/jupyter_notebook_config.py "$ETC_JUPYTER"/ +cp ../jupyter_notebook_config.py "$ETC_JUPYTER"/ diff --git a/build/pkgs/widgetsnbextension/dependencies b/build/pkgs/widgetsnbextension/dependencies index 8603e9c842a..a1db344087a 100644 --- a/build/pkgs/widgetsnbextension/dependencies +++ b/build/pkgs/widgetsnbextension/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) | setuptools pip notebook +$(PYTHON) | setuptools pip notebook jupyter_core ---------- All lines of this file are ignored except the first. From 99e1494840eac3dbb10d57b4721c4ff281c47c4e Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 26 Aug 2016 10:34:47 +0200 Subject: [PATCH 10/13] Revert changes to numpy --- build/pkgs/numpy/spkg-install | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/pkgs/numpy/spkg-install b/build/pkgs/numpy/spkg-install index ee9666edb98..40b8b5c81d3 100755 --- a/build/pkgs/numpy/spkg-install +++ b/build/pkgs/numpy/spkg-install @@ -54,13 +54,15 @@ export NUMPY_FCONFIG="config_fc --noopt --noarch" ################################################ +rm -rf "$SAGE_LOCAL/lib/python/site-packages/numpy" + # Program around a bug in SciPY's distutils. unset CFLAGS -# Split NUMPY_FCONFIG into --global-option flags for pip -PIP_INSTALL_FLAGS=$(echo $NUMPY_FCONFIG | sed -e 's/\(\S*\)/--global-option \1/g') - -$PIP_INSTALL $PIP_INSTALL_FLAGS . +python setup.py install \ + --single-version-externally-managed \ + --record /dev/null \ + ${NUMPY_FCONFIG} # Touch all includes such that dependency checking works properly: # the timestamp of the includes should be *now*, not the time when From f5c0b161de6ad824e7eb8752c072c0adab105a41 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 26 Aug 2016 11:24:12 +0200 Subject: [PATCH 11/13] wcwidth depends on pip --- build/pkgs/wcwidth/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/wcwidth/dependencies b/build/pkgs/wcwidth/dependencies index dbe5d796c45..551ec7ee0ee 100644 --- a/build/pkgs/wcwidth/dependencies +++ b/build/pkgs/wcwidth/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools +$(PYTHON) | pip setuptools ---------- All lines of this file are ignored except the first. From 55f9e9d6aa4e49777418dcfe74ddaa55fb4a269a Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Sat, 27 Aug 2016 11:08:25 +0200 Subject: [PATCH 12/13] Add appnope package --- build/pkgs/appnope/SPKG.txt | 5 +++++ build/pkgs/appnope/checksums.ini | 4 ++++ build/pkgs/appnope/dependencies | 5 +++++ build/pkgs/appnope/package-version.txt | 1 + build/pkgs/appnope/spkg-install | 10 ++++++++++ build/pkgs/appnope/type | 1 + build/pkgs/ipython/dependencies | 2 +- 7 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/appnope/SPKG.txt create mode 100644 build/pkgs/appnope/checksums.ini create mode 100644 build/pkgs/appnope/dependencies create mode 100644 build/pkgs/appnope/package-version.txt create mode 100755 build/pkgs/appnope/spkg-install create mode 100644 build/pkgs/appnope/type diff --git a/build/pkgs/appnope/SPKG.txt b/build/pkgs/appnope/SPKG.txt new file mode 100644 index 00000000000..eafadb7faad --- /dev/null +++ b/build/pkgs/appnope/SPKG.txt @@ -0,0 +1,5 @@ += appnope = + +== Description == + +Disable App Nap on OS X 10.9 diff --git a/build/pkgs/appnope/checksums.ini b/build/pkgs/appnope/checksums.ini new file mode 100644 index 00000000000..16b8456467d --- /dev/null +++ b/build/pkgs/appnope/checksums.ini @@ -0,0 +1,4 @@ +tarball=appnope-VERSION.tar.gz +sha1=838158bf881f3e8538b7bfeff4ad289a6623cdda +md5=932fbaa73792c9b06754755a774dcac5 +cksum=4167491137 diff --git a/build/pkgs/appnope/dependencies b/build/pkgs/appnope/dependencies new file mode 100644 index 00000000000..d5dab729e18 --- /dev/null +++ b/build/pkgs/appnope/dependencies @@ -0,0 +1,5 @@ +$(PYTHON) | pip + +---------- +All lines of this file are ignored except the first. +It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/appnope/package-version.txt b/build/pkgs/appnope/package-version.txt new file mode 100644 index 00000000000..6e8bf73aa55 --- /dev/null +++ b/build/pkgs/appnope/package-version.txt @@ -0,0 +1 @@ +0.1.0 diff --git a/build/pkgs/appnope/spkg-install b/build/pkgs/appnope/spkg-install new file mode 100755 index 00000000000..8c84f6fe5b9 --- /dev/null +++ b/build/pkgs/appnope/spkg-install @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +cd src + +# Only install this package on OS X +if python -c 'from sys import *; exit(0 if platform == "darwin" else 1)'; then + $PIP_INSTALL . || exit $? +else + echo "Not OS X, skipping installation of package 'appnope'" +fi diff --git a/build/pkgs/appnope/type b/build/pkgs/appnope/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/appnope/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/ipython/dependencies b/build/pkgs/ipython/dependencies index 180ba582242..2beb4d61c1f 100644 --- a/build/pkgs/ipython/dependencies +++ b/build/pkgs/ipython/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | pip backports_shutil_get_terminal_size wcwidth prompt_toolkit pygments pexpect +$(PYTHON) jinja2 tornado pyzmq pickleshare simplegeneric traitlets | pip backports_shutil_get_terminal_size wcwidth prompt_toolkit pygments pexpect appnope ---------- All lines of this file are ignored except the first. From f6859c31c0322c22d9ad2b6ab21b8e8c8948e16d Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Tue, 30 Aug 2016 11:02:45 +0200 Subject: [PATCH 13/13] Mark package tests as random --- src/sage/misc/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py index bdddb6347f8..f0ecba22590 100644 --- a/src/sage/misc/package.py +++ b/src/sage/misc/package.py @@ -21,7 +21,7 @@ sage: from sage.misc.package import list_packages sage: pkgs = list_packages(local=True) - sage: sorted(pkgs.keys()) + sage: sorted(pkgs.keys()) # random ['4ti2', 'alabaster', 'arb', @@ -176,7 +176,7 @@ def list_packages(*pkg_types, **opts): sage: from sage.misc.package import list_packages sage: L = list_packages('standard') - sage: sorted(L.keys()) + sage: sorted(L.keys()) # random ['alabaster', 'arb', 'atlas',