Travis build improvements.

The latest patch version of each Django minor version is used.
The build now installs existing pymongo versions.
The build now actually tests against the specified Django version.
Replaced PIL with Pillow.
Added PyPy and Python 3.4 to the build.

Rebase Log:

Installing Pillow instead of PIL for testing since it's recommended and it supports PyPy.

Excluding Django versions that do not work with Python 3.

Improved formatting of .travis.yml.

Specifying Pillow 2.0.0 and above since it's the first version that is supported in Python 3.

PIL should not be installed alongside Pillow.

Also, I installed some libraries that both PIL and Pillow depend on.

It seems I have to be explicit on all envvars in order to exclude Django 1.4 from the build matrix.

The build is now installing pymongo versions that actually exist.

openjpeg has a different name on Ubuntu 12.04.

Restoring libz hack.

Also installing all Pillow requirements just in case.

Fixed the build matrix.

Acting according to @BanzaiMan's advice in travis-ci/travis-ci/#1492.
This commit is contained in:
Omer Katz 2014-06-24 19:39:27 +03:00 committed by Omer Katz
parent f099dc6a37
commit bb461b009f
2 changed files with 47 additions and 15 deletions

View File

@ -6,22 +6,54 @@ python:
- "2.7" - "2.7"
- "3.2" - "3.2"
- "3.3" - "3.3"
- "3.4"
- "pypy"
env: env:
- PYMONGO=dev DJANGO=1.6 - PYMONGO=dev DJANGO=1.6.5
- PYMONGO=dev DJANGO=1.5.5 - PYMONGO=dev DJANGO=1.5.8
- PYMONGO=dev DJANGO=1.4.10 - PYMONGO=dev DJANGO=1.4.13
- PYMONGO=2.5 DJANGO=1.6 - PYMONGO=2.5.2 DJANGO=1.6.5
- PYMONGO=2.5 DJANGO=1.5.5 - PYMONGO=2.5.2 DJANGO=1.5.8
- PYMONGO=2.5 DJANGO=1.4.10 - PYMONGO=2.5.2 DJANGO=1.4.13
- PYMONGO=3.2 DJANGO=1.6 - PYMONGO=2.6.3 DJANGO=1.6.5
- PYMONGO=3.2 DJANGO=1.5.5 - PYMONGO=2.6.3 DJANGO=1.5.8
- PYMONGO=3.3 DJANGO=1.6 - PYMONGO=2.6.3 DJANGO=1.4.13
- PYMONGO=3.3 DJANGO=1.5.5 - PYMONGO=2.7.1 DJANGO=1.6.5
- PYMONGO=2.7.1 DJANGO=1.5.8
- PYMONGO=2.7.1 DJANGO=1.4.13
matrix:
exclude:
- python: "3.2"
env: PYMONGO=dev DJANGO=1.4.13
- python: "3.2"
env: PYMONGO=2.5.2 DJANGO=1.4.13
- python: "3.2"
env: PYMONGO=2.6.3 DJANGO=1.4.13
- python: "3.2"
env: PYMONGO=2.7.1 DJANGO=1.4.13
- python: "3.3"
env: PYMONGO=dev DJANGO=1.4.13
- python: "3.3"
env: PYMONGO=2.5.2 DJANGO=1.4.13
- python: "3.3"
env: PYMONGO=2.6.3 DJANGO=1.4.13
- python: "3.3"
env: PYMONGO=2.7.1 DJANGO=1.4.13
- python: "3.4"
env: PYMONGO=dev DJANGO=1.4.13
- python: "3.4"
env: PYMONGO=2.5.2 DJANGO=1.4.13
- python: "3.4"
env: PYMONGO=2.6.3 DJANGO=1.4.13
- python: "3.4"
env: PYMONGO=2.7.1 DJANGO=1.4.13
install: install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then cp /usr/lib/*/libz.so $VIRTUAL_ENV/lib/; fi - sudo apt-get install python-dev python3-dev libopenjpeg-dev zlib1g-dev libjpeg-turbo8-dev libtiff4-dev libjpeg8-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
- if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then pip install pil --use-mirrors ; true; fi - cp /usr/lib/*/libz.so $VIRTUAL_ENV/lib/
- if [[ $PYMONGO == 'dev' ]]; then pip install https://github.com/mongodb/mongo-python-driver/tarball/master; true; fi - if [[ $PYMONGO == 'dev' ]]; then pip install https://github.com/mongodb/mongo-python-driver/tarball/master; true; fi
- if [[ $PYMONGO != 'dev' ]]; then pip install pymongo==$PYMONGO --use-mirrors; true; fi - if [[ $PYMONGO != 'dev' ]]; then pip install pymongo==$PYMONGO; true; fi
- pip install Django==$DJANGO
- pip install https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.1.tar.gz#md5=1534bb15cf311f07afaa3aacba1c028b - pip install https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.1.tar.gz#md5=1534bb15cf311f07afaa3aacba1c028b
- python setup.py install - python setup.py install
script: script:

View File

@ -51,12 +51,12 @@ CLASSIFIERS = [
extra_opts = {"packages": find_packages(exclude=["tests", "tests.*"])} extra_opts = {"packages": find_packages(exclude=["tests", "tests.*"])}
if sys.version_info[0] == 3: if sys.version_info[0] == 3:
extra_opts['use_2to3'] = True extra_opts['use_2to3'] = True
extra_opts['tests_require'] = ['nose', 'coverage', 'blinker', 'jinja2==2.6', 'django>=1.5.1'] extra_opts['tests_require'] = ['nose', 'coverage', 'blinker', 'jinja2==2.6', 'Pillow>=2.0.0', 'django>=1.5.1']
if "test" in sys.argv or "nosetests" in sys.argv: if "test" in sys.argv or "nosetests" in sys.argv:
extra_opts['packages'] = find_packages() extra_opts['packages'] = find_packages()
extra_opts['package_data'] = {"tests": ["fields/mongoengine.png", "fields/mongodb_leaf.png"]} extra_opts['package_data'] = {"tests": ["fields/mongoengine.png", "fields/mongodb_leaf.png"]}
else: else:
extra_opts['tests_require'] = ['nose', 'coverage', 'blinker', 'django>=1.4.2', 'PIL', 'jinja2>=2.6', 'python-dateutil'] extra_opts['tests_require'] = ['nose', 'coverage', 'blinker', 'django>=1.4.2', 'Pillow>=2.0.0', 'jinja2>=2.6', 'python-dateutil']
setup(name='mongoengine', setup(name='mongoengine',
version=VERSION, version=VERSION,