Skip to content

Commit

Permalink
Trac #20218: Use pip to install Python dependencies
Browse files Browse the repository at this point in the history
New tarball: https://pypi.python.org/packages/26/34/0f3a5efac31f27fabce6
4645f8c609de9d925fe2915304d1a40f544cff0e/appnope-0.1.0.tar.gz

---------

Work has already been done--for example in #19187--on using `pip` for
`sage -i` where appropriate.  However, a normal build of sage does not
use `pip` for installing any Python spkgs; rather, they run `python
setup.py install` which until recently has always been *the* way to
install Python packages.

I can suggest several reasons why `pip` should be used instead of this
method.  To be clear--as many people think of `pip` as a tool for
installing packages from the internet--this is not strictly the case.
`pip` can be used to install an already downloaded tarball, or even
straight from a source tree unpacked from a tarball or checked out from
VCS.  The typical way to do this is to change directories to the
directory containing the `setup.py` script and running `pip install .`.
This still ultimately calls `setup.py install`, among other `setup.py`
commands, but with the right incantations to perform a pip-style flat
install.  Now, why is this preferable?

1. Future-compatibility.  One of the goals that the Python packaging
community has been working toward over the past several years has been
to decouple Python package installation from build system.
Traditionally `setup.py` provided both a build program and an
installation program.  At best it will still stick around as a build
program, but its use for installation is being discouraged.  There is
now finally a PEP (http://legacy.python.org/dev/peps/pep-0516/), still
very much in draft state, specifically concerning this decoupling.
Under this new regime `pip` will not likely be the *only* software for
installing Python packages, but the assumption can no longer be that
there is a `setup.py` script at all.

2. `pip` avoids using `easy_install`.  `easy_install` is an older
installation program for Python packages that was bundled with
setuptools--when a Python project uses setuptools in its `setup.py`, the
`setup.py install` command invokes `easy_install` *by default*.  The
behavior of `easy_install` is to install the package as an egg
archive/directory.  `easy_install` has several disadvantages, of which
this is just one, but there are a couple reasons that this alone is a
problem:[[br]][[br]]
  a. Every .egg requires a `sys.path` entry, hence difficult to debug
paths that look like this:
{{{
#!python
>>> pprint(sys.path)
['',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/setuptools-18.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Cython-0.23.3-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/MarkupSafe-0.23-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Jinja2-2.7.3-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/six-1.10.0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Pygments-2.0.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Sphinx-1.2.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/zope.interface-4.1.3-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Twisted-15.5.0-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-packages
/pytz-2013b0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Babel-2.1.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Werkzeug-0.11.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/speaklater-1.3-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/python_openid-2.2.5-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/itsdangerous-0.24-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask-0.10.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask_Silk-0.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask_AutoIndex-0.5-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask_Babel-0.9-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask_OpenID-1.2.5-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/Flask_OldSessions-0.10-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/webassets-0.11.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/sagenb-0.11.6.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/backports.ssl_match_hostname-3.4.0.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/certifi-14.5.14-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/tornado-4.1-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/setuptools_scm-1.7.0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/path.py-7.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/pickleshare-0.5-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/simplegeneric-0.8.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/decorator-4.0.6-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/networkx-1.10-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/python_dateutil-2.2-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/cycler-0.9.0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/matplotlib-1.5.0-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/jsonschema-2.4.0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/mistune-0.5.1-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/pip-6.1.1-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/pkgconfig-1.1.0-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/singledispatch-3.4.0.3-py2.7.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-
packages/rpy2-2.7.5-py2.7-linux-x86_64.egg',
 '/home/iguananaut/src/sagemath/sage/local/lib/python',
 '/home/iguananaut/src/sagemath/sage/local/lib/python/site_packages',
 '/home/iguananaut/src/sagemath/sage/local/lib/python27.zip',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/plat-linux2',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-tk',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-old',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-dynload',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-packages']
}}}
     With the flat install style used by `pip`, and now more generally
favored, the `sys.path`, with no eggs, would be simply:
{{{
#!python
>>> pprint(sys.path)
['',
 '/home/iguananaut/src/sagemath/sage/local/lib/python',
 '/home/iguananaut/src/sagemath/sage/local/lib/python27.zip',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/plat-linux2',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-tk',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-old',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/lib-dynload',
 '/home/iguananaut/src/sagemath/sage/local/lib/python2.7/site-packages']
}}}
     which is certainly easier to read and reason about.[[br]][[br]]
  b. The egg import mechanism requires writing to a common file during
egg installation--easy-install.pth.  This causes problems in parallel
installations, requiring patches to setuptools.  The flat install style
used by pip has no such problems--there is a no single common file
written to by pip during installation of packages (other than maybe the
log file, which is only for debugging purposes).

As I explained in [http://trac.sagemath.org/timeline?from=2016-02-25T10%
3A23%3A37-08%3A00&precision=second this comment], when a Python package
is installed with `pip`, `pip` actually slips setuptools into the
installation process, whether the package uses it explicitly or not.
There are reasons for this not worth going into now.  This is no problem
for the vast majority of cases.  The only exception I know of is that
setuptools doesn't handle the `data_files` option well when `--prefix`
is changed.  As far as I can tell this is only a problem for sage itself
and possibly for sagetex, but these don't even use `setuptools` in the
first place, so until we have a workaround for that it does no harm if
we keep using `setup.py install` for those packages, if nothing else
works.

Most of the rest of the Python packages included by default in a Sage
build (I haven't checked all of -optional yet) already use setuptools.
I checked the setup.py of all the rest that don't explicitly use
setuptools--these include `docutils`, `mpmath`, `pexpect`, `ptyprocess`,
`Pycrypto`, `pyparsing`, `pyzmq`, `scipy`, and all packages from the
Jupyter team (`ip*`, `jupyter*`, `np*`, `notebook`, `traitlets`).

Most of these packages are known by me (from personal experience) to
work fine with pip.  Looking at the setup.py scripts of the rest of
them, most of them are fairly trivial and should work fine.

TL;DR, with the exceptions of sage and sagetex (pending work like
#20108), as well as pip itself the `spkg-install` scripts for Python
packages should change `setup.py install` commands to `pip install .`.
Their dependencies would also have to be updated to require pip to be
installed first.

At the same time the "uninstall" commands in those scripts can be
changed to use `pip uninstall`.

URL: https://trac.sagemath.org/20218
Reported by: embray
Ticket author(s): Erik Bray, Jeroen Demeyer
Reviewer(s): Jeroen Demeyer, Volker Braun
  • Loading branch information
Release Manager authored and vbraun committed Aug 31, 2016
2 parents ce93575 + f6859c3 commit a052c90
Show file tree
Hide file tree
Showing 149 changed files with 203 additions and 267 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/alabaster/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
5 changes: 5 additions & 0 deletions build/pkgs/appnope/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= appnope =

== Description ==

Disable App Nap on OS X 10.9
4 changes: 4 additions & 0 deletions build/pkgs/appnope/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=appnope-VERSION.tar.gz
sha1=838158bf881f3e8538b7bfeff4ad289a6623cdda
md5=932fbaa73792c9b06754755a774dcac5
cksum=4167491137
5 changes: 5 additions & 0 deletions build/pkgs/appnope/dependencies
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions build/pkgs/appnope/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
10 changes: 10 additions & 0 deletions build/pkgs/appnope/spkg-install
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions build/pkgs/appnope/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
2 changes: 1 addition & 1 deletion build/pkgs/babel/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/backports_abc/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/backports_abc/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/backports_shutil_get_terminal_size/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) | setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/backports_shutil_get_terminal_size/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ for patch in ../patches/*.patch; do
fi
done

python setup.py install
$PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/backports_ssl_match_hostname/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/backports_ssl_match_hostname/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/certifi/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/certifi/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fi

cd src

python setup.py install
$PIP_INSTALL .

if [ $? -ne 0 ]; then
echo "Error installing certifi ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cvxopt/dependencies
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
8 changes: 1 addition & 7 deletions build/pkgs/cvxopt/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cycler/dependencies
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cycler/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

cd src

python setup.py install
$PIP_INSTALL .
if [ $? -ne 0 ]; then
echo "Error installing cycler ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/cython/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
5 changes: 1 addition & 4 deletions build/pkgs/cython/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/dateutil/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) six setuptools
$(PYTHON) six | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/dateutil/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

cd src

python setup.py install
$PIP_INSTALL .
if [ $? -ne 0 ]; then
echo "Error installing dateutil ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/decorator/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/decorator/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/docutils/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON)
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
Expand Down
6 changes: 2 additions & 4 deletions build/pkgs/docutils/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/dot2tex/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON)
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
Expand Down
11 changes: 1 addition & 10 deletions build/pkgs/dot2tex/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/flask/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/flask_autoindex/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/flask_babel/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/flask_oldsessions/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/flask_openid/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/flask_silk/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/functools32/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/functools32/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ fi

cd src

python setup.py install
$PIP_INSTALL .

if [ $? -ne 0 ]; then
echo "Error installing functools32 ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/future/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) setuptools
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/future/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd src

python setup.py install
$PIP_INSTALL .
if [ $? -ne 0 ]; then
echo "Error installing future ... exiting"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/giacpy/dependencies
Original file line number Diff line number Diff line change
@@ -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
----------
Expand Down
9 changes: 1 addition & 8 deletions build/pkgs/giacpy/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/git_trac/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON)
$(PYTHON) | setuptools pip

----------
All lines of this file are ignored except the first.
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/git_trac/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/imagesize/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/ipykernel/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON)
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/ipykernel/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ for patch in ../patches/*.patch; do
fi
done

python setup.py install
$PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/ipython/dependencies
Original file line number Diff line number Diff line change
@@ -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 pygments pexpect appnope

----------
All lines of this file are ignored except the first.
Expand Down
14 changes: 1 addition & 13 deletions build/pkgs/ipython/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/ipython_genutils/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON)
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/ipython_genutils/spkg-install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
cd src && $PIP_INSTALL .
2 changes: 1 addition & 1 deletion build/pkgs/ipywidgets/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) widgetsnbextension
$(PYTHON) widgetsnbextension | pip

----------
All lines of this file are ignored except the first.
Expand Down
Loading

0 comments on commit a052c90

Please sign in to comment.