Skip to content

Commit 0e7f323

Browse files
committed
BF: fix and test sdist command
I broke setup.py sdist in the Python 3 refactor, because we were previously using a version of numpy.distutils build_py, and the refactor reverted (accidentally) to using the default disutils setup.py. We also forgot to add the new position of the fff files to the MANIFEST.in, so the sdist archives was broken.
1 parent 82e2216 commit 0e7f323

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

.travis.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ cache:
1717
env:
1818
global:
1919
- DEPENDS="numpy scipy sympy matplotlib nibabel"
20+
- INSTALL_TYPE="setup"
2021
python:
2122
- 2.6
2223
- 3.2
@@ -37,6 +38,13 @@ matrix:
3738
- python: 3.4
3839
env:
3940
- NIPY_EXTERNAL_LAPACK=1
41+
- python: 3.4
42+
env:
43+
- INSTALL_TYPE=sdist
44+
- python: 3.4
45+
env:
46+
- INSTALL_TYPE=wheel
47+
4048
before_install:
4149
- source tools/travis_tools.sh
4250
- virtualenv --python=python venv
@@ -52,7 +60,17 @@ before_install:
5260
# command to install dependencies
5361
# e.g. pip install -r requirements.txt # --use-mirrors
5462
install:
55-
- python setup.py install
63+
- |
64+
if [ "$INSTALL_TYPE" == "setup" ]; then
65+
python setup.py install
66+
elif [ "$INSTALL_TYPE" == "sdist" ]; then
67+
python setup.py sdist
68+
pip install dist/*.tar.gz
69+
elif [ "$INSTALL_TYPE" == "wheel" ]; then
70+
pip install wheel
71+
python setup.py bdist_wheel
72+
pip install dist/*.whl
73+
fi
5674
# command to run tests, e.g. python setup.py test
5775
script:
5876
# Change into an innocuous directory and find tests from installation

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include Changelog TODO
33
include *.py
44
include site.*
55
recursive-include nipy *.c *.h *.pyx *.pxd
6-
recursive-include libcstat *.c *.h *.pyx *.pxd
6+
recursive-include lib *.c *.h *.pyx *.pxd remake
77
recursive-include scripts *
88
recursive-include tools *
99
# put this stuff back into setup.py (package_data) once I'm enlightened

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
build_src.generate_a_pyrex_source = generate_a_pyrex_source
2727

2828
# Add custom commit-recording build command
29-
cmdclass['build_py'] = get_comrec_build('nipy')
29+
from numpy.distutils.command.build_py import build_py as _build_py
30+
cmdclass['build_py'] = get_comrec_build('nipy', _build_py)
3031

3132
def configuration(parent_package='',top_path=None):
3233
from numpy.distutils.misc_util import Configuration

0 commit comments

Comments
 (0)