Skip to content
Permalink
Browse files

Change requirements for wheels

  • Loading branch information
Thrameos committed Jan 15, 2020
1 parent afe8a8b commit 86313a12f1ef26f6f8b237339de56a73942975d3
Showing with 39 additions and 6 deletions.
  1. +1 −1 docker/build.sh
  2. +0 −1 docker/dev-requirements.txt
  3. +5 −4 docker/run.sh
  4. +1 −0 setup.py
  5. +1 −0 setupext/__init__.py
  6. +31 −0 setupext/wheel.py
@@ -3,7 +3,7 @@ set -e -x
echo ====== $PY $VER
PYBIN=/opt/python/$PY/bin
if [ ! -e /io/wheelhouse/JPype1-$VER-$PY-linux_$PLAT.whl ]; then
"${PYBIN}/pip" install -r /io/dev-requirements.txt
"${PYBIN}/pip" install numpy==$NUMPY
"${PYBIN}/pip" wheel /io/JPype1-$VER.tar.gz --no-index -w /io/wheelhouse
fi
auditwheel repair /io/wheelhouse/JPype1-$VER-$PY-linux_$PLAT.whl -w /io/wheelhouse

This file was deleted.

@@ -16,8 +16,9 @@ VER=0.7.1
for PLAT in x86_64 i686
do
DOCKER_IMAGE=quay.io/pypa/manylinux1_$PLAT
for PY in cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38
do
docker run --rm -e VER=$VER -e PY=$PY -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/build.sh
done
# Different versions need different NUMPY as NUMPY support for Python varies by version
docker run --rm -e VER=$VER -e PY=cp35-cp35m -e NUMPY=1.15.0 -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/build.sh
docker run --rm -e VER=$VER -e PY=cp36-cp36m -e NUMPY=1.15.0 -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/build.sh
docker run --rm -e VER=$VER -e PY=cp37-cp37m -e NUMPY=1.15.0 -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/build.sh
docker run --rm -e VER=$VER -e PY=cp38-cp38 -e NUMPY=1.18.0 -e PLAT=$PLAT -v `pwd`:/io $DOCKER_IMAGE /io/build.sh
done
@@ -46,6 +46,7 @@
'test_java': setupext.test_java.TestJavaCommand,
'sdist': setupext.sdist.BuildSourceDistribution,
'test': setupext.pytester.PyTest,
'bdist_wheel': setupext.wheel.WheelCommand,
},
zip_safe=False,
ext_modules=[jpypeLib],
@@ -7,3 +7,4 @@
from . import test_java
from . import sdist
from . import pytester
from . import wheel
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
import os
from setuptools import Command
from distutils import log
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel

class WheelCommand(_bdist_wheel):

def run(self):
version = None
try:
import numpy
version = numpy.__version__
except:
pass

# Override the requirements to match the version of numpy used
if not version:
self.distribution.extras_require={}
else:
self.distribution.extras_require['numpy']="numpy>=%s"%version
print("Setting numpy requirement to %s"%version)
_bdist_wheel.run(self)

except ImportException:
class WheelCommand(Command):
pass



0 comments on commit 86313a1

Please sign in to comment.
You can’t perform that action at this time.