forked from log2timeline/dfvfs
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
executable file
·79 lines (62 loc) · 2.1 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Installation and deployment script."""
import os
import sys
import run_tests
try:
from setuptools import find_packages, setup, Command
except ImportError:
from distutils.core import find_packages, setup, Command
if sys.version < '2.7':
print 'Unsupported Python version: {0:s}.'.format(sys.version)
print 'Supported Python versions are 2.7 or a later 2.x version.'
sys.exit(1)
# Change PYTHONPATH to include dfvfs so that we can get the version.
sys.path.insert(0, '.')
import dfvfs
class TestCommand(Command):
"""Run tests, implementing an interface."""
user_options = []
def initialize_options(self):
self._dir = os.getcwd()
def finalize_options(self):
pass
def run(self):
test_results = run_tests.RunTests(os.path.join('.', 'dfvfs'))
dfvfs_version = dfvfs.__version__
# Command bdist_msi does not support the library version, neither a date
# as a version but if we suffix it with .1 everything is fine.
if 'bdist_msi' in sys.argv:
dfvfs_version += '.1'
dfvfs_description = (
'Digital Forensics Virtual File System (dfVFS).')
dfvfs_long_description = (
'dfVFS, or Digital Forensics Virtual File System, is a Python module '
'that provides read-only access to file-system objects from various '
'storage media types and file formats.')
setup(
name='dfvfs',
version=dfvfs_version,
description=dfvfs_description,
long_description=dfvfs_long_description,
license='Apache License, Version 2.0',
url='https://github.com/log2timeline/dfvfs',
maintainer='dfVFS development team',
maintainer_email='[email protected]',
cmdclass={'test': TestCommand},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
packages=find_packages('.', exclude=[u'examples', u'tests', u'tests.*']),
package_dir={
'dfvfs': 'dfvfs'
},
data_files=[
('share/doc/dfvfs', [
u'AUTHORS', u'ACKNOWLEDGEMENTS', u'LICENSE', u'README']),
],
)