forked from evansde77/cirrus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
50 lines (42 loc) · 1.32 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
#!/usr/bin/env python
"""
_setup.py_
Setup script for cirrus.
"""
import configparser
import setuptools
#
# read the cirrus conf for this package
#
config = configparser.RawConfigParser()
config.read("cirrus.conf")
#
# grab the commands to be installed from thr cirrus conf
#
scripts = [
"{0}={1}".format(key, config.get('commands', key))
for key in config.options("commands")
]
requirements_file = open('requirements.txt')
# Manually parse the requirements file. Pip 1.5.6 to 6.0 has a function
# behavior change for pip.req.parse_requirements. You must use the setuptools
# format when specifying requirements.
# - https://pythonhosted.org/setuptools/setuptools.html#declaring-dependencies
# Furthermore, you can't use line continuations with the following:
requirements = requirements_file.read().strip().split('\n')
setuptools.setup(
name=config.get("package", "name"),
version=config.get("package", "version"),
description=config.get("package", "description"),
package_dir={"":"src"},
url="https://github.com/evansde77/cirrus",
author="Dave Evans",
author_email="[email protected]",
include_package_data=True,
install_requires=requirements,
packages=setuptools.find_packages("src"),
entry_points = {
"console_scripts": scripts,
"cirrus_commands": scripts
}
)