1515
1616reqs = 'install.py%d.pip' % sys .version_info [0 ]
1717
18- # if sys.version_info[0] == 2:
19- # reqs = 'install.py2.pip'
20- # app = imp.load_source('concurrency', init)
21- # elif sys.version_info[0] == 3:
22- # reqs = 'install.py3.pip'
23- # if sys.version_info[1] in [3,4]:
24- # from importlib.machinery import SourceFileLoader
25- # app = SourceFileLoader("adminactions", init).load_module()
26- # elif sys.version_info[1] in [5]:
27- # import importlib.util
28- # spec = importlib.util.spec_from_file_location("concurrency", init)
29- # app = importlib.util.module_from_spec(spec)
30- # spec.loader.exec_module(app)
18+ rel = lambda fname : os .path .join (os .path .dirname (__file__ ),
19+ 'src' ,
20+ 'requirements' , fname )
21+
22+
23+ def fread (fname ):
24+ return open (rel (fname )).read ()
25+
26+ install_requires = fread ('install.pip' )
27+ test_requires = fread ('testing.pip' )
28+ dev_requires = fread ('develop.pip' )
3129
3230base_url = 'https://github.com/saxix/django-concurrency/'
3331
3432
3533class PyTest (TestCommand ):
36-
3734 def finalize_options (self ):
3835 TestCommand .finalize_options (self )
3936 self .test_args = ['tests' ]
@@ -43,6 +40,7 @@ def run_tests(self):
4340 # import here, cause outside the eggs aren't loaded
4441 import pytest
4542 import sys
43+
4644 sys .path .insert (0 , os .path .join (ROOT , 'tests' , 'demoapp' ))
4745 errno = pytest .main (self .test_args )
4846 sys .exit (errno )
@@ -74,27 +72,6 @@ def run(self):
7472 remove_tree (self .build_help , dry_run = self .dry_run )
7573 CleanCommand .run (self )
7674
77- install_requires = []
78- test_requires = ["django-webtest>=1.7.5" ,
79- "mock>=1.0.1" ,
80- "check-manifest==0.30" ,
81- "pytest-cache>=1.0" ,
82- "pytest-cov>=1.6" ,
83- "pytest-django>=2.8" ,
84- "pytest-echo>=1.3" ,
85- "pytest-pythonpath" ,
86- "pytest>=2.8" ,
87- "tox>=2.3" ,
88- "WebTest>=2.0.11" ]
89-
90- dev_requires = ["autopep8" ,
91- "coverage" ,
92- "django_extensions" ,
93- "flake8" ,
94- "ipython" ,
95- "pdbpp" ,
96- "psycopg2" ,
97- "sphinx" ]
9875
9976setup (
10077 name = app .NAME ,
0 commit comments