Commit de1527a1 authored by Sylvaine Ferrachat's avatar Sylvaine Ferrachat
Browse files

Package restructuration for setuptools

Now allows installation with:

`pip install [URL]`

The produced console script is named `mksc`, e.g.:

`mksc --help`
parent 2b77b4e9
[metadata]
name = make_script
version = 0.1
description = Tool to create an empty script with pre-filled header in a chosen language based on template.
author = Sylvaine Ferrachat
author_email = sylvaine.ferrachat@env.ethz.ch
license = GPL-3.0-or-later
[options]
package_dir=
=src
packages=find:
include_package_data = True
install_requires =
begins >= 0.9
Cheetah3 >= 3.2.0
SimpleQuestions >= 1.0.1
[options.entry_points]
console_scripts =
mksc = make_script.mksc:run.start
[options.packages.find]
where=src
[options.package_data]
* = templates/*.tmpl
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# -*- coding: utf-8 -*-
#------------------------------
#-- Sylvaine Ferrachat 2019-03
#------------------------------
from setuptools import setup
setup()
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# -*- coding: utf-8 -*-
......@@ -66,7 +66,7 @@ class Script:
#-- Handle file extension
try:
if t.default_ext != self.user_ext:
msg = 'WARNING! Chosen extension "{}" is different from the default "{}".\n'\
msg = 'Chosen extension "{}" is different from the default "{}".\n'\
.format(self.user_ext,t.default_ext)
logging.warning(msg)
except AttributeError:
......@@ -109,6 +109,7 @@ def run(
with_begin : 'include python "begins" lib (will be discarded in no-python context)' = DEFT_with_begin,
with_license : 'Include license identifyer' = DEFT_with_license,
spdx_license : 'License identifier (according to SPDX standards)' = DEFT_spdx_license,
logfmt = '%(levelname)s: %(message)s',
):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment