-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
executable file
·76 lines (60 loc) · 2.26 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
import sys
from setuptools import setup
if sys.version_info[:2] < (3, 7):
error = (
"cryptorandom 0.3+ requires Python 3.7 or later (%d.%d detected). \n"
% sys.version_info[:2]
)
sys.stderr.write(error + "\n")
sys.exit(1)
DISTNAME = 'cryptorandom'
DESCRIPTION = 'Pseudorandom number generator and random sampling using cryptographic hash functions'
AUTHOR = 'Kellie Ottoboni and Philip B. Stark'
URL = 'http://www.github.com/statlab/cryptorandom'
LICENSE = 'BSD License'
DOWNLOAD_URL = 'http://www.github.com/statlab/cryptorandom'
with open("cryptorandom/__init__.py") as fid:
for line in fid:
if line.startswith("__version__"):
VERSION = line.strip().split()[-1][1:-1]
break
with open("README.rst") as fh:
LONG_DESCRIPTION = fh.read()
def parse_requirements_file(filename):
with open(filename, encoding="utf-8") as fid:
requires = [l.strip() for l in fid.readlines() if l]
return requires
INSTALL_REQUIRES = parse_requirements_file("requirements/default.txt")
TESTS_REQUIRE = parse_requirements_file("requirements/test.txt")
if __name__ == "__main__":
setup(
name=DISTNAME,
version=VERSION,
license=LICENSE,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
download_url=DOWNLOAD_URL,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
],
install_requires=INSTALL_REQUIRES,
tests_require=TESTS_REQUIRE,
packages=['cryptorandom', 'cryptorandom.tests',],
)