|
1 | 1 | #!/usr/bin/env python |
2 | 2 | import os |
3 | 3 | import sys |
| 4 | +import imp |
4 | 5 | from distutils import log |
5 | 6 | from distutils.command.clean import clean as CleanCommand |
6 | 7 | from distutils.dir_util import remove_tree |
|
9 | 10 | from setuptools.command.test import test as TestCommand |
10 | 11 |
|
11 | 12 | ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__))) |
12 | | -sys.path.insert(0, os.path.join(ROOT, 'src')) |
| 13 | +init = os.path.join(ROOT, 'src', 'concurrency', '__init__.py') |
| 14 | +app = imp.load_source('concurrency', init) |
| 15 | + |
| 16 | +reqs = 'install.py%d.pip' % sys.version_info[0] |
| 17 | + |
| 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) |
13 | 31 |
|
14 | | -app = __import__('concurrency') |
15 | 32 | base_url = 'https://github.com/saxix/django-concurrency/' |
16 | | -install_requires = [] |
17 | 33 |
|
18 | 34 |
|
19 | 35 | class PyTest(TestCommand): |
@@ -58,9 +74,10 @@ def run(self): |
58 | 74 | remove_tree(self.build_help, dry_run=self.dry_run) |
59 | 75 | CleanCommand.run(self) |
60 | 76 |
|
61 | | -install_requires = ["django"] |
| 77 | +install_requires = [] |
62 | 78 | test_requires = ["django-webtest>=1.7.5", |
63 | 79 | "mock>=1.0.1", |
| 80 | + "check-manifest==0.30", |
64 | 81 | "pytest-cache>=1.0", |
65 | 82 | "pytest-cov>=1.6", |
66 | 83 | "pytest-django>=2.8", |
@@ -104,9 +121,8 @@ def run(self): |
104 | 121 | 'License :: OSI Approved :: BSD License', |
105 | 122 | 'Operating System :: OS Independent', |
106 | 123 | 'Programming Language :: Python', |
107 | | - 'Framework :: Django :: 1.6', |
108 | | - 'Framework :: Django :: 1.7', |
109 | 124 | 'Framework :: Django :: 1.8', |
| 125 | + 'Framework :: Django :: 1.9', |
110 | 126 | 'Programming Language :: Python :: 2.7', |
111 | 127 | 'Programming Language :: Python :: 3', |
112 | 128 | 'Programming Language :: Python :: 3.3', |
|
0 commit comments