-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
73 lines (61 loc) · 2.13 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
import os
from setuptools import setup, find_packages
PKG_ROOT = os.path.abspath(os.__file__)
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):
"""
Filter packages so that we exclude test cases but include regular test
objects available in openspending.tests' modules (all test cases are
in subdirectories).
"""
# We want to include openspending.tests but not its subpackages
# Hence we only check for things starting with openspending.tests.
# (note the trailing period to denote subpackages)
return not pkg.startswith('openspending.tests.')
setup(
name='openspending',
version='0.17',
description='OpenSpending',
author='Open Knowledge Foundation',
author_email='openspending-dev at lists okfn org',
url='http://github.com/openspending/openspending',
install_requires=[
],
setup_requires=[],
packages=filter(package_filter, find_packages()),
namespace_packages=['openspending'],
package_data={
'openspending': (
files_in_pkgdir('openspending', 'static') +
files_in_pkgdir('openspending', 'templates')
)
},
test_suite='nose.collector',
zip_safe=False,
entry_points={
'console_scripts': [
'ostool = openspending.command:main',
'openspending = openspending.command:main'
]
# 'cubes.stores': [
# 'OpenSpendingStore = openspending.model.provider:OpenSpendingStore'
# ],
# 'cubes.providers': [
# 'openspending = openspending.model.provider:OpenSpendingModelProvider'
# ]
},
message_extractors={
'openspending': [('**.py', 'python', None),
('templates/**.html', 'jinja2', None),
('static/**', 'ignore', None),
]
},
)