setup.py
This commit is contained in:
parent
88949d8682
commit
3d1a558389
40 changed files with 30 additions and 22 deletions
43
setup.py
43
setup.py
|
@ -1,29 +1,34 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
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(
|
setup(
|
||||||
name='tiramisu_cmdline_parser',
|
version=__version__,
|
||||||
version=tiramisu_cmdline_parser.__version__,
|
author="Tiramisu's team",
|
||||||
packages=find_packages(),
|
author_email='gnunux@gnunux.info',
|
||||||
author="Emmanuel Garette & Tiramisu Team",
|
name=PACKAGE_NAME,
|
||||||
description="command-line parser using Tiramisu.",
|
description="command-line parser using Tiramisu.",
|
||||||
long_description="""
|
|
||||||
Python3 parser for command-line options and arguments using Tiramisu engine.
|
|
||||||
""",
|
|
||||||
include_package_data=True,
|
|
||||||
url='https://framagit.org/tiramisu/tiramisu-cmdline-parser',
|
url='https://framagit.org/tiramisu/tiramisu-cmdline-parser',
|
||||||
|
license='GNU Library or Lesser General Public License (LGPL)',
|
||||||
|
install_requires=["tiramisu_api>=0.1"],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python :: 3",
|
||||||
"Development Status :: 1 - Planning",
|
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||||
"License :: LGPLv3",
|
"Operating System :: OS Independent",
|
||||||
"Natural Language :: French",
|
"Natural Language :: English",
|
||||||
"Operating System :: OS Independent",
|
"Natural Language :: French",
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Topic :: Communications",
|
|
||||||
],
|
],
|
||||||
|
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
|
from .api import TiramisuCmdlineParser
|
||||||
|
|
||||||
__version__ = "0.0.1"
|
__version__ = "0.1"
|
||||||
__all__ = ('TiramisuCmdlineParser',)
|
__all__ = ('TiramisuCmdlineParser',)
|
||||||
|
|
|
@ -154,7 +154,10 @@ class _BuildKwargs:
|
||||||
self.force_no = force_no
|
self.force_no = force_no
|
||||||
self.force_del = force_del
|
self.force_del = force_del
|
||||||
if not self.force_no and not self.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:
|
if 'positional' not in self.properties:
|
||||||
is_short_name = self.cmdlineparser._is_short_name(name, 'longargument' in self.properties)
|
is_short_name = self.cmdlineparser._is_short_name(name, 'longargument' in self.properties)
|
||||||
if self.force_no:
|
if self.force_no:
|
||||||
|
@ -335,7 +338,7 @@ class TiramisuCmdlineParser(ArgumentParser):
|
||||||
continue
|
continue
|
||||||
if obj.option.isoptiondescription():
|
if obj.option.isoptiondescription():
|
||||||
if _forhelp:
|
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:
|
else:
|
||||||
newgroup = group
|
newgroup = group
|
||||||
if prefix:
|
if prefix:
|
||||||
|
|
Loading…
Reference in a new issue