forked from vstinner/hachoir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·87 lines (77 loc) · 2.43 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
#!/usr/bin/env python3
#
# Prepare a release:
#
# - check version: hachoir/version.py and doc/conf.py
# - run tests: tox
# - set the release date: edit doc/changelog.rst
# - run: git commit -a
# - run: git push
# - check Travis CI status:
# https://travis-ci.org/haypo/hachoir3
#
# Release a new version:
#
# - run: git tag x.y.z
# - run: git push --tags
# - rm -rf dist/
# - run: python3 setup.py sdist bdist_wheel
# - FIXME: register? twine register dist/hachoir-x.y.z.tar.gz
# - twine upload dist/*
# - check http://pypi.python.org/pypi/hachoir3
#
# After the release:
#
# - update doc/install.rst
# - set version to N+1: hachoir/version.py and doc/conf.py
from imp import load_source
from os import path
from setuptools import find_packages
SCRIPTS = ["hachoir-grep",
"hachoir-metadata",
"hachoir-strip",
"hachoir-urwid",
"hachoir-wx"]
# 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
hachoir = load_source("version", path.join("hachoir", "version.py"))
readme = open('README.rst')
long_description = readme.read()
readme.close()
install_options = {
"name": hachoir.PACKAGE,
"version": hachoir.VERSION,
"url": hachoir.WEBSITE,
"author": "Hachoir team (see AUTHORS file)",
"description": "Package of Hachoir parsers used to open binary files",
"long_description": long_description,
"classifiers": CLASSIFIERS,
"license": hachoir.LICENSE,
"packages": find_packages(),
"scripts": SCRIPTS,
"zip_safe": True,
}
setup(**install_options)
if __name__ == "__main__":
main()