-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsetup.py
62 lines (50 loc) · 1.89 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import os
import sys
from setuptools import setup, Command
import django_sha2
class RunTests(Command):
user_options = []
def run(self):
os.chdir(self.testproj_dir)
sys.path.append(self.testproj_dir)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
settings_file = os.environ['DJANGO_SETTINGS_MODULE']
settings_mod = __import__(settings_file, {}, {}, [''])
from django.core.management import execute_manager
execute_manager(settings_mod, argv=[__file__, "test"])
def initialize_options(self):
pass
def finalize_options(self):
pass
class RunTests_django13(RunTests):
description = "Run the test suit for the django 1.3 tests."
testproj_dir = os.path.join(os.getcwd(), 'test/django13')
class RunTests_django14(RunTests):
description = "Run the test suit for the django 1.4 tests."
testproj_dir = os.path.join(os.getcwd(), 'test/django14')
setup(
name='django-sha2',
version=django_sha2.__version__,
description='Enable strong password hashes (bcrypt+hmac or SHA-2) in Django by default.',
long_description=open('README.md').read(),
author='Fred Wenzel',
author_email='[email protected]',
url='https://github.com/fwenzel/django-sha2',
license='BSD',
packages=['django_sha2'],
include_package_data=True,
zip_safe=False,
install_requires=['Django>=1.2'],
cmdclass=dict(test13=RunTests_django13, test14=RunTests_django14),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Environment :: Web Environment :: Mozilla',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)