-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
56 lines (49 loc) · 1.52 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
import os
import sys
from setuptools import setup, find_packages
# Simplify bootstrapping. We don't need to have an older argparse-manpage
# installed to successfully build argparse-manpage.
# pylint: disable=wrong-import-position
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(ROOT_DIR)
from build_manpages import __version__
from build_manpages import (
build_manpages,
get_build_py_cmd,
get_install_cmd,
)
def get_readme():
with open(os.path.join(ROOT_DIR, 'README.md')) as fh:
return ''.join(fh.readlines())
if sys.version_info >= (3,):
install_requires = ['tomli;python_version<"3.11"']
else:
install_requires = ['toml']
setup(
name='argparse-manpage',
version=__version__,
url='https://github.com/praiskup/argparse-manpage',
license='Apache-2.0',
author='Gabriele Giammatteo',
author_email='[email protected]',
maintainer='Pavel Raiskup',
maintainer_email='[email protected]',
packages=find_packages(),
entry_points={
'console_scripts': [
'argparse-manpage=argparse_manpage.cli:main',
],
},
description='Build manual page from python\'s ArgumentParser object.',
long_description=get_readme(),
long_description_content_type='text/markdown',
cmdclass={
'build_manpages': build_manpages,
'build_py': get_build_py_cmd(),
'install': get_install_cmd(),
},
install_requires=install_requires,
extras_require={
'setuptools': ["setuptools"]
},
)