-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
76 lines (65 loc) · 2 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
"""Setup for Pypi"""
import os
from setuptools import setup, find_packages
version = '1.0.8'
packages = find_packages(exclude=['test'])
def get_pkg_data(pkg_name, data_dirs, extensions):
"""Recusrively get package data.
This should be called from within setup.py's setuptools.setup() function,
e.g. package_data={'my_package': get_pkg_data(pkg_name='my_pckage', ...)}
Args:
pkg_name (str): Name of package containing package data.
data_dirs (list):
extensions (list):
Returns:
list: List of glob strings where each string represents a terminal
branch node (i.e. folder) and a glob of all files ending in designated
extension(s).
Examples:
Args: get_pkg_data(pkg_name='my_package',
src_dirs=['templates'], extensions=['html'])
Returns: [
'templates/*.html',
'templates/content/*.html',
'templates/content/prompt/*.html',
'templates/content/prompt/inputs/*.html']
"""
pkg_root = \
os.path.dirname(os.path.realpath(__file__)) + '/{}/'.format(pkg_name)
pkg_data = []
for _dir in data_dirs:
for ext in extensions:
for i, j, y in os.walk(pkg_root + _dir):
pkg_data.append(i + '/*.' + ext)
return pkg_data
setup(
name='snap-tam',
version=version,
author='Joe Flack',
author_email='[email protected]',
url='http://www.modeltb.org',
packages=packages,
package_dir={
'snap-tam': 'snap_tam'
},
package_data={
'snap_tam': [
'config.json'
]
},
entry_points={
'console_scripts': [
'snap-tam=snap_tam.cli:cli'
],
},
# license='LICENSE.txt',
license='',
description='Utility for ModelTB.org team. Aggregates SNaP reports to a '
'single file.',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
install_requires=[
'openpyxl>=3.0.5',
'pandas>=1.1.5'
]
)