forked from mvantellingen/localshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
100 lines (86 loc) · 2.75 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import os
import sys
from setuptools import setup, find_packages, Command
install_requires = [
'Django==1.4.3',
'South==0.7.6',
'Pillow==2.0.0',
'celery==3.0.19',
'kombu==2.5.10',
'django-celery==3.0.17',
'django-model-utils==1.1.0',
'django-userena==1.2.0',
'django-uuidfield==0.4.0',
'django-storages==1.1.8',
'django-configurations==0.1',
'docutils==0.10',
'eventlet==0.10.0',
'gunicorn==0.17.4',
'netaddr==0.7.10',
'requests==1.2.0',
]
tests_requires = [
'mock',
'django-nose==1.1',
'factory-boy==1.2.0',
]
readme = []
with open('README.rst', 'r') as fh:
readme = fh.readlines()
class RunTests(Command):
"""From django-celery"""
description = "Run the django test suite from the tests dir."
user_options = []
extra_env = {}
def run(self):
if self.distribution.install_requires:
self.distribution.fetch_build_eggs(
self.distribution.install_requires)
if self.distribution.tests_require:
self.distribution.fetch_build_eggs(self.distribution.tests_require)
for env_name, env_value in self.extra_env.items():
os.environ[env_name] = str(env_value)
this_dir = os.getcwd()
testproj_dir = os.path.join(this_dir, 'localshop')
os.chdir(testproj_dir)
sys.path.append(testproj_dir)
os.environ['DJANGO_SETTINGS_MODULE'] = os.environ.get(
'DJANGO_SETTINGS_MODULE', 'localshop.settings')
os.environ['DJANGO_CONFIGURATION'] = os.environ.get(
'DJANGO_CONFIGURATION', 'Localshop')
from configurations.management import execute_from_command_line
execute_from_command_line([__file__, 'test'])
def initialize_options(self):
pass
def finalize_options(self):
pass
setup(
name='localshop',
version='0.4.1',
author='Michael van Tellingen',
author_email='michaelvantellingen@gmail.com',
url='http://github.com/mvantellingen/localshop',
description='A private pypi server including auto-mirroring of pypi.',
long_description='\n'.join(readme),
packages=find_packages(),
zip_safe=False,
install_requires=install_requires,
tests_require=tests_requires,
extras_require={'test': tests_requires},
cmdclass={"test": RunTests},
license='BSD',
include_package_data=True,
entry_points={
'console_scripts': [
'localshop = localshop.runner:main'
]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development',
],
)