Skip to content

Commit 02f690a

Browse files
committed
update travis for manylinux1 wheels to pypi
1 parent 5c4a479 commit 02f690a

File tree

2 files changed

+114
-46
lines changed

2 files changed

+114
-46
lines changed

.ci/build-wheels.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
5+
PYALL="cp27-cp27m cp27-cp27mu cp33-cp33m cp34-cp34m cp35-cp35m cp36-cp36m"
6+
7+
pwd
8+
ls .
9+
10+
ls /io
11+
12+
cd /io
13+
14+
ls -l /opt/python/
15+
# Compile wheels
16+
for PYBIN in $PYALL; do
17+
echo "/opt/python/${PYBIN}/bin/pip"
18+
#"/opt/python/${PYBIN}/bin/pip" install -r /io/requirements.txt
19+
#"/opt/python/${PYBIN}/bin/pip" wheel /io/ -w wheelhouse/
20+
"/opt/python/${PYBIN}/bin/python" setup.py bdist_wheel --dist-dir wheelhouse
21+
done
22+
23+
# Bundle external shared libraries into the wheels
24+
for whl in wheelhouse/*.whl; do
25+
auditwheel repair "$whl" -w /io/wheelhouse/
26+
done
27+
28+
# Install packages and test
29+
#for PYBIN in /opt/python/*/bin/; do
30+
# "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse
31+
# (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo)
32+
#done

.travis.yml

Lines changed: 82 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,89 @@
1+
env:
2+
global:
3+
- TWINE_USERNAME=dhidas
4+
5+
os: linux
16
language: python
2-
python:
3-
# We don't actually use the Travis Python, but this keeps it organized.
4-
- "2.7"
5-
- "3.3"
6-
- "3.4"
7-
- "3.5"
8-
- "3.6"
9-
10-
os:
11-
- linux
7+
python: 3.6
8+
9+
matrix:
10+
include:
11+
- sudo: required
12+
services:
13+
- docker
14+
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
15+
16+
install:
17+
- pip install -U twine
18+
- docker pull $DOCKER_IMAGE
19+
20+
script:
21+
- pip install -U twine
22+
- docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/.ci/build-wheels.sh
23+
- ls wheelhouse/
24+
- twine upload -r pypi wheelhouse/*manylinux1_x86_64.whl
25+
26+
skip_cleanup: true
27+
28+
#language: generic
29+
#language: python
30+
#python:
31+
# # We don't actually use the Travis Python, but this keeps it organized.
32+
# - "2.7"
33+
# - "3.3"
34+
# - "3.4"
35+
# - "3.5"
36+
# - "3.6"
37+
38+
#os:
39+
# - linux
1240
# - osx
1341

1442
compiler:
15-
- gcc
16-
- clang
43+
# - gcc
44+
# - clang
45+
46+
# Perform the manual steps on osx to install python3 and activate venv
47+
#before_install:
48+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
49+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
50+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then virtualenv venv -p python3; fi
51+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi
52+
1753

1854
install:
19-
- sudo apt-get update
20-
21-
# Deal with python versions and osx vs linux
22-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
23-
export MYSYS="MacOSX";
24-
else
25-
export MYSYS="Linux";
26-
fi
27-
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
28-
wget https://repo.continuum.io/miniconda/Miniconda2-latest-$MYSYS-x86_64.sh -O miniconda.sh;
29-
else
30-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-$MYSYS-x86_64.sh -O miniconda.sh;
31-
fi
32-
33-
# Get what we need from conda
34-
- bash miniconda.sh -b -p $HOME/miniconda
35-
- export PATH="$HOME/miniconda/bin:$PATH"
36-
- hash -r
37-
- conda config --set always_yes yes --set changeps1 no
38-
- conda update -q conda
39-
- conda info -a
40-
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
41-
- source activate test-environment
42-
43-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
44-
export MYSYS="MacOSX";
45-
else
46-
export MYSYS="Linux";
47-
fi
48-
49-
50-
- python setup.py install
55+
# - sudo apt-get update
56+
#
57+
# # Deal with python versions and osx vs linux
58+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
59+
# export MYSYS="MacOSX";
60+
# else
61+
# export MYSYS="Linux";
62+
# fi
63+
# - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
64+
# wget https://repo.continuum.io/miniconda/Miniconda2-latest-$MYSYS-x86_64.sh -O miniconda.sh;
65+
# else
66+
# wget https://repo.continuum.io/miniconda/Miniconda3-latest-$MYSYS-x86_64.sh -O miniconda.sh;
67+
# fi
68+
#
69+
# # Get what we need from conda
70+
# - bash miniconda.sh -b -p $HOME/miniconda
71+
# - export PATH="$HOME/miniconda/bin:$PATH"
72+
# - hash -r
73+
# - conda config --set always_yes yes --set changeps1 no
74+
# - conda update -q conda
75+
# - conda info -a
76+
# - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
77+
# - source activate test-environment
78+
#
79+
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
80+
# export MYSYS="MacOSX";
81+
# else
82+
# export MYSYS="Linux";
83+
# fi
84+
#
85+
#
86+
# - python setup.py install
5187

52-
script:
53-
- python test/test.py
88+
#script:
89+
# - python test/test.py

0 commit comments

Comments
 (0)