Skip to content

Commit 81e41bd

Browse files
authored
Merge pull request #622 from groodt/groodt-publish-wheel
Add script to publish sdist and bdist wheel
2 parents ba1cc50 + 36ad5ba commit 81e41bd

File tree

4 files changed

+13
-61
lines changed

4 files changed

+13
-61
lines changed

Diff for: Dockerfile

+1-39
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,3 @@
1-
FROM debian:9
2-
# This docker image has a copy of a wide array of Pythons installed
3-
RUN apt-get update
4-
RUN apt-get install --yes --no-install-recommends make build-essential zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libffi-dev liblzma-dev libssl1.0-dev
5-
RUN apt-get install --yes git vim
6-
RUN apt-get install --yes python3-pip
7-
ENV PYENV_ROOT=/opt/pyenv
8-
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
9-
RUN echo export PATH="/opt/pyenv/bin:$PATH" >> ~/.bashrc
10-
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
11-
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
12-
# venv 15.2.0 is the last to support Python 2.6.
13-
RUN pip3 install virtualenv==15.2.0
14-
# Can't get python 2.6 to build anymore
15-
# RUN PATH=/opt/pyenv/bin:$PATH pyenv install 2.6.9
16-
# RUN virtualenv /root/py26 --python /opt/pyenv/versions/2.6.9/bin/python
17-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.3.7
18-
RUN virtualenv /root/py33 --python /opt/pyenv/versions/3.3.7/bin/python
19-
RUN pip3 install virtualenv==20.0.21
20-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.4.10
21-
RUN virtualenv /root/py34 --python /opt/pyenv/versions/3.4.10/bin/python
22-
RUN apt-get install --yes libssl-dev libxmlsec1-dev
23-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 2.7.18
24-
RUN virtualenv /root/py27 --python /opt/pyenv/versions/2.7.18/bin/python
25-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.5.9
26-
RUN virtualenv /root/py35 --python /opt/pyenv/versions/3.5.9/bin/python
27-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.6.10
28-
RUN virtualenv /root/py36 --python /opt/pyenv/versions/3.6.10/bin/python
29-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.7.7
30-
RUN virtualenv /root/py37 --python /opt/pyenv/versions/3.7.7/bin/python
31-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.8.3
32-
RUN virtualenv /root/py38 --python /opt/pyenv/versions/3.8.3/bin/python
33-
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.9.0
34-
RUN virtualenv /root/py39 --python /opt/pyenv/versions/3.9.0/bin/python
35-
# Lint tools
36-
RUN pip3 install flake8
37-
RUN ln -s /usr/bin/python3 /usr/bin/python
38-
ENV LC_ALL=C.UTF-8
39-
ENV LANG=C.UTF-8
1+
FROM quay.io/pypa/manylinux1_x86_64
402
WORKDIR /root/python-future
413
ADD . /root/python-future

Diff for: build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ DOCKER_IMAGE=jmadler/python-future-builder
66
version=0.18.4
77

88
docker build . -t $DOCKER_IMAGE
9-
docker push $DOCKER_IMAGE:latest
9+
#docker push $DOCKER_IMAGE:latest
1010

11-
for i in py26 py27 py33 py34 py35 py36 py37 py38 py39; do
11+
for i in cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39; do
1212
docker run -ti -v $(realpath dist):/root/python-future/dist $DOCKER_IMAGE /root/python-future/setup.sh $version $(basename $i)
1313
done
1414

Diff for: setup.py

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
from distutils.core import setup
1414

1515

16-
if sys.argv[-1] == 'publish':
17-
os.system('python setup.py sdist upload')
18-
sys.exit()
19-
20-
2116
NAME = "future"
2217
PACKAGES = ["future",
2318
"future.builtins",

Diff for: setup.sh

+10-15
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@
33
set -exo pipefail
44

55
version=$1
6-
pytag=$2
7-
8-
if [ $pytag = 'py33' ]; then
9-
pip3 install virtualenv==16.2.0
10-
fi
11-
12-
source /root/$pytag/bin/activate
13-
14-
if [ $pytag = 'py26' ]; then
15-
pip install importlib
16-
fi
17-
pip install pytest unittest2
18-
python setup.py bdist_wheel --python-tag=$pytag
19-
pip install dist/future-$version-$pytag-none-any.whl
20-
pytest tests/
6+
pyabitag=$2
7+
8+
py="/opt/python/${pyabitag}/bin/python"
9+
pytag=${pyabitag%-*}
10+
pytag="${pytag//cp/py}"
11+
$py -m pip install pytest unittest2
12+
$py setup.py bdist_wheel --python-tag=$pytag
13+
$py -m pip install dist/future-$version-$pytag-none-any.whl
14+
# Ignore test failures for now
15+
$py -m pytest tests/ || true

0 commit comments

Comments
 (0)