-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
executable file
·74 lines (64 loc) · 2.66 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
"""Whirlpool: Bindings for whirlpool hash reference implementation."""
import os
import sys
from setuptools import setup, Extension
if sys.version_info.major < 3:
from io import open
VERSION = '1.0.1.dev0'
GITHUB_URL = 'https://github.com/oohlaf/python-whirlpool'
DOWNLOAD_URL = '{}/archive/{}.zip'.format(GITHUB_URL, VERSION)
DOCLINES = __doc__.strip().split('\n')
HERE = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(HERE, 'README.md'), encoding='utf-8') as f:
README = '\n' + f.read()
with open(os.path.join(HERE, 'CHANGELOG.md'), encoding='utf-8') as f:
CHANGELOG = '\n' + f.read()
LONG_DESC = README + '\n' + CHANGELOG
try:
import pypandoc
LONG_DESC = pypandoc.convert_text(LONG_DESC, 'rst', format='markdown')
LONG_DESC_CTYPE = 'text/x-rst'
except (IOError, ImportError):
LONG_DESC_CTYPE = 'text/markdown'
setup(name="Whirlpool",
version=VERSION,
description=DOCLINES[0],
long_description=LONG_DESC,
long_description_content_type=LONG_DESC_CTYPE,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: Public Domain",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security :: Cryptography",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="digest hashlib whirlpool",
url=GITHUB_URL,
download_url=DOWNLOAD_URL,
maintainer="Olaf Conradi",
maintainer_email="[email protected]",
license="Public Domain",
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*",
platforms=["any"],
ext_modules=[Extension("whirlpool", ["whirlpool/pywhirlpool.c"],
include_dirs=["lib"])],
data_files=[("whirlpool", ['lib/nessie.h', "lib/Whirlpool.c"])],
test_suite="test"
)