-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
137 lines (110 loc) · 3.42 KB
/
setup.py
File metadata and controls
137 lines (110 loc) · 3.42 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# coding: utf-8
"""
Cactus
Static site generation and deployment.
:copyright: (c) 2012 Florian Finke.
:license: MIT
"""
import os
import re
import sys
import platform
from setuptools import setup
from setuptools.command.test import test as TestCommand
def fileList(paths, relative=False, folders=False):
"""
Generate a recursive list of files from a given path.
"""
try:
basestring
except NameError:
# Python 3
basestring = unicode = str
if isinstance(paths, basestring):
paths = [paths]
files = []
for path in paths:
for fileName in os.listdir(path):
if fileName.startswith('.'):
continue
filePath = os.path.join(path, fileName)
if os.path.isdir(filePath):
if folders:
files.append(filePath)
files += fileList(filePath)
else:
files.append(filePath)
if relative:
files = map(lambda x: x[len(path) + 1:], files)
return files
package_data = {
'cactus': map(lambda f: re.sub(r'^cactus/', '', f), fileList("cactus/skeletons"))
}
for name in os.listdir('cactus/plugins'):
package_data["cactus"].append("plugins/{0}".format(name))
for name in os.listdir('cactus/context_processors'):
package_data["cactus"].append("context_processors/{0}".format(name))
for name in os.listdir('cactus/tests'):
package_data["cactus"].append("tests/{0}".format(name))
reqs = [
'Django>=1.4.1,<1.7.0',
'PyYAML==3.10',
'paramiko==1.9.0',
'slimit>=0.7.3,<=0.7.4',
'BeautifulSoup==3.2.0',
'boto==2.8.0',
'hamlpy==0.82.2',
'Twisted==13.2.0',
]
if platform.system() != "Darwin":
reqs.append('selenium==2.27.0')
class Tox(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import tox
errno = tox.cmdline(self.test_args)
sys.exit(errno)
setup(
name='Cactus',
version="1.6.3",
description="Static site generation and deployment.",
long_description=__doc__,
url='http://github.com/randomknowledge/Cactus_Refactored',
author='Florian Finke',
author_email='flo@randomknowledge.org',
license='MIT',
packages=['cactus', 'cactus.tasks', 'cactus.s3', 'cactus.templatetags', ],
package_data=package_data,
entry_points={
'console_scripts': [
'cactus = cactus.cli:main',
],
},
install_requires=reqs,
tests_require=['tox', ],
cmdclass={'test': Tox},
zip_safe=False,
classifiers=[
#'Development Status :: 1 - Planning',
#'Development Status :: 2 - Pre-Alpha',
#'Development Status :: 3 - Alpha',
#'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
#'Development Status :: 6 - Mature',
#'Development Status :: 7 - Inactive',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: Unix',
'Environment :: Web Environment',
'Framework :: Django',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)