-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
92 lines (80 loc) · 3.19 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
#!/usr/bin/python
# from distutils.core import setup
import sys
from setuptools import setup
if sys.version_info[:2] >= (3, 3):
# on Python 3.3+, we can import a file directly using importlib.machinery.SourceFileLoader
import importlib.machinery
_loader = importlib.machinery.SourceFileLoader('_author', 'pgpy2/_author.py')
_author = _loader.load_module()
else:
# on Python 2 and 3.2, importlib.machinery.SourceFileLoader doesn't exist
# so we have to use imp to accomplish the same thing
import imp
_author = imp.load_source('_author', 'pgpy/_author.py')
# long_description is the contents of README.rst
with open('README.rst') as readme:
long_desc = readme.read()
_requires = [
'cryptography>=2.6',
'pyasn1',
'six>=1.9.0',
]
_doc_requires = [
'sphinx',
'sphinx-better-theme'
]
if sys.version_info[:2] < (3, 4):
# only depend on enum34 and singledispatch if Python is older than 3.4
_requires += ['singledispatch']
_requires += ['enum34']
setup(
# metadata
name = 'PGPy2',
version = _author.__version__,
description = 'Pretty Good Privacy for Python',
long_description = long_desc,
author = _author.__author__,
license = _author.__license__,
classifiers = ['Development Status :: 4 - Beta',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Security',
'Topic :: Security :: Cryptography',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: BSD License'],
keywords = ["OpenPGP",
"PGP",
"Pretty Good Privacy",
"GPG",
"GnuPG",
"openpgp",
"pgp",
"gnupg",
"gpg",
"encryption",
"signature", ],
# dependencies
install_requires = _requires,
# urls
url = "https://github.com/dkg/PGPy2",
download_url = "https://github.com/dkg/PGPy2/archive/{pgpy_ver}.tar.gz".format(pgpy_ver=_author.__version__),
# bugtrack_url = "https://github.com/dkg/PGPy2/issues",
# package hierarchy
packages = [
"pgpy2",
"pgpy2.packet",
"pgpy2.packet.subpackets"
],
)