forked from toladata/TolaActivity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
87 lines (78 loc) · 2.51 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
# -*- coding: utf-8 -*-
import os
from os.path import join, dirname, abspath
from setuptools import setup
from setuptools.command.install import install
import shutil
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(join(abspath(__file__), os.pardir)))
class InstallCommand(install):
def run(self):
shutil.copy('__init__.py', '__init__.py.bak')
shutil.copy('__init__.lib.py', '__init__.py')
install.run(self)
shutil.move('__init__.py.bak', '__init__.py')
with open(join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
def load_requirements(load_dependency_links=False):
lines = open(join(dirname(__file__), 'requirements/pkg.txt')).readlines()
requirements = []
for line in lines:
if 'https' in line and load_dependency_links:
requirements.append(line)
elif 'https' not in line and not load_dependency_links:
requirements.append(line)
return requirements
setup(
name='tola_activity',
version='2.0',
install_requires=load_requirements(),
dependency_links=load_requirements(load_dependency_links=True),
packages=[
'factories',
'formlibrary.migrations',
'indicators.migrations',
'search.migrations',
'workflow',
'workflow.migrations',
],
py_modules=[
'__init__',
# formlibrary
'formlibrary.admin',
'formlibrary.models',
# indicators
'indicators.admin',
'indicators.models',
# search
'search.admin',
'search.apps',
'search.exceptions',
'search.models',
'search.utils',
'search.urls',
'search.views',
# search.management.commands
'search.management.__init__',
'search.management.commands.__init__',
'search.management.commands.search-index',
# tola
'tola.__init__',
'tola.track_sync',
'tola.utils',
# tola.management.commands
'tola.management.__init__',
'tola.management.commands.__init__',
'tola.management.commands.loadinitialdata',
'tola.management.commands.synctrack',
],
cmdclass={
'install': InstallCommand,
},
description=('Workflow, visualizations and data services for managing NGO '
'projects and programs.'),
url='https://github.com/toladata/TolaActivity',
long_description=README,
author=u'Rafael Muñoz Cárdenas',
author_email='[email protected]',
)