-
Notifications
You must be signed in to change notification settings - Fork 53
/
setup.py
77 lines (69 loc) · 2.93 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
#!/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>=21',
'inflection>=0.5.1',
'pytz'
],
tests_require=test_requirements,
extras_require={
'test': test_requirements,
'cli': ['click>=7.0.0', 'tabulate'],
'full': [
'click>=7.0.0',
'tabulate',
'libfwsi-python>=20240315',
'libfwps-python>=20240310'
],
},
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': [
'regipy-parse-header = regipy.cli:parse_header',
'regipy-dump = regipy.cli:registry_dump',
'regipy-plugins-run = regipy.cli:run_plugins',
'regipy-plugins-list = regipy.cli:list_plugins',
'regipy-diff = regipy.cli:reg_diff',
'regipy-process-transaction-logs = regipy.cli:parse_transaction_log'
]
})
if __name__ == '__main__':
main()