aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlos Ratis <dastergon@gentoo.org>2013-09-08 03:06:43 -0700
committerPavlos Ratis <dastergon@gentoo.org>2013-09-08 03:06:43 -0700
commit16bd92d979adf29bf092ff641b61ba2aae77c96d (patch)
tree968ec5873fdd15a1356d0a05a4d4c5ac8512ca8b
parentMerge pull request #82 from dastergon/settings (diff)
parentuse oneliner to parse test dependencies (diff)
downloadidentity.gentoo.org-16bd92d979adf29bf092ff641b61ba2aae77c96d.tar.gz
identity.gentoo.org-16bd92d979adf29bf092ff641b61ba2aae77c96d.tar.bz2
identity.gentoo.org-16bd92d979adf29bf092ff641b61ba2aae77c96d.zip
Merge pull request #84 from dastergon/split_req
split requirements.txt to multiple files and improve setup.py
-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/extras/postgres.txt1
-rw-r--r--requirements/tests.txt3
-rwxr-xr-xsetup.py44
6 files changed, 25 insertions, 29 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/extras/postgres.txt b/requirements/extras/postgres.txt
new file mode 100644
index 0000000..7f762a0
--- /dev/null
+++ b/requirements/extras/postgres.txt
@@ -0,0 +1 @@
+psycopg2>=2.5.1
diff --git a/requirements/tests.txt b/requirements/tests.txt
new file mode 100644
index 0000000..21556d6
--- /dev/null
+++ b/requirements/tests.txt
@@ -0,0 +1,3 @@
+django-discover-runner>=1.0
+mock>=1.0.1
+mockldap>=0.1
diff --git a/setup.py b/setup.py
index 306ee40..5ccf736 100755
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,22 @@
# 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])
setup(
name='okupy',
@@ -29,35 +44,14 @@ 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=open('requirements/tests.txt').read().split(),
+ extras_require=extra_deps,
)