Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd0d057

Browse files
author
Ralf Gommers
committed
Merge pull request numpy#4662 from matthew-brett/cythonize-for-wheels
BUG: cythonize sources for wheel build
2 parents f671012 + 0beb47f commit cd0d057

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ matrix:
2222
env: NPY_RELAXED_STRIDES_CHECKING=1
2323
- python: 2.7
2424
env: USE_BENTO=1
25+
- python: 2.7
26+
env: USE_WHEEL=1
2527
before_install:
2628
- uname -a
2729
- free -m

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,10 @@ def setup_package():
228228

229229
FULLVERSION, GIT_REVISION = get_version_info()
230230
metadata['version'] = FULLVERSION
231-
elif len(sys.argv) >= 2 and sys.argv[1] == 'bdist_wheel':
232-
# bdist_wheel needs setuptools
233-
import setuptools
234-
from numpy.distutils.core import setup
235-
metadata['configuration'] = configuration
236231
else:
232+
if len(sys.argv) >= 2 and sys.argv[1] == 'bdist_wheel':
233+
# bdist_wheel needs setuptools
234+
import setuptools
237235
from numpy.distutils.core import setup
238236
cwd = os.path.abspath(os.path.dirname(__file__))
239237
if not os.path.exists(os.path.join(cwd, 'PKG-INFO')):

tools/travis-test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ fi
111111

112112
export PYTHON
113113
export PIP
114-
if [ "$USE_CHROOT" != "1" ] && [ "$USE_BENTO" != "1" ]; then
114+
if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
115+
$PIP install --upgrade pip
116+
$PIP install wheel
117+
$PYTHON setup.py bdist_wheel
118+
$PIP install --pre --upgrade --find-links dist numpy
119+
run_test
120+
elif [ "$USE_CHROOT" != "1" ] && [ "$USE_BENTO" != "1" ]; then
115121
setup_base
116122
run_test
117123
elif [ -n "$USE_CHROOT" ] && [ $# -eq 0 ]; then

0 commit comments

Comments
 (0)