-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·71 lines (57 loc) · 2.01 KB
/
setup.py
File metadata and controls
executable file
·71 lines (57 loc) · 2.01 KB
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
#!/usr/bin/env python
import os
import sys
import setuptools
# Utility function to read the README file
def readfile(filename):
with open(filename) as f:
return f.read()
# Utility function to read requirements.txt files
def readreq(filename):
result = []
with open(filename) as f:
for line in f:
line = line.strip()
# Process requirement file references
if line.startswith('-r '):
subfilename = line.split(None, 1)[-1].split('#', 1)[0].strip()
if subfilename:
result += readreq(subfilename)
continue
# Strip out "-e" prefixes
if line.startswith('-e '):
line = line.split(None, 1)[-1]
# Detect URLs in the line
idx = line.find('#egg=')
if idx >= 0:
line = line[idx + 5:]
# Strip off any comments
line = line.split('#', 1)[0].strip()
# Save the requirement
if line:
result.append(line.split('#', 1)[0].strip())
return result
setuptools.setup(
name='cli_tools',
version='1.0.1',
author='Kevin L. Mitchell',
author_email='klmitch@mit.edu',
url='https://github.com/klmitch/cli_tools',
description="Command Line Interface Tools",
long_description=readfile('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: User Interfaces',
],
py_modules=['cli_tools'],
install_requires=readreq('requirements.txt'),
tests_require=readreq('test-requirements.txt'),
)