-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
59 lines (50 loc) · 1.59 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
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
def read_requirements(filename):
specifiers = []
dep_links = []
with open(filename, "r") as f:
for line in f:
if line.startswith("-r") or line.strip() == "":
continue
if line.startswith("git+"):
dep_links.append(line.strip())
else:
specifiers.append(line.strip())
return specifiers, dep_links
setup_py_path = os.path.dirname(os.path.realpath(__file__))
requirements_file = os.path.join(setup_py_path, "requirements.txt")
test_requirements_file = os.path.join(setup_py_path, "test-requirements.txt")
install_requires, deps_links = read_requirements(requirements_file)
tests_require, _ = read_requirements(test_requirements_file)
if _:
deps_links.extend(_)
setup(
name="cts",
description="Compose Tracking service",
version="1.3.0",
classifiers=[
"Programming Language :: Python",
"Topic :: Software Development :: Build Tools",
],
keywords="compose tracking service",
author="The Compose Team",
author_email="[email protected]",
url="https://pagure.io/cts/",
license="MIT",
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
tests_require=tests_require,
dependency_links=deps_links,
entry_points={
"console_scripts": [
"cts-manager = cts.manage:cli",
],
},
data_files=[
("/etc/cts/", ["conf/config.py"]),
],
)