-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
57 lines (48 loc) · 1.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
import os
from setuptools import setup
import re
# A handful of variables that are used a couple of times.
github_url = 'https://github.com/TeamMsgExtractor/msg-explorer'
main_module = 'msg_explorer'
# Read in the description from README.
with open('README.rst', 'rb') as stream:
long_description = stream.read().decode('utf-8').replace('\r', '')
# Get the version this way to avoid import issues.
version_re = re.compile("__version__ = '(?P<version>[0-9\\.]*)'")
with open('msg_explorer/__init__.py', 'r') as stream:
contents = stream.read()
match = version_re.search(contents)
version = match.groupdict()['version']
# Read in the dependencies from the virtualenv requirements file.
dependencies = []
filename = os.path.join('requirements.txt')
with open(filename, 'r') as stream:
for line in stream:
package = line.strip().split('#')[0]
if package:
dependencies.append(package)
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
]
setup(
name=main_module,
version=version,
description="A GUI program to allow for exploring MSG files using extract-msg.",
long_description=long_description,
long_description_content_type='text/x-rst',
url=github_url,
download_url='%s/archives/master' % github_url,
author='Destiny Peterson',
author_email='arceusthe@gmail.com',
license='GPL',
packages=[main_module],
py_modules=[main_module],
entry_points={'console_scripts': ['msg_explorer = msg_explorer.main:mainRunner',]},
include_package_data=True,
install_requires=dependencies,
classifiers=classifiers,
python_requires='>=3.8'
)