This repository has been archived by the owner on Mar 2, 2018. It is now read-only.
forked from openspending/openspending
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
78 lines (68 loc) · 2.22 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
import os
from setuptools import setup, find_packages
from openspending.version import __version__
PKG_ROOT = '.'
def files_in_pkgdir(pkg, dirname):
pkgdir = os.path.join(PKG_ROOT, *pkg.split('.'))
walkdir = os.path.join(pkgdir, dirname)
walkfiles = []
for dirpath, _, files in os.walk(walkdir):
fpaths = (os.path.relpath(os.path.join(dirpath, f), pkgdir)
for f in files)
walkfiles += fpaths
return walkfiles
def package_filter(pkg):
if pkg in ['openspending.test', 'openspending.test.helpers']:
return True
elif (pkg.startswith('openspending.test') or
pkg.startswith('openspending.ui.test')):
return False
else:
return True
setup(
name='openspending',
version=__version__,
description='OpenSpending',
author='Open Knowledge Foundation',
author_email='okfn-help at lists okfn org',
url='http://github.com/okfn/openspending',
install_requires=[
],
setup_requires=[
"PasteScript==1.7.5",
"nose==1.1.2"
],
packages=filter(package_filter, find_packages()),
namespace_packages=['openspending'],
package_data={
'openspending.ui': (
files_in_pkgdir('openspending.ui', 'public') +
files_in_pkgdir('openspending.ui', 'templates')
)
},
test_suite='nose.collector',
zip_safe=False,
paster_plugins=['PasteScript', 'Pylons'],
entry_points={
'paste.app_factory': [
'main = openspending.ui.config.middleware:make_app'
],
'paste.app_install': [
'main = pylons.util:PylonsInstaller'
],
'console_scripts': [
'ostool = openspending.command:main'
],
'paste.global_paster_command': [
'celeryd=openspending.command.celery:CeleryDaemonCommand',
]
},
message_extractors = {'openspending': [
('**.py', 'python', None),
('ui/templates/help/**.html', 'ignore', None),
('ui/templates/**.html', 'genshi', {
'ignore_tags': 'script http://www.w3.org/1999/xhtml}script style http://www.w3.org/1999/xhtml}style'
}),
('ui/public/**', 'ignore', None),
]},
)