forked from in-toto/in-toto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·108 lines (94 loc) · 3.53 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/env python
"""
<Program Name>
setup.py
<Author>
Santiago Torres <[email protected]>
Lukas Puehringer <[email protected]>
<Started>
May 23, 2016
<Copyright>
See LICENSE for licensing information.
<Purpose>
setup.py script to install in-toto framework and in-toto scripts
See https://in-toto.readthedocs.io/en/latest/installing.html for installation
instructions.
"""
import io
import os
import re
from setuptools import setup, find_packages
base_dir = os.path.dirname(os.path.abspath(__file__))
def get_version(filename="in_toto/__init__.py"):
"""
Gather version number from specified file.
This is done through regex processing, so the file is not imported or
otherwise executed.
No format verification of the resulting version number is done.
"""
with io.open(os.path.join(base_dir, filename), encoding="utf-8") as initfile:
for line in initfile.readlines():
m = re.match("__version__ *= *['\"](.*)['\"]", line)
if m:
return m.group(1)
with open("README.md") as f:
long_description = f.read()
setup(
name="in-toto",
author="New York University: Secure Systems Lab",
author_email="[email protected]",
url="https://in-toto.io",
description=("A framework to define and secure the integrity of "
"software supply chains"),
long_description_content_type="text/markdown",
long_description=long_description,
license="Apache-2.0",
keywords="software supply chain security",
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Security',
'Topic :: Software Development'
],
python_requires="~=3.6",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests",
"debian"]),
install_requires=["securesystemslib[crypto]>=0.18.0", "attrs",
"python-dateutil", "iso8601", "pathspec"],
extras_require={
# Install pynacl as optional dependency to use with securesystemslib, as a
# workaround for `"ssl-pynacl": ["securesystemslib[pynacl]>=0.11.3"]`,
# which currently is not supported in "extra_require" (see pypa/pip#4957).
# TODO: Keep track of changes (version, additional requirements) under the
# "pynacl" key in securesystemslib's setup.py.
# https://github.com/secure-systems-lab/securesystemslib/blob/master/setup.py#L101
"pynacl": ["pynacl>1.2.0"]
},
test_suite="tests.runtests",
tests_require=["mock"],
entry_points={
"console_scripts": ["in-toto-run = in_toto.in_toto_run:main",
"in-toto-mock = in_toto.in_toto_mock:main",
"in-toto-record = in_toto.in_toto_record:main",
"in-toto-verify = in_toto.in_toto_verify:main",
"in-toto-sign = in_toto.in_toto_sign:main",
"in-toto-keygen = in_toto.in_toto_keygen:main"]
},
project_urls={
"Source": "https://github.com/in-toto/in-toto",
"Bug Reports": "https://github.com/in-toto/in-toto/issues",
},
version=get_version(),
)