Skip to content

Commit 344ad64

Browse files
committed
Build System
1 parent f24fc8c commit 344ad64

File tree

6 files changed

+76
-51
lines changed

6 files changed

+76
-51
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ develop-eggs
2121
.installed.cfg
2222
lib
2323
lib64
24+
MANIFEST
25+
MANIFEST.in
2426

2527
# Backup files
2628
*.bak

.travis.yml

+5-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
1-
sudo: false
2-
language: python
3-
cache: pip
4-
5-
6-
matrix:
7-
include:
8-
- python: 2.6
9-
env: TOXENV=py26
10-
dist: trusty
11-
- python: 2.7
12-
env: TOXENV=py27
13-
- python: 3.3
14-
env: TOXENV=py33
15-
dist: trusty
16-
sudo: false
17-
- python: 3.4
18-
env: TOXENV=py34
19-
- python: 3.5
20-
env: TOXENV=py35
21-
- python: 3.6
22-
env: TOXENV=py36
23-
- python: 3.7
24-
env: TOXENV=py37
25-
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
26-
sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
27-
28-
install:
29-
- pip install tox==2.9.1
30-
- pip install virtualenv==15.2.0
31-
- pip install py==1.4.30
32-
- pip install pluggy==0.5.2
33-
1+
language: generic
342
before_script:
353
# Run flake8 tests only on Python 2.7 and 3.7...
364
# 1) stop the build if there are Python syntax errors or undefined names
@@ -41,5 +9,8 @@ before_script:
419
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics;
4210
fi
4311

12+
services:
13+
- docker
14+
4415
script:
45-
- tox
16+
- ./buildtest.sh

Dockerfile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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. Since the venv module of the installer
13+
RUN pip3 install virtualenv==15.2.0
14+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 2.6.9
15+
RUN virtualenv /opt/py26 --python /opt/pyenv/versions/2.6.9/bin/python
16+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.3.7
17+
RUN virtualenv /root/py33 --python /opt/pyenv/versions/3.3.7/bin/python
18+
RUN pip3 install virtualenv==20.0.21
19+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.4.10
20+
RUN virtualenv /root/py34 --python /opt/pyenv/versions/3.4.10/bin/python
21+
RUN apt-get install --yes libssl-dev libxmlsec1-dev
22+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 2.7.18
23+
RUN virtualenv /root/py27 --python /opt/pyenv/versions/2.7.18/bin/python
24+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.5.9
25+
RUN virtualenv /root/py35 --python /opt/pyenv/versions/3.5.9/bin/python
26+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.6.10
27+
RUN virtualenv /root/py36 --python /opt/pyenv/versions/3.6.10/bin/python
28+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.7.7
29+
RUN virtualenv /root/py37 --python /opt/pyenv/versions/3.7.7/bin/python
30+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.8.3
31+
RUN virtualenv /root/py38 --python /opt/pyenv/versions/3.8.3/bin/python
32+
RUN PATH=/opt/pyenv/bin:$PATH pyenv install 3.9.0a6
33+
RUN virtualenv /root/py39 --python /opt/pyenv/versions/3.9.0a6/bin/python
34+
RUN ln -s /usr/bin/python3 /usr/bin/python
35+
ENV LC_ALL=C.UTF-8
36+
ENV LANG=C.UTF-8
37+
WORKDIR /root/python-future
38+
ADD . /root/python-future

buildtest.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
docker build . -t python-future-builder
2+
3+
version=0.18.2
4+
5+
for i in py26 py27 py33 py34 py35 py36 py37 py38 py39; do
6+
docker run -ti -v ~/code/python-future/dist/:/root/python-future/dist python-future-builder /root/python-future/setup.sh $version $(basename $i)
7+
done
8+
9+
#python setup.py sdist
10+
echo twine upload dist/*

setup.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -exo pipefail
4+
5+
version=$1
6+
pytag=$2
7+
8+
if [ $pytag = 'py33' ]; then
9+
pip 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/
21+
python setup.py clean

tox.ini

-17
This file was deleted.

0 commit comments

Comments
 (0)