Skip to content

Commit

Permalink
Cleanup requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Sep 25, 2015
1 parent 62383df commit d4d37b0
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions requirements/deps/mock.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mock>=1.3
1 change: 1 addition & 0 deletions requirements/deps/nose.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nose>=1.3.7
6 changes: 2 additions & 4 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Sphinx
SQLAlchemy
https://github.com/celery/billiard/zipball/master
https://github.com/celery/py-amqp/zipball/master
https://github.com/celery/kombu/zipball/master
-r requirements/extras/sqlalchemy.txt
-r requirements/dev.txt
1 change: 0 additions & 1 deletion requirements/extras/beanstalk.rst

This file was deleted.

2 changes: 1 addition & 1 deletion requirements/jython.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
threadpool
multiprocessing
-r extras/threads.txt
2 changes: 1 addition & 1 deletion requirements/security.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PyOpenSSL
-r extras/auth.txt
1 change: 1 addition & 0 deletions requirements/test-ci.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage>=3.0
coveralls
-r extras/redis.txt
2 changes: 1 addition & 1 deletion requirements/test-pypy3.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mock
-r deps/mock.txt
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r deps/mock.txt
-r deps/nose.txt
unittest2>=0.5.1
nose
mock>=1.0.1
2 changes: 1 addition & 1 deletion requirements/test3.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nose
-r deps/nose.txt
17 changes: 15 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,24 @@ def strip_comments(l):
return l.split('#', 1)[0].strip()


def reqs(*f):
def _pip_requirement(req):
if req.startswith('-r '):
_, path = req.split()
return reqs(*path.split('/'))
return [req]


def _reqs(*f):
return [
r for r in (
_pip_requirement(r) for r in (
strip_comments(l) for l in open(
os.path.join(os.getcwd(), 'requirements', *f)).readlines()
) if r]


def reqs(*f):
return [req for subreq in _reqs(*f) for req in subreq]

install_requires = reqs('default.txt')
if JYTHON:
install_requires.extend(reqs('jython.txt'))
Expand Down Expand Up @@ -164,6 +175,8 @@ def reqs(*f):
extras_require = {x: extras(x + '.txt') for x in features}
extra['extras_require'] = extras_require

print(tests_require)

# -*- %%% -*-

setup(
Expand Down

0 comments on commit d4d37b0

Please sign in to comment.