-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
executable file
·66 lines (56 loc) · 1.71 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
#!/usr/bin/env python
import os
import re
import sys
from pip.req import parse_requirements
from codecs import open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'awvspy',
'awvspy.packages',
'awvspy.packages.sqlalchemy_access',
'awvspy.packages.sqlalchemy_access.sqlalchemy_access'
]
install_reqs = parse_requirements('requirements.txt',session=False)
requires = [str(ir.req) for ir in install_reqs]
version = ''
with open('awvspy/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('Cannot find version information')
with open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with open('HISTORY.rst', 'r', 'utf-8') as f:
history = f.read()
setup(
name='awvspy',
version=version,
keywords = ('awvs', 'Acunetix Web Vulnerability Scanner'),
description='AWVS Python Library.',
long_description=readme + '\n\n' + history,
author='wcc526',
author_email='[email protected]',
url='http://www.python.org',
packages=packages,
package_data={'': ['LICENSE'], 'awvspy': ['*.pem']},
include_package_data=True,
install_requires=requires,
license='Apache 2.0',
zip_safe=False,
classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.7',
),
extras_require={
},
)