-
Notifications
You must be signed in to change notification settings - Fork 69
/
setup.py
executable file
·100 lines (91 loc) · 2.82 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env python3
#
# Prepare a release:
#
# - check version: hachoir/__init__.py and doc/conf.py
# - set the release date: edit doc/changelog.rst
# - run: git commit -a
# - Remove untracked files/dirs: git clean -fdx
# - run tests: tox --parallel auto
# - run: git push
# - check GitHub Actions status:
# https://github.com/vstinner/hachoir/actions
#
# Release a new version:
#
# - git tag x.y.z
# - git clean -fdx # Remove untracked files/dirs
# - python3 setup.py sdist bdist_wheel
# - git push --tags
# - twine upload dist/*
#
# After the release:
#
# - set version to N+1: hachoir/__init__.py and doc/conf.py
ENTRY_POINTS = {
'console_scripts': [
"hachoir-grep = hachoir.grep:main",
"hachoir-metadata = hachoir.metadata.main:main",
"hachoir-strip = hachoir.strip:main",
"hachoir-urwid = hachoir.urwid:main"
],
'gui_scripts': [
"hachoir-wx = hachoir.wx.main:main"
]
}
# FIXME: hachoir-subfile is currently broken
# "hachoir-subfile",
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console :: Curses',
'Environment :: Plugins',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Multimedia',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Disassemblers',
'Topic :: Software Development :: Interpreters',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Filesystems',
'Topic :: Text Processing',
'Topic :: Utilities',
]
def main():
from setuptools import setup
from setuptools import find_packages
import hachoir
readme = open('README.rst')
long_description = readme.read()
readme.close()
install_options = {
"name": "hachoir",
"version": hachoir.__version__,
"url": 'http://hachoir.readthedocs.io/',
"project_urls": {
"Source": "https://github.com/vstinner/hachoir",
},
"author": "Hachoir team (see AUTHORS file)",
"description": "Package of Hachoir parsers used to open binary files",
"long_description": long_description,
"classifiers": CLASSIFIERS,
"license": 'GNU GPL v2',
"packages": find_packages(),
"package_data": {"hachoir.wx.resource": ['hachoir_wx.xrc']},
"entry_points": ENTRY_POINTS,
"extras_require": {
"urwid": [
"urwid==1.3.1"
],
"wx": [
"wxPython==4.*"
]
},
"zip_safe": True,
}
setup(**install_options)
if __name__ == "__main__":
main()