Commit 2e8d9184 by benjaoming

Merge pull request #321 from jluttine/fix-requirements

Fix requirements
parents 55eb10aa 70e78eb9
...@@ -5,25 +5,25 @@ python: ...@@ -5,25 +5,25 @@ python:
- "3.2" - "3.2"
- "3.3" - "3.3"
env: env:
- DJANGO="Django>=1.4,<1.5" SOUTH="South>=0.8.4" SORLTHUMBNAIL="sorl-thumbnail<11.12.1" - DJANGO="Django>=1.4,<1.5"
- DJANGO="Django>=1.5,<1.6" SOUTH="South>=0.8.4" SORLTHUMBNAIL="sorl-thumbnail>=11.12.1b" - DJANGO="Django>=1.5,<1.6"
- DJANGO="Django>=1.6,<1.7" SOUTH="South>=0.8.4" SORLTHUMBNAIL="sorl-thumbnail>=11.12.1b" - DJANGO="Django>=1.6,<1.7"
- DJANGO="https://www.djangoproject.com/download/1.7.b4/tarball/" SOUTH="" SORLTHUMBNAIL="sorl-thumbnail>=11.12.1b" - DJANGO="Django>=1.7,<1.8"
install: install:
- pip install $DJANGO $SOUTH $SORLTHUMBNAIL -r .travis/requirements.txt - pip install $DJANGO -r requirements.txt
matrix: matrix:
exclude: exclude:
# Python 2.6 support has been dropped in Django 1.7 # Python 2.6 support has been dropped in Django 1.7
- python: "2.6" - python: "2.6"
env: DJANGO="https://www.djangoproject.com/download/1.7.b4/tarball/" SOUTH="" SORLTHUMBNAIL="sorl-thumbnail>=11.12.1b" env: DJANGO="Django>=1.7,<1.8"
# Support for python 3 was added in Django 1.5 # Support for python 3 was added in Django 1.5
- python: "3.3" - python: "3.3"
env: DJANGO="Django>=1.4,<1.5" SOUTH="South>=0.8.4" SORLTHUMBNAIL="sorl-thumbnail<11.12.1" env: DJANGO="Django>=1.4,<1.5"
- python: "3.2" - python: "3.2"
env: DJANGO="Django>=1.4,<1.5" SOUTH="South>=0.8.4" SORLTHUMBNAIL="sorl-thumbnail<11.12.1" env: DJANGO="Django>=1.4,<1.5"
# command to run tests # command to run tests
script: script:
- cd testproject ; python -W error:"":"":0 manage.py test wiki --settings=testproject.settings.travis - cd testproject ; python -W error:"":"":0 manage.py test wiki --settings=testproject.settings.travis --traceback
notifications: notifications:
irc: irc:
- "irc.freenode.org#django-wiki" - "irc.freenode.org#django-wiki"
# Common denominators for testing
Markdown>=2.2.0
django-sekizai>=0.7
# Removed for now because it is not universal as sorl is broken on
# django 1.4: https://github.com/mariocesar/sorl-thumbnail/issues/255
# sorl-thumbnail>=11.12.1b
# Switch to Pillow and the dev version of sorl v12
Pillow
# Notification system
django-nyt>=0.9.1
# django-mptt 0.6.1 is broken, see #316
django-mptt==0.6.0
six
django>=1.4,<1.7 # For general guidance on setup.py vs requirements.txt, see:
Markdown>2.2.0 # https://caremad.io/blog/setup-vs-requirement/
django-sekizai>=0.7
# django-mptt 0.6.1 is broken, see #316 # You can add installation specific requirements here
django-mptt==0.6.0 # ...
# Now with compatibility for django 1.6 # Install requirements from setup.py (and install the local package)
sorl-thumbnail>=11.12.1b -e .
Pillow
six
# Notification system
django-nyt>=0.9.3
...@@ -18,18 +18,41 @@ def read(fname): ...@@ -18,18 +18,41 @@ def read(fname):
return open(get_path(fname)).read() return open(get_path(fname)).read()
def dynamic_requirements(requirements): requirements = [
"Django>=1.4,<1.7",
try: "django-sekizai>=0.7",
from django import VERSION "Pillow",
if VERSION < (1, 7): "django-nyt>=0.9.3",
requirements.append("South>=0.8,!=0.8.3") "django-mptt==0.6.0", # 0.6.1 broken: https://github.com/django-mptt/django-mptt/issues/316
except ImportError: "six"
# No django so assuming that a new one will ]
# get installed...
pass
return requirements
# Requirements that depend on Django version: South and sorl-thumbnail
try:
from django import VERSION as DJANGO_VERSION
except ImportError:
# No django so assuming that a new one will get installed...
# TODO/FIXME: Remove the South req line here when Django>=1.7 is accepted
requirements.append("South>=0.8.4")
requirements.append("sorl-thumbnail>=11.12.1b")
else:
if DJANGO_VERSION < (1, 7):
requirements.append("South>=0.8.4")
if DJANGO_VERSION < (1, 5):
# For Django 1.4, use sorl-thumbnail<11.12.1:
# https://github.com/mariocesar/sorl-thumbnail/issues/255
requirements.append("sorl-thumbnail<11.12.1")
else:
requirements.append("sorl-thumbnail>=11.12.1b")
# Requirements that depend on Python version: Markdown
from sys import version_info as PYTHON_VERSION
if PYTHON_VERSION < (2, 7):
# For Python 2.6, use Markdown<2.5.0, see
# https://github.com/waylan/Python-Markdown/issues/349
requirements.append("Markdown>2.2.0,<2.5.0")
else:
requirements.append("Markdown>2.2.0")
packages = find_packages() packages = find_packages()
...@@ -58,7 +81,7 @@ setup( ...@@ -58,7 +81,7 @@ setup(
packages=find_packages(exclude=["testproject", "testproject.*"]), packages=find_packages(exclude=["testproject", "testproject.*"]),
# long_description=long_description, # long_description=long_description,
zip_safe=False, zip_safe=False,
install_requires=dynamic_requirements(read('requirements.txt').split("\n")), install_requires=requirements,
classifiers=[ classifiers=[
'Development Status :: 3 - Alpha', 'Development Status :: 3 - Alpha',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment