Improved template handling
This commit is contained in:
25
src/cpl_cli/templates/publish/__init__.py
Normal file
25
src/cpl_cli/templates/publish/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
sh_cpl sh-edraft Common Python library
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
sh-edraft Common Python library
|
||||
|
||||
:copyright: (c) 2020 - 2021 sh-edraft.de
|
||||
:license: MIT, see LICENSE for more details.
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'cpl_cli.templates.publish'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.4.1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major=2021, minor=4, micro=1)
|
31
src/cpl_cli/templates/publish/setup.py
Normal file
31
src/cpl_cli/templates/publish/setup.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from cpl_cli.templates.template import Template
|
||||
|
||||
|
||||
class Setup:
|
||||
|
||||
@staticmethod
|
||||
def get_setup_py() -> str:
|
||||
string = """\"\"\"
|
||||
This file is generated by CPL CLI
|
||||
\"\"\"
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
name='$Name',
|
||||
version='$Version',
|
||||
packages=$Packages,
|
||||
url='$URL',
|
||||
license='$LicenseName',
|
||||
author='$Author',
|
||||
author_email='$AuthorMail',
|
||||
include_package_data=$IncludePackageData,
|
||||
description='$Description',
|
||||
python_requires='$PyRequires',
|
||||
install_requires=$Dependencies,
|
||||
entry_points=$EntryPoints,
|
||||
package_data=$PackageData
|
||||
)
|
||||
"""
|
||||
|
||||
return Template.build_template_string(string)
|
@@ -1,21 +0,0 @@
|
||||
"""
|
||||
This file is generated by CPL CLI
|
||||
"""
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
name='$Name',
|
||||
version='$Version',
|
||||
packages=$Packages,
|
||||
url='$URL',
|
||||
license='$LicenseName',
|
||||
author='$Author',
|
||||
author_email='$AuthorMail',
|
||||
include_package_data=$IncludePackageData,
|
||||
description='$Description',
|
||||
python_requires='$PyRequires',
|
||||
install_requires=$Dependencies,
|
||||
entry_points=$EntryPoints,
|
||||
package_data=$PackageData
|
||||
)
|
Reference in New Issue
Block a user