aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlos Ratis <dastergon@gentoo.org>2013-09-08 03:56:27 +0300
committerPavlos Ratis <dastergon@gentoo.org>2013-09-08 03:56:27 +0300
commitd4a7175c9ee1bc5ee0365f5ce3e14bf4c871a8a5 (patch)
tree8edfb5706bffaa0912bb8021d648f9e411c67512
parentMerge pull request #82 from dastergon/settings (diff)
downloadidentity.gentoo.org-d4a7175c9ee1bc5ee0365f5ce3e14bf4c871a8a5.tar.gz
identity.gentoo.org-d4a7175c9ee1bc5ee0365f5ce3e14bf4c871a8a5.tar.bz2
identity.gentoo.org-d4a7175c9ee1bc5ee0365f5ce3e14bf4c871a8a5.zip
split requirements.txt to multiple files
-rw-r--r--.travis.yml2
-rw-r--r--requirements/base.txt (renamed from requirements.txt)3
-rw-r--r--requirements/extras/mysql.txt1
-rw-r--r--requirements/tests.txt4
-rwxr-xr-xsetup.py50
5 files changed, 32 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml
index 2be9be6..d377514 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@ python:
env:
- DJANGO_VERSION=1.5
install:
- - pip install -r requirements.txt coveralls flake8 --use-mirrors
+ - pip install -r requirements/base.txt -r requirements/tests.txt coveralls flake8 --use-mirrors
branches:
only:
- master
diff --git a/requirements.txt b/requirements/base.txt
index 067e449..5861981 100644
--- a/requirements.txt
+++ b/requirements/base.txt
@@ -1,11 +1,8 @@
django>=1.5
django-auth-ldap>=1.1.4
django-compressor>=1.3
-django-discover-runner>=1.0
django-otp>=0.1.7
git+https://github.com/tampakrap/django-ldapdb@okupy#egg=django-ldapdb
-mock>=1.0.1
-hg+https://bitbucket.org/psagers/mockldap#egg=mockldap
paramiko>=1.10.1
passlib>=1.6.1
pycrypto>=2.6
diff --git a/requirements/extras/mysql.txt b/requirements/extras/mysql.txt
new file mode 100644
index 0000000..1765826
--- /dev/null
+++ b/requirements/extras/mysql.txt
@@ -0,0 +1 @@
+mysql-python>=1.2.3
diff --git a/requirements/tests.txt b/requirements/tests.txt
new file mode 100644
index 0000000..92ef578
--- /dev/null
+++ b/requirements/tests.txt
@@ -0,0 +1,4 @@
+django-discover-runner>=1.0
+hg+https://bitbucket.org/psagers/mockldap#egg=mockldap
+funcparserlib>=0.3.6
+mock>=1.0.1
diff --git a/setup.py b/setup.py
index 306ee40..7d28f46 100755
--- a/setup.py
+++ b/setup.py
@@ -2,8 +2,30 @@
# vim:fileencoding=utf8:et:ts=4:sts=4:sw=4:ft=python
from setuptools import setup, find_packages
+import glob
import okupy
+import os
+extra_deps = {}
+files = glob.glob('requirements/extras/*')
+for path in files:
+ extra_deps[os.path.basename(path).split('.')[0]] = open(path).read().split('\n')[0]
+
+with open('requirements/base.txt', 'r') as f:
+ base_deps = []
+ for line in f:
+ if line.startswith('git+') or line.startswith('hg+'):
+ base_deps.append(line.split('#egg=')[1])
+ else:
+ base_deps.append(line.split('\n')[0])
+
+with open('requirements/tests.txt', 'r') as f:
+ test_deps = []
+ for line in f:
+ if line.startswith('git+') or line.startswith('hg+'):
+ test_deps.append(line.split('#egg=')[1])
+ else:
+ test_deps.append(line.split('\n')[0])
setup(
name='okupy',
version=okupy.__version__,
@@ -29,35 +51,15 @@ setup(
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
],
+
dependency_links=[
'https://bitbucket.org/psagers/mockldap/get/default.tar.gz#egg=mockldap',
'https://github.com/tampakrap/django-ldapdb/archive/okupy.tar.gz#egg=django-ldapdb',
],
- install_requires=[
- 'django>=1.5',
- 'django-auth-ldap>=1.1.4',
- 'django-compressor>=1.3',
- 'django-ldapdb',
- 'django-otp>=0.1.7',
- 'paramiko>=1.10.1',
- 'passlib>=1.6.1',
- 'pycrypto>=2.6',
- 'pyopenssl>=0.13',
- 'python-ldap>=2.4.10',
- 'python-memcached>=1.53',
- 'python-openid>=2.2.5',
- 'pytz>=2012j',
- 'qrcode>=3.0',
- ],
+ install_requires=base_deps,
setup_requires=[
'setuptools>=0.6c11',
],
- tests_require=[
- 'django-discover-runner>=1.0',
- 'mockldap',
- 'mock>=1.0.1',
- ],
- extras_require={
- 'mysql': ['mysql-python>=1.2.3'],
- },
+ tests_require=test_deps,
+ extras_require=extra_deps,
)