setup.py
This commit is contained in:
parent
79ddb8bc11
commit
7fe8cf322d
43
setup.py
43
setup.py
|
@ -1,29 +1,34 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
import os
|
||||
from tiramisu_cmdline_parser import __version__
|
||||
|
||||
import tiramisu_cmdline_parser
|
||||
|
||||
PACKAGE_NAME = os.environ.get('PACKAGE_DST', 'tiramisu_cmdline_parser')
|
||||
|
||||
setup(
|
||||
name='tiramisu_cmdline_parser',
|
||||
version=tiramisu_cmdline_parser.__version__,
|
||||
packages=find_packages(),
|
||||
author="Emmanuel Garette & Tiramisu Team",
|
||||
description="command-line parser using Tiramisu.",
|
||||
long_description="""
|
||||
Python3 parser for command-line options and arguments using Tiramisu engine.
|
||||
""",
|
||||
include_package_data=True,
|
||||
version=__version__,
|
||||
author="Tiramisu's team",
|
||||
author_email='gnunux@gnunux.info',
|
||||
name=PACKAGE_NAME,
|
||||
description="command-line parser using Tiramisu.",
|
||||
url='https://framagit.org/tiramisu/tiramisu-cmdline-parser',
|
||||
|
||||
license='GNU Library or Lesser General Public License (LGPL)',
|
||||
install_requires=["tiramisu_api>=0.1"],
|
||||
classifiers=[
|
||||
"Programming Language :: Python",
|
||||
"Development Status :: 1 - Planning",
|
||||
"License :: LGPLv3",
|
||||
"Natural Language :: French",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Communications",
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||
"Operating System :: OS Independent",
|
||||
"Natural Language :: English",
|
||||
"Natural Language :: French",
|
||||
],
|
||||
long_description="""\
|
||||
tiramisu-cmdline-parser
|
||||
---------------------------------
|
||||
|
||||
Python3 parser for command-line options and arguments using Tiramisu engine.
|
||||
""",
|
||||
include_package_data=True,
|
||||
packages=find_packages(include=['tiramisu_cmdline_parser'])
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from .api import TiramisuCmdlineParser
|
||||
|
||||
__version__ = "0.0.1"
|
||||
__version__ = "0.1"
|
||||
__all__ = ('TiramisuCmdlineParser',)
|
||||
|
|
|
@ -154,7 +154,10 @@ class _BuildKwargs:
|
|||
self.force_no = force_no
|
||||
self.force_del = force_del
|
||||
if not self.force_no and not self.force_del:
|
||||
self.kwargs['help'] = option.doc().replace('%', '%%')
|
||||
description = option.doc()
|
||||
if not description:
|
||||
description = description.replace('%', '%%')
|
||||
self.kwargs['help'] = description
|
||||
if 'positional' not in self.properties:
|
||||
is_short_name = self.cmdlineparser._is_short_name(name, 'longargument' in self.properties)
|
||||
if self.force_no:
|
||||
|
@ -335,7 +338,7 @@ class TiramisuCmdlineParser(ArgumentParser):
|
|||
continue
|
||||
if obj.option.isoptiondescription():
|
||||
if _forhelp:
|
||||
newgroup = self.add_argument_group(obj.option.path(), obj.option.doc())
|
||||
newgroup = self.add_argument_group(obj.option.path(), obj.option.description())
|
||||
else:
|
||||
newgroup = group
|
||||
if prefix:
|
||||
|
|
Loading…
Reference in New Issue