-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
121 lines (106 loc) · 3.05 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
109
110
111
112
113
114
115
116
117
118
119
120
121
from __future__ import print_function
# import ez_setup
# ez_setup.use_setuptools()
import sys
from typtop.config import (
VERSION, set_distro, first_msg, GITHUB_URL
)
if sys.argv[-1] == 'tag':
import subprocess
subprocess.Popen("git tag -f -a {0} -m 'Release: {0}'"\
.format(VERSION), shell=True)
exit(0)
if sys.argv[-1] == 'upload':
import subprocess
subprocess.Popen(
"git push origin --tags && git push origin master", shell=True
)
subprocess.Popen(
"python setup.py bdist_wheel bdist_egg sdist upload -r pypitest", shell=True
)
exit(0)
if sys.argv[-1] == 'publish':
import subprocess
subprocess.Popen(
"git push origin --tags && git push origin master", shell=True
)
subprocess.Popen(
"python setup.py bdist_wheel bdist_egg sdist upload -r pypi", shell=True
)
exit(0)
from setuptools import setup
SCRIPTS = [
# 'typtop/send_typo_log.py', # all in typtop
'typtop/typtops.py'
]
DISTRO = set_distro()
# OLD, not used now
LIB_DEPENDENCIES = {
'debian': [
'libffi-dev', 'python-pkg-resources', 'libssl-dev',
'python-setuptools', 'python-dev',
],
# Fedora does not have python-pam!! So, we cannot write the fedora
# version.
'fedora': [
'libffi-devel', 'openssl-devel',
'python-devel', 'python-pip', 'python-setuptools',
],
'darwin': [],
'arch' : [],
}[DISTRO]
PACMAN = {
'debian': 'apt-get install -y'.split(),
'fedora': 'yum install -y'.split(),
'darwin': [],
'arch': [],
}[DISTRO]
PYTHON_DEPS = [
'cryptography==1.8.1',
# 'pycryptodome',
'word2keypress>=1.0.10',
# 'dataset',
'zxcvbn-python==4.4.14',
'requests==2.13', # 2.12 has issue with x509 cetificate
'pyyaml==3.12',
'distro==1.0.2',
]
OPTIONS = {
'argv_emulation': True,
# 'packages': ['requests', 'requests', 'selenium']
}
TEST_REQUIRES = ['python-pam', 'pytest']
setup(
name='typtop', # 'loginwitherror',
# app=['typtop/dbaccess.py'],
packages=['typtop'], # this must be the same as the name above
version=VERSION,
description='Adaptive typo-tolerant password checking for Debian logins',
long_description=first_msg,
author='Rahul Chatterjee, Yuval Pnueli',
author_email='rc737@cornell.edu',
url=GITHUB_URL,
download_url='{}/tarball/{}'.format(GITHUB_URL, VERSION),
keywords=[
'Password', 'typo-tolerance',
'login-with-errors', 'Login'
],
# scripts=SCRIPTS,
entry_points={
'console_scripts': [
'typtops.py = typtop.typtops:main',
'send_typo_log.py = typtop.send_typo_log:main']
},
license='MIT',
# package_dir={'typtop': 'typtop/'},
# package_data={
# 'typtop': ['../LICENSE', '../README.md', 'typtopserver.crt'],
# },
data_files=[], # DATA_FILES,
include_package_data=True,
options={'py2app': OPTIONS},
classifiers=['Development Status :: 4 - Beta'],
install_requires=PYTHON_DEPS,
# cmdclass={'install': CustomInstaller},
zip_safe=True,
)