This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
79 lines (71 loc) · 2.88 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
import os
# Use setuptools only if the user opts-in by setting the USE_SETUPTOOLS env var
# This ensures consistent behavior but allows for advanced usage with
# virtualenv, buildout, and others.
USE_SETUPTOOLS = False
if 'USE_SETUPTOOLS' in os.environ:
try:
from setuptools import setup
USE_SETUPTOOLS = True
except:
USE_SETUPTOOLS = False
if USE_SETUPTOOLS is False:
from distutils.core import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
LICENSE = open(os.path.join(os.path.dirname(__file__), 'LICENSE')).read()
# Tell distutils to put the data_files in platform-specific installation
# locations. See here for an explanation:
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
from distutils.command.install import INSTALL_SCHEMES
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
DATA_FILES = []
DATA_PATH = 'django_saltapi'
for dirpath, dirnames, filenames in os.walk(DATA_PATH, topdown=True):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'): del dirnames[i]
if filenames:
DATA_FILES.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name = 'django-saltapi',
version = '0.7.6',
packages = ['django_saltapi'],
license = LICENSE,
description = 'This Django app serves as the REST API for Salt.',
long_description = README,
url = 'https://github.com/holmboe/django-saltapi',
author = 'Henrik Holmboe',
author_email = 'henrik@holmboe.se',
install_requires=open('requirements.txt').readlines(),
scripts = [
'scripts/django-saltapi',
'scripts/django-saltapi-ping',
'scripts/django-saltapi-echo',
'scripts/django-saltapi-job',
'scripts/django-saltapi-minion',
],
data_files = DATA_FILES,
classifiers = [
#'Development Status :: 1 - Planning',
#'Development Status :: 2 - Pre-Alpha',
'Development Status :: 3 - Alpha',
#'Development Status :: 4 - Beta',
#'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Environment :: Console',
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: System :: Distributed Computing',
],
)