forked from mkorman90/regipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (65 loc) · 2.77 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
#!/usr/bin/env python
import os
import re
import sys
from setuptools import setup, find_packages
# Requirements.
setup_requirements = ['pytest-runner'] if {'pytest', 'test', 'ptr'}.intersection(sys.argv) else []
test_requirements = ['pytest', 'pytest-flake8']
# Fetch readme content.
with open('docs/README.rst', 'r') as readme_file:
readme = readme_file.read()
def _find_version(file_path):
version_file = open(file_path, 'r').read()
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
def main():
setup(name='regipy',
packages=find_packages(),
version=_find_version(os.path.abspath(os.path.join('regipy', '__init__.py'))),
description='Python Registry Parser',
long_description=readme,
author='Martin G. Korman',
author_email='[email protected]',
url='https://github.com/mkorman90/regipy/',
license="MIT",
setup_requires=setup_requirements,
install_requires=['construct>=2.10',
'attrs>=20',
'inflection',
'pytz'],
tests_require=test_requirements,
extras_require={
'test': test_requirements,
'cli': [
'click>=7.0.0',
'tabulate',
],
},
include_package_data=True,
keywords='Python, Python3, registry, windows registry, registry parser',
classifiers=['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities'],
entry_points={
'console_scripts': [
'registry-parse-header = regipy.cli:parse_header',
'registry-dump = regipy.cli:hive_to_json',
'registry-plugins-run = regipy.cli:run_plugins',
'registry-plugins-list = regipy.cli:list_plugins',
'registry-diff = regipy.cli:reg_diff',
'registry-transaction-logs = regipy.cli:parse_transaction_log'
]
})
if __name__ == '__main__':
main()