Migrated to python-commonkit.

development
Shawn Davis 4 years ago
parent 891b07b388
commit 1db71beeef
  1. 12
      packages.ini
  2. 4
      requirements.pip
  3. 6
      scripttease/cli/initialize.py
  4. 4
      scripttease/cli/subcommands.py
  5. 2
      scripttease/library/commands/templates.py
  6. 2
      scripttease/library/overlays/centos.py
  7. 21
      scripttease/library/overlays/posix.py
  8. 2
      scripttease/library/overlays/ubuntu.py
  9. 2
      scripttease/parsers/base.py
  10. 2
      scripttease/parsers/ini.py
  11. 2
      scripttease/parsers/utils.py
  12. 13
      setup.py

@ -1,5 +1,9 @@
; SuperPython already has many of the required dependencies, including jinja2 and pygments.
[superpython]
[jinja2]
comment = Used to pre-process configuration files.
[pygments]
comment = Used for colorizing command output.
[python-commonkit]
comment = Used throughout for its various components and utilities.
scm = https://github.com/develmaycare/superpython
source = https://github.com/develmaycare/superpython
scm = https://github.com/develmaycare/python-commonkit

@ -1 +1,3 @@
superpython
jinja2
pygments
python-commonkit

@ -1,9 +1,9 @@
# Imports
from commonkit import smart_cast
from configparser import ConfigParser
import logging
import os
from superpython.utils import smart_cast
from ..constants import LOGGER_NAME
log = logging.getLogger(LOGGER_NAME)
@ -14,7 +14,7 @@ __all__ = (
"context_from_cli",
"filters_from_cli",
"options_from_cli",
"variable_from_file",
"variables_from_file",
)
# Functions
@ -78,7 +78,7 @@ def options_from_cli(options):
return _options
def variable_from_file(path):
def variables_from_file(path):
"""Loads variables from a given INI file.
:param path: The path to the INI file.

@ -1,7 +1,7 @@
# Imports
from superpython.shell import EXIT
from superpython.utils import highlight_code
from commonkit import highlight_code
from commonkit.shell import EXIT
from ..parsers import load_commands, load_config
# Exports

@ -1,9 +1,9 @@
# Imports
from commonkit import parse_jinja_template, read_file
from jinja2.exceptions import TemplateError, TemplateNotFound
import logging
import os
from superpython.utils import parse_jinja_template, read_file
from ...constants import LOGGER_NAME
from .base import Command

@ -1,6 +1,6 @@
# Imports
from superpython.utils import split_csv
from commonkit import split_csv
from ..commands import Command, Template
from .common import COMMON_MAPPINGS
from .django import DJANGO_MAPPINGS

@ -1,7 +1,7 @@
# Imports
from commonkit import indent
import os
from superpython.utils import indent
from ..commands import Command
# Exports
@ -350,7 +350,7 @@ def rsync(source, target, delete=False, exclude=None, host=None, key_file=None,
# $(OUTPUTH_PATH) $(SSH_USER)@$(SSH_HOST):$(UPLOAD_PATH) --cvs-exclude;
tokens = list()
tokens.append('rsync')
tokens.append("rsync")
tokens.append("--cvs-exclude")
tokens.append("--checksum")
tokens.append("--compress")
@ -492,11 +492,28 @@ class Function(object):
"""A function that may be used to organize related commands to be called together."""
def __init__(self, name, commands=None, comment=None):
"""Initialize a function.
:param name: The name of the function.
:type name: str
:param commands: The command instances to be included in the function's output.
:type commands: list
:param comment: A comment regarding the function.
:type comment: str
"""
self.commands = commands or list()
self.comment = comment
self.name = name
def to_string(self):
"""Export the function as a string.
:rtype: str
"""
a = list()
if self.comment is not None:

@ -1,6 +1,6 @@
# Imports
from superpython.utils import split_csv
from commonkit import split_csv
from ..commands import Command, Template
from .common import COMMON_MAPPINGS
from .django import DJANGO_MAPPINGS

@ -1,6 +1,6 @@
# Imports
from superpython.utils import File
from commonkit import File
from ..factory import Factory
from ..library.scripts import Script

@ -1,8 +1,8 @@
# Imports
from commonkit import parse_jinja_template, read_file, smart_cast, split_csv
from configparser import ConfigParser, ParsingError
import logging
from superpython.utils import parse_jinja_template, read_file, smart_cast, split_csv
import os
from ..constants import LOGGER_NAME
from ..library.commands import ItemizedCommand

@ -1,7 +1,7 @@
# Imports
from commonkit import any_list_item
import logging
from superpython.utils import any_list_item
from ..constants import LOGGER_NAME
from .ini import Config

@ -20,15 +20,16 @@ setup(
author='Shawn Davis',
author_email='shawn@develmaycare.com',
url='https://github.com/develmaycare/python-scripttease',
packages=find_packages(exclude=["tests"]),
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
# superpython provides jinja2 and pygments
install_requires=[
"superpython",
],
dependency_links=[
"https://github.com/develmaycare/superpython",
"jinja2",
"pygments",
"python-commonkit",
],
# dependency_links=[
# "https://github.com/develmaycare/superpython",
# ],
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',

Loading…
Cancel
Save