-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
41 lines (34 loc) · 1.01 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
"""Install siptools."""
import os
from setuptools import setup, find_packages
from version import get_version
def scripts_list():
"""Return list of command line tools from package pas.scripts."""
scripts = []
for modulename in os.listdir('siptools/scripts'):
if modulename == '__init__.py':
continue
if not modulename.endswith('.py'):
continue
modulename = modulename.replace('.py', '')
scriptname = modulename.replace('_', '-')
scripts.append(
'{} = siptools.scripts.{}:main'.format(scriptname, modulename)
)
print(scripts)
return scripts
def main():
"""Install siptools."""
setup(
name='siptools',
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
version=get_version(),
install_requires=[
"lxml",
"click",
],
entry_points={'console_scripts': scripts_list()}
)
if __name__ == '__main__':
main()