Skip to content

Commit 4730aee

Browse files
authored
refactor: split requirements (#148)
1 parent 7477594 commit 4730aee

10 files changed

Lines changed: 29 additions & 48 deletions

.travis.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,8 @@ install:
7272
- |
7373
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
7474
ci install
75-
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
76-
MACHINE=$(uname -m)
77-
if [[ "${MACHINE}" == "s390x" ]] || [[ "${MACHINE}" == "ppc64le" ]]; then
78-
pip install $(pwd)/cryptography*.whl
79-
fi
80-
pip install twine
8175
fi
76+
python -m pip install -r requirements-deploy.txt
8277
8378
script:
8479
- |
@@ -87,7 +82,6 @@ script:
8782
fi
8883
pwd
8984
ls dist
90-
PATH=~/.pyenv/versions/${PYTHON_VERSION}/bin/:$PATH
9185
twine --version
9286
twine check --strict dist/*
9387
@@ -100,7 +94,7 @@ after_success:
10094
deploy:
10195
# deploy-release
10296
- provider: script
103-
script: pwd && ls dist;echo "deploy-release" && PATH=~/.pyenv/versions/${PYTHON_VERSION}/bin/:$PATH && twine upload -u $PYPI_USER -p $PYPI_PASSWORD --skip-existing dist/*
97+
script: pwd && ls dist;echo "deploy-release" && twine upload -u $PYPI_USER -p $PYPI_PASSWORD --skip-existing dist/*
10498
skip_cleanup: true
10599
on:
106100
repo: ${TRAVIS_REPO_SLUG}

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include CMakeLists.txt
22
include CMakeUrls.cmake
3-
include requirements-dev.txt
3+
include requirements-test.txt
44
include HISTORY.rst
55
include README.rst
66
include LICENSE_Apache_20

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ init:
3333

3434
install:
3535
- "%PYTHON_DIR%\\python.exe -m ci install"
36+
- "%PYTHON_DIR%\\python.exe -m pip install -r requirements-deploy.txt"
3637

3738
build_script:
3839
- "%PYTHON_DIR%\\python.exe -m ci build"

requirements-deploy.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
twine
2+
3+
# need to pin cryptography for s390x/ppc64le builds:
4+
# cryptography never provided wheels for those architectures and the
5+
# requirements to build from sources are relaxed when building the 3.3 series
6+
cryptography~=3.3.2 ; sys_platform=="linux" and platform_machine in "s390x, ppc64le"

requirements-dev.txt

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
codecov>=2.0.5
2-
coverage>=4.2
3-
flake8>=3.0.4
4-
path.py>=11.5.0
5-
pytest>=3.0.3
6-
pytest-cov>=2.4.0
7-
pytest-runner>=2.9
8-
pytest-virtualenv>=1.2.5
9-
scikit-build>=0.10.0
10-
setuptools>=28.0.0
11-
twine
12-
virtualenv>=15.0.3
13-
wheel
14-
wheeltools
15-
16-
# need to pin cryptography for manylinux1 builds
17-
# cryptography only provides manylinux2010 wheels since 3.4.0
18-
# because of the lack of a decent rust compiler on manylinux1
19-
cryptography~=3.3.2 ; sys_platform=="linux" and platform_machine in "i386, i486, i586, i686, x86_64"
1+
-r requirements-test.txt
2+
-r requirements-repair.txt
3+
-r requirements-deploy.txt

requirements-repair.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wheeltools @ git+https://github.com/jcfr/wheeltools.git@wheeltools-2018-10-28-a2f174d0e#egg=wheeltools

requirements-test.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
codecov>=2.0.5
2+
coverage>=4.2
3+
flake8>=3.0.4
4+
path.py>=11.5.0
5+
pytest>=3.0.3
6+
pytest-cov>=2.4.0
7+
pytest-runner>=2.9
8+
pytest-virtualenv>=1.7.0
9+
scikit-build>=0.10.0
10+
setuptools>=28.0.0
11+
virtualenv>=15.0.3
12+
wheel

scikit-ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ before_install:
2626
# Support using older manylinux images explicitly setting AUDITWHEEL_* environment variables
2727
os.environ["AUDITWHEEL_ARCH"] = manylinux_arch
2828
os.environ["AUDITWHEEL_PLAT"] = manylinux_version + "_" + manylinux_arch
29-
# CFLAGS
30-
if arch == "x86":
31-
# Required to build cryptography wheel from source for cp37-cp37 when using manylinux-x86
32-
os.environ["CFLAGS"] = "-I/usr/local/ssl/include -L/usr/local/ssl/lib"
3329
# SETUP_CMAKE_ARGS
3430
if arch in ["x86", "x64"]:
3531
os.environ["SETUP_CMAKE_ARGS"] = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl " + os.environ["SETUP_CMAKE_ARGS"]
@@ -67,9 +63,7 @@ install:
6763
commands:
6864
- python -c "import sys; print(sys.version)"
6965
- python -m pip install --disable-pip-version-check --upgrade pip
70-
- pip install pytest-virtualenv -f https://github.com/jcfr/pytest-plugins/releases/tag/v1.7.0.dev15 --pre
71-
- pip install git+https://github.com/jcfr/wheeltools.git@wheeltools-2018-10-28-a2f174d0e
72-
- pip install -r requirements-dev.txt
66+
- pip install -r requirements-test.txt -r requirements-repair.txt
7367

7468
before_build:
7569
commands:

scripts/manylinux2014-build-and-test-wheel.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ export PATH="${MANYLINUX_PYTHON_BIN}:$PATH"
99
cd /io
1010
./scripts/manylinux2014-build-and-install-openssl.sh /tmp/openssl-install shared
1111

12-
MACHINE=$(uname -m)
13-
if [ "${MACHINE}" == "s390x" ] || [ "${MACHINE}" == "ppc64le" ]; then
14-
# build cryptography from sources
15-
yum install -y libffi-devel
16-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal --no-modify-path
17-
export PATH=${HOME}/.cargo/bin:${PATH}
18-
./scripts/manylinux2014-build-and-install-openssl.sh /tmp/openssl-cryptography no-shared -fPIC
19-
CFLAGS="-I/tmp/openssl-cryptography/include" LDFLAGS="-L/tmp/openssl-cryptography/lib" ${MANYLINUX_PYTHON_BIN}/pip wheel --no-binary :all: cryptography
20-
${MANYLINUX_PYTHON_BIN}/pip install ./cryptography*.whl
21-
fi
22-
2312
ci_before_install() {
2413
${MANYLINUX_PYTHON_BIN}/python scripts/ssl-check.py
2514
${MANYLINUX_PYTHON_BIN}/pip install scikit-ci scikit-ci-addons scikit-build

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def parse_requirements(filename):
2626

2727

2828
requirements = []
29-
dev_requirements = parse_requirements('requirements-dev.txt')
29+
test_requirements = parse_requirements('requirements-test.txt')
3030

3131
# Require pytest-runner only when running tests
3232
pytest_runner = (['pytest-runner>=2.0,<3dev']
@@ -89,6 +89,6 @@ def parse_requirements(filename):
8989
keywords='CMake build c++ fortran cross-platform cross-compilation',
9090

9191
install_requires=requirements,
92-
tests_require=dev_requirements,
92+
tests_require=test_requirements,
9393
setup_requires=setup_requires
9494
)

0 commit comments

Comments
 (0)