Changeset - a7c3bf79ff25
rattail/projects/handler.py
Show inline comments
 
@@ -333,27 +333,6 @@ class RattailProjectHandler(ProjectHandler):
 
        self.generate('rattail/package/commands.py.mako', os.path.join(package, 'commands.py'),
 
                      **context)
 

	
 
        self.generate('rattail/package/emails.py.mako', os.path.join(package, 'emails.py'),
 
                      **context)
 

	
 
        ##############################
 
        # data dir
 
        ##############################
 

	
 
        data = os.path.join(package, 'data')
 
        os.makedirs(data)
 

	
 
        config = os.path.join(data, 'config')
 
        os.makedirs(config)
 

	
 
        self.generate('rattail/package/data/config/rattail.conf.mako',
 
                      os.path.join(config, '{}-rattail.conf'.format(slug)),
 
                      **context)
 

	
 
        self.generate('rattail/package/data/config/web.conf.mako',
 
                      os.path.join(config, '{}-web.conf'.format(slug)),
 
                      **context)
 

	
 
        ##############################
 
        # db package dir
 
        ##############################
 
@@ -375,9 +354,6 @@ class RattailProjectHandler(ProjectHandler):
 
            self.generate('rattail/package/db/model/__init__.py.mako', os.path.join(model, '__init__.py'),
 
                          **context)
 

	
 
            self.generate('rattail/package/db/model/core.py.mako', os.path.join(model, 'core.py'),
 
                          **context)
 

	
 
            ####################
 
            # alembic
 
            ####################
 
@@ -385,6 +361,7 @@ class RattailProjectHandler(ProjectHandler):
 
            alembic = os.path.join(db, 'alembic')
 
            os.makedirs(alembic)
 

	
 
            # TODO: can we get rid of this? why not?
 
            self.generate('rattail/package/db/alembic/env.py.mako', os.path.join(alembic, 'env.py'),
 
                          **context)
 

	
 
@@ -478,25 +455,6 @@ class RattailProjectHandler(ProjectHandler):
 
            self.generate('rattail/package/web/views/common.py.mako', os.path.join(views, 'common.py'),
 
                          **context)
 

	
 
        ##############################
 
        # dev
 
        ##############################
 

	
 
        dev = os.path.join(path, 'dev')
 
        os.makedirs(dev)
 

	
 
        self.generate('rattail/dev/bootstrap.py.mako', os.path.join(dev, 'bootstrap.py'),
 
                      **context)
 

	
 
        self.generate('rattail/dev/tasks.py.mako', os.path.join(dev, 'tasks.py'),
 
                      **context)
 

	
 
        self.generate('rattail/dev/rattail.conf.mako', os.path.join(dev, 'rattail.conf'),
 
                      **context)
 

	
 
        self.generate('rattail/dev/web.conf.mako', os.path.join(dev, 'web.conf'),
 
                      **context)
 

	
 
        ##############################
 
        # fablib / machines
 
        ##############################
rattail/projects/rattail/dev/bootstrap.py.mako
Show inline comments
 
deleted file
rattail/projects/rattail/dev/rattail.conf.mako
Show inline comments
 
deleted file
rattail/projects/rattail/dev/tasks.py.mako
Show inline comments
 
deleted file
rattail/projects/rattail/dev/web.conf.mako
Show inline comments
 
deleted file
rattail/projects/rattail/package/commands.py.mako
Show inline comments
 
@@ -178,16 +178,6 @@ class Install(commands.Subcommand):
 
                   'setting-put', 'tailbone.favicon_url', '/tailbone/img/rattail.ico']
 
            subprocess.check_call(cmd)
 

	
 
            # set vue version
 
            cmd = [rattail, '-c', quiet_conf, '--no-versioning',
 
                   'setting-put', 'tailbone.vue_version', '2.6.14']
 
            subprocess.check_call(cmd)
 

	
 
            # set buefy version
 
            cmd = [rattail, '-c', quiet_conf, '--no-versioning',
 
                   'setting-put', 'tailbone.buefy_version', 'latest']
 
            subprocess.check_call(cmd)
 

	
 
            # set default grid page size
 
            cmd = [rattail, '-c', quiet_conf, '--no-versioning',
 
                   'setting-put', 'tailbone.grid.default_pagesize', '20']
rattail/projects/rattail/package/config.py.mako
Show inline comments
 
@@ -15,12 +15,13 @@ class ${app_class_prefix}Config(ConfigExtension):
 

	
 
    def configure(self, config):
 

	
 
        # set some default config values
 
        # default app title
 
        config.setdefault('rattail', 'app_title', '${name.replace("'", "\\'")}')
 

	
 
        # primary data model
 
        config.setdefault('rattail', 'model', '${python_name}.db.model')
 
        config.setdefault('rattail.config', 'templates', '${python_name}:data/config rattail:data/config')
 
        config.setdefault('rattail.mail', 'emails', '${python_name}.emails')
 

	
 
        # custom menu handler
 
        # menu handler
 
        config.setdefault('tailbone.menus', 'handler', '${python_name}.web.menus:${app_class_prefix}MenuHandler')
 

	
 
        ## do we integrate w/ Catapult?
rattail/projects/rattail/package/data/config/rattail.conf.mako
Show inline comments
 
deleted file
rattail/projects/rattail/package/data/config/web.conf.mako
Show inline comments
 
deleted file
rattail/projects/rattail/package/db/model/__init__.py.mako
Show inline comments
 
# -*- coding: utf-8; mode: python; -*-
 
## -*- coding: utf-8; mode: python; -*-
 
# -*- coding: utf-8; -*-
 
"""
 
${name} data models
 
"""
 

	
 
# bring in all the normal stuff from Rattail
 
# bring in all of Rattail
 
from rattail.db.model import *
 

	
 
% if integrates_catapult:
 
@@ -11,5 +12,4 @@ from rattail.db.model import *
 
from rattail_onager.db.model import *
 
% endif
 

	
 
# add ${name} models
 
from .core import ${studly_name}Customer
 
# TODO: import your custom models here...
rattail/projects/rattail/package/db/model/core.py.mako
Show inline comments
 
deleted file
rattail/projects/rattail/package/emails.py.mako
Show inline comments
 
deleted file
rattail/projects/rattail/setup.py.mako
Show inline comments
 
@@ -14,66 +14,46 @@ README = open(os.path.join(here, 'README.md')).read()
 

	
 

	
 
requires = [
 
    #
 
    # Version numbers within comments below have specific meanings.
 
    # Basically the 'low' value is a "soft low," and 'high' a "soft high."
 
    # In other words:
 
    #
 
    # If either a 'low' or 'high' value exists, the primary point to be
 
    # made about the value is that it represents the most current (stable)
 
    # version available for the package (assuming typical public access
 
    # methods) whenever this project was started and/or documented.
 
    # Therefore:
 
    #
 
    # If a 'low' version is present, you should know that attempts to use
 
    # versions of the package significantly older than the 'low' version
 
    # may not yield happy results.  (A "hard" high limit may or may not be
 
    # indicated by a true version requirement.)
 
    #
 
    # Similarly, if a 'high' version is present, and especially if this
 
    # project has laid dormant for a while, you may need to refactor a bit
 
    # when attempting to support a more recent version of the package.  (A
 
    # "hard" low limit should be indicated by a true version requirement
 
    # when a 'high' version is present.)
 
    #
 
    # In any case, developers and other users are encouraged to play
 
    # outside the lines with regard to these soft limits.  If bugs are
 
    # encountered then they should be filed as such.
 
    #
 
    # package                           # low                   high
 

	
 
    'invoke',                           # 1.4.1
 
    'rattail[auth,db,bouncer]',         # 0.9.141
 
    % if uses_fabric:
 
    'rattail-fabric2',                  # 0.2.1
 
    % endif
 

	
 
    % if has_db:
 
    'psycopg2',                         # 2.8.4
 
    'psycopg2',
 
    % endif
 

	
 
    % if has_web:
 
    'Tailbone',                         # 0.8.72
 
    'Tailbone',
 
    % elif has_db:
 
    'rattail[db]',
 
    % else:
 
    'rattail',
 
    % endif
 

	
 
    % if uses_fabric:
 
    'rattail-fabric2',
 
    % endif
 

	
 
    % if integrates_catapult:
 
    # TODO: must cap this for now, b/c it breaks Catapult integration?!
 
    # (something about "Syntax error near 'ROWS'" with grid queries)
 
    'SQLAlchemy<1.3',                   #                       1.2.19
 
    'onager',                           # 0.2.8
 
    'rattail-onager',                   # 0.2.1
 
    'SQLAlchemy<1.3',
 
    'onager',
 
    'rattail-onager',
 
    % if has_web:
 
    'tailbone-onager',                  # 0.2.3
 
    'tailbone-onager',
 
    % endif
 
    % endif
 

	
 
    % if integrates_locsms:
 
    'luckysmores',                      # 0.2.6
 
    'rattail-luckysmores',              # 0.8.9
 
    'luckysmores',
 
    'rattail-luckysmores',
 
    % if has_web:
 
    'tailbone-locsms',                  # 0.1.0
 
    'tailbone-locsms',
 
    % endif
 
    % endif
 

	
 
    # TODO: these are needed to build/release packages
 
    #'build',
 
    #'invoke',
 
    #'twine',
 
]
 

	
 

	
 
@@ -87,9 +67,11 @@ setup(
 
    long_description = README,
 

	
 
    classifiers = [
 
        # TODO: remove this if you intend to publish your project!
 

	
 
        # TODO: remove this if you intend to publish your project
 
        # (it's here by default, to prevent accidental publishing)
 
        'Private :: Do Not Upload',
 

	
 
        'Development Status :: 3 - Alpha',
 
        'Environment :: Console',
 
        % if has_web or has_web_api:
 
@@ -107,7 +89,6 @@ setup(
 
    install_requires = requires,
 
    packages = find_packages(),
 
    include_package_data = True,
 
    # zip_safe = False,
 

	
 
    entry_points = {
 

	
rattail/projects/rattail/tasks.py.mako
Show inline comments
 
@@ -15,14 +15,20 @@ exec(open(os.path.join(here, '${python_name}', '_version.py')).read())
 

	
 

	
 
@task
 
def release(ctx):
 
def release(c):
 
    """
 
    Release a new version of ${name}
 
    """
 
    # rebuild local tar.gz file for distribution
 
    shutil.rmtree('${egg_name}.egg-info')
 
    ctx.run('python setup.py sdist --formats=gztar')
 
    if os.path.exists('${egg_name}.egg-info'):
 
        shutil.rmtree('${egg_name}.egg-info')
 
    c.run('python -m build --sdist')
 

	
 
    # filename of built package
 
    filename = '${python_project_name}-{}.tar.gz'.format(__version__)
 

	
 
    # TODO: uncomment and update these details, to upload to private PyPI
 
    #filename = '${python_project_name}-{}.tar.gz'.format(__version__)
 
    #ctx.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/${slug}/'.format(filename))
 
    #c.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/${slug}/'.format(filename))
 

	
 
    # TODO: or, uncomment this to upload to *public* PyPI
 
    #c.run('twine upload dist/{}'.format(filename))
setup.py
Show inline comments
 
@@ -2,7 +2,7 @@
 
################################################################################
 
#
 
#  Rattail -- Retail Software Framework
 
#  Copyright © 2010-2022 Lance Edgar
 
#  Copyright © 2010-2023 Lance Edgar
 
#
 
#  This file is part of Rattail.
 
#
 
@@ -93,13 +93,6 @@ if sys.platform != 'win32':
 

	
 
extras = {
 

	
 
    'auth': [
 
        #
 
        # package                       # low                   high
 

	
 
        'passlib',                      # 1.7.1
 
    ],
 

	
 
    'bouncer': [
 
        #
 
        # package                       # low                   high
 
@@ -115,6 +108,7 @@ extras = {
 
        # Support for multiple migration bases was added in Alembic 0.7.
 
        'alembic>=0.7.0',               #                       0.7.4
 
        'beaker',                       # 1.11.0
 
        'passlib',                      # 1.7.1
 
        # TODO: add support for 1.4.x and later
 
        'SQLAlchemy<1.4',               # 0.7.6                 1.3.23
 
        'SQLAlchemy-Continuum',         # 1.1.5
0 comments (0 inline, 0 general)