From 9b0bbb74c23ef1e49bd6f48b785db4852b156f26 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 16 Aug 2019 20:46:01 +0000 Subject: [PATCH] Initial content as generated from scaffold --- .gitignore | 1 + MANIFEST.in | 8 + README.rst | 8 + rattail_tutorial/__init__.py | 8 + rattail_tutorial/_version.py | 3 + rattail_tutorial/commands.py | 42 +++++ rattail_tutorial/config.py | 21 +++ rattail_tutorial/db/__init__.py | 0 rattail_tutorial/db/alembic/README | 1 + rattail_tutorial/db/alembic/env.py | 76 ++++++++ rattail_tutorial/db/alembic/script.py.mako | 30 ++++ rattail_tutorial/db/model/__init__.py | 12 ++ rattail_tutorial/db/model/core.py | 43 +++++ rattail_tutorial/emails.py | 19 ++ rattail_tutorial/web/__init__.py | 0 rattail_tutorial/web/app.py | 35 ++++ rattail_tutorial/web/menus.py | 170 ++++++++++++++++++ rattail_tutorial/web/static/__init__.py | 9 + rattail_tutorial/web/subscribers.py | 18 ++ rattail_tutorial/web/templates/base_meta.mako | 20 +++ rattail_tutorial/web/templates/home.mako | 14 ++ rattail_tutorial/web/templates/login.mako | 18 ++ .../web/templates/mobile/base.mako | 27 +++ .../web/templates/mobile/home.mako | 8 + rattail_tutorial/web/views/__init__.py | 40 +++++ rattail_tutorial/web/views/common.py | 20 +++ setup.py | 97 ++++++++++ 27 files changed, 748 insertions(+) create mode 100644 .gitignore create mode 100644 MANIFEST.in create mode 100644 README.rst create mode 100644 rattail_tutorial/__init__.py create mode 100644 rattail_tutorial/_version.py create mode 100644 rattail_tutorial/commands.py create mode 100644 rattail_tutorial/config.py create mode 100644 rattail_tutorial/db/__init__.py create mode 100644 rattail_tutorial/db/alembic/README create mode 100644 rattail_tutorial/db/alembic/env.py create mode 100644 rattail_tutorial/db/alembic/script.py.mako create mode 100644 rattail_tutorial/db/model/__init__.py create mode 100644 rattail_tutorial/db/model/core.py create mode 100644 rattail_tutorial/emails.py create mode 100644 rattail_tutorial/web/__init__.py create mode 100644 rattail_tutorial/web/app.py create mode 100644 rattail_tutorial/web/menus.py create mode 100644 rattail_tutorial/web/static/__init__.py create mode 100644 rattail_tutorial/web/subscribers.py create mode 100644 rattail_tutorial/web/templates/base_meta.mako create mode 100644 rattail_tutorial/web/templates/home.mako create mode 100644 rattail_tutorial/web/templates/login.mako create mode 100644 rattail_tutorial/web/templates/mobile/base.mako create mode 100644 rattail_tutorial/web/templates/mobile/home.mako create mode 100644 rattail_tutorial/web/views/__init__.py create mode 100644 rattail_tutorial/web/views/common.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..68d392e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Rattail Tutorial.egg-info/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..210d406 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +# -*- mode: conf -*- + +include *.rst + +recursive-include rattail_tutorial/web/static *.css +recursive-include rattail_tutorial/web/static *.js + +recursive-include rattail_tutorial/web/templates *.mako diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..26436e5 --- /dev/null +++ b/README.rst @@ -0,0 +1,8 @@ +.. -*- mode: rst -*- + +rattail-tutorial +=========== + +This is a starter Rattail project. See the `Rattail website`_ for more info. + +.. _`Rattail website`: https://rattailproject.org/ diff --git a/rattail_tutorial/__init__.py b/rattail_tutorial/__init__.py new file mode 100644 index 0000000..a175cf7 --- /dev/null +++ b/rattail_tutorial/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8; -*- +""" +Rattail Tutorial package root +""" + +from __future__ import unicode_literals, absolute_import + +from ._version import __version__ diff --git a/rattail_tutorial/_version.py b/rattail_tutorial/_version.py new file mode 100644 index 0000000..e41b669 --- /dev/null +++ b/rattail_tutorial/_version.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8; -*- + +__version__ = '0.1.0' diff --git a/rattail_tutorial/commands.py b/rattail_tutorial/commands.py new file mode 100644 index 0000000..669e352 --- /dev/null +++ b/rattail_tutorial/commands.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8; mode: python -*- +""" +Rattail Tutorial commands +""" + +from __future__ import unicode_literals, absolute_import + +import sys + +from rattail import commands + +from rattail_tutorial import __version__ + + +def main(*args): + """ + Main entry point for Rattail Tutorial command system + """ + args = list(args or sys.argv[1:]) + cmd = Command() + cmd.run(*args) + + +class Command(commands.Command): + """ + Main command for Rattail Tutorial + """ + name = 'rattail_tutorial' + version = __version__ + description = "Rattail Tutorial (custom Rattail system)" + long_description = '' + + +class HelloWorld(commands.Subcommand): + """ + The requisite 'hello world' example + """ + name = 'hello' + description = __doc__.strip() + + def run(self, args): + self.stdout.write("hello world!\n") diff --git a/rattail_tutorial/config.py b/rattail_tutorial/config.py new file mode 100644 index 0000000..43ef0aa --- /dev/null +++ b/rattail_tutorial/config.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Custom config +""" + +from __future__ import unicode_literals, absolute_import + +from rattail.config import ConfigExtension + + +class Rattail_tutorialConfig(ConfigExtension): + """ + Rattail config extension for Rattail Tutorial + """ + key = 'rattail_tutorial' + + def configure(self, config): + + # set some default config values + config.setdefault('rattail.mail', 'emails', 'rattail_tutorial.emails') + config.setdefault('tailbone', 'menus', 'rattail_tutorial.web.menus') diff --git a/rattail_tutorial/db/__init__.py b/rattail_tutorial/db/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/rattail_tutorial/db/alembic/README b/rattail_tutorial/db/alembic/README new file mode 100644 index 0000000..98e4f9c --- /dev/null +++ b/rattail_tutorial/db/alembic/README @@ -0,0 +1 @@ +Generic single-database configuration. \ No newline at end of file diff --git a/rattail_tutorial/db/alembic/env.py b/rattail_tutorial/db/alembic/env.py new file mode 100644 index 0000000..2026952 --- /dev/null +++ b/rattail_tutorial/db/alembic/env.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Alembic environment script +""" + +from __future__ import unicode_literals, absolute_import + +from alembic import context +from sqlalchemy.orm import configure_mappers + +from rattail.config import make_config +from rattail.db.util import get_default_engine +from rattail.db.continuum import configure_versioning + + +# this is the Alembic Config object, which provides +# access to the values within the .ini file in use. +alembic_config = context.config + +# use same config file for Rattail +rattail_config = make_config(alembic_config.config_file_name, usedb=False, versioning=False) + +# configure Continuum..this is trickier than we want but it works.. +configure_versioning(rattail_config, force=True) +from rattail_tutorial.db import model +configure_mappers() + +# needed for 'autogenerate' support +target_metadata = model.Base.metadata + + +def run_migrations_offline(): + """Run migrations in 'offline' mode. + + This configures the context with just a URL + and not an Engine, though an Engine is acceptable + here as well. By skipping the Engine creation + we don't even need a DBAPI to be available. + + Calls to context.execute() here emit the given string to the + script output. + + """ + engine = get_default_engine(rattail_config) + context.configure( + url=engine.url, + target_metadata=target_metadata) + + with context.begin_transaction(): + context.run_migrations() + + +def run_migrations_online(): + """Run migrations in 'online' mode. + + In this scenario we need to create an Engine + and associate a connection with the context. + + """ + engine = get_default_engine(rattail_config) + connection = engine.connect() + context.configure( + connection=connection, + target_metadata=target_metadata) + + try: + with context.begin_transaction(): + context.run_migrations() + finally: + connection.close() + + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() diff --git a/rattail_tutorial/db/alembic/script.py.mako b/rattail_tutorial/db/alembic/script.py.mako new file mode 100644 index 0000000..70d0254 --- /dev/null +++ b/rattail_tutorial/db/alembic/script.py.mako @@ -0,0 +1,30 @@ +# -*- coding: utf-8; mode: python; -*- +# -*- coding: utf-8 -*- +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision | comma,n} +Create Date: ${create_date} + +""" + +from __future__ import unicode_literals, absolute_import + +# revision identifiers, used by Alembic. +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +branch_labels = ${repr(branch_labels)} +depends_on = ${repr(depends_on)} + +from alembic import op +import sqlalchemy as sa +import rattail.db.types +${imports if imports else ""} + + +def upgrade(): + ${upgrades if upgrades else "pass"} + + +def downgrade(): + ${downgrades if downgrades else "pass"} diff --git a/rattail_tutorial/db/model/__init__.py b/rattail_tutorial/db/model/__init__.py new file mode 100644 index 0000000..7dc4a02 --- /dev/null +++ b/rattail_tutorial/db/model/__init__.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Rattail Tutorial data models +""" + +from __future__ import unicode_literals, absolute_import + +# bring in all the normal stuff from Rattail +from rattail.db.model import * + +# add Rattail Tutorial models +from .core import Rattail_tutorialCustomer diff --git a/rattail_tutorial/db/model/core.py b/rattail_tutorial/db/model/core.py new file mode 100644 index 0000000..8f1f1c9 --- /dev/null +++ b/rattail_tutorial/db/model/core.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8; mode: python -*- +""" +Rattail core data model extensions +""" + +from __future__ import unicode_literals, absolute_import + +import sqlalchemy as sa +from sqlalchemy import orm + +from rattail.db import model +from rattail.db.core import uuid_column + + +class Rattail_tutorialCustomer(model.Base): + """ + Rattail Tutorial extensions to core Customer model + """ + __tablename__ = 'rattail_tutorial_customer' + __table_args__ = ( + sa.ForeignKeyConstraint(['uuid'], ['customer.uuid'], name='rattail_tutorial_customer_fk_customer'), + ) + + uuid = uuid_column(default=None) + + customer = orm.relationship( + model.Customer, + doc=""" + Customer to which this extension record pertains. + """, + backref=orm.backref( + '_rattail_tutorial', + uselist=False, + cascade='all, delete-orphan', + doc=""" + Rattail Tutorial-specific extension record for the customer. + """), + ) + + mail_list_synced = sa.Column(sa.Boolean(), nullable=False, default=False, doc=""" + Flag indicating whether the customer's email address has been synced to the + general mailing list. + """) diff --git a/rattail_tutorial/emails.py b/rattail_tutorial/emails.py new file mode 100644 index 0000000..2b57282 --- /dev/null +++ b/rattail_tutorial/emails.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8; mode: python -*- +""" +Custom email profiles +""" + +from __future__ import unicode_literals, absolute_import + +from rattail.mail import Email + +# bring in some common ones from rattail +from rattail.emails import datasync_error_watcher_get_changes, filemon_action_error + + +class rattail_import_sample_updates(Email): + """ + Sent when a Sample -> Rattail Tutorial import involves data changes + """ + fallback_key = 'rattail_import_updates' + default_subject = "Changes for Sample -> Rattail Tutorial" diff --git a/rattail_tutorial/web/__init__.py b/rattail_tutorial/web/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/rattail_tutorial/web/app.py b/rattail_tutorial/web/app.py new file mode 100644 index 0000000..c8a6aef --- /dev/null +++ b/rattail_tutorial/web/app.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Rattail Tutorial web app +""" + +from __future__ import unicode_literals, absolute_import + +from tailbone import app + + +def main(global_config, **settings): + """ + This function returns a Pyramid WSGI application. + """ + # prefer Rattail Tutorial templates over Tailbone + settings.setdefault('mako.directories', ['rattail_tutorial.web:templates', + 'tailbone:templates',]) + + # for graceful handling of postgres restart + settings.setdefault('retry.attempts', 2) + + # make config objects + rattail_config = app.make_rattail_config(settings) + pyramid_config = app.make_pyramid_config(settings) + + # bring in the rest of Rattail Tutorial + pyramid_config.include('rattail_tutorial.web.static') + pyramid_config.include('rattail_tutorial.web.subscribers') + pyramid_config.include('rattail_tutorial.web.views') + + # for graceful handling of postgres restart + pyramid_config.add_tween('tailbone.tweens.sqlerror_tween_factory', + under='pyramid_tm.tm_tween_factory') + + return pyramid_config.make_wsgi_app() diff --git a/rattail_tutorial/web/menus.py b/rattail_tutorial/web/menus.py new file mode 100644 index 0000000..09e009b --- /dev/null +++ b/rattail_tutorial/web/menus.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8; -*- +""" +Web Menus +""" + +from __future__ import unicode_literals, absolute_import + + +def simple_menus(request): + url = request.route_url + + menus = [ + { + 'title': "Products", + 'type': 'menu', + 'items': [ + { + 'title': "Products", + 'url': url('products'), + 'perm': 'products.list', + }, + { + 'title': "Brands", + 'url': url('brands'), + 'perm': 'brands.list', + }, + { + 'title': "Report Codes", + 'url': url('reportcodes'), + 'perm': 'reportcodes.list', + }, + ], + }, + { + 'title': "Vendors", + 'type': 'menu', + 'items': [ + { + 'title': "Vendors", + 'url': url('vendors'), + 'perm': 'vendors.list', + }, + {'type': 'sep'}, + { + 'title': "Catalogs", + 'url': url('vendorcatalogs'), + 'perm': 'vendorcatalogs.list', + }, + { + 'title': "Upload New Catalog", + 'url': url('vendorcatalogs.create'), + 'perm': 'vendorcatalogs.create', + }, + ], + }, + { + 'title': "Company", + 'type': 'menu', + 'items': [ + { + 'title': "Stores", + 'url': url('stores'), + 'perm': 'stores.list', + }, + { + 'title': "Departments", + 'url': url('departments'), + 'perm': 'departments.list', + }, + { + 'title': "Subdepartments", + 'url': url('subdepartments'), + 'perm': 'subdepartments.list', + }, + {'type': 'sep'}, + { + 'title': "Employees", + 'url': url('employees'), + 'perm': 'employees.list', + }, + {'type': 'sep'}, + { + 'title': "Customers", + 'url': url('customers'), + 'perm': 'customers.list', + }, + { + 'title': "Customer Groups", + 'url': url('customergroups'), + 'perm': 'customergroups.list', + }, + ], + }, + { + 'title': "Batches", + 'type': 'menu', + 'items': [ + { + 'title': "Handheld", + 'url': url('batch.handheld'), + 'perm': 'batch.handheld.list', + }, + { + 'title': "Inventory", + 'url': url('batch.inventory'), + 'perm': 'batch.inventory.list', + }, + ], + }, + { + 'title': "Admin", + 'type': 'menu', + 'items': [ + { + 'title': "Users", + 'url': url('users'), + 'perm': 'users.list', + }, + { + 'title': "User Events", + 'url': url('userevents'), + 'perm': 'userevents.list', + }, + { + 'title': "Roles", + 'url': url('roles'), + 'perm': 'roles.list', + }, + {'type': 'sep'}, + { + 'title': "App Settings", + 'url': url('appsettings'), + 'perm': 'settings.list', + }, + { + 'title': "Email Settings", + 'url': url('emailprofiles'), + 'perm': 'emailprofiles.list', + }, + { + 'title': "Email Attempts", + 'url': url('email_attempts'), + 'perm': 'email_attempts.list', + }, + { + 'title': "Raw Settings", + 'url': url('settings'), + 'perm': 'settings.list', + }, + {'type': 'sep'}, + { + 'title': "DataSync Changes", + 'url': url('datasyncchanges'), + 'perm': 'datasync.list', + }, + { + 'title': "Tables", + 'url': url('tables'), + 'perm': 'tables.list', + }, + { + 'title': "Rattail Tutorial Upgrades", + 'url': url('upgrades'), + 'perm': 'upgrades.list', + }, + ], + }, + ] + + return menus diff --git a/rattail_tutorial/web/static/__init__.py b/rattail_tutorial/web/static/__init__.py new file mode 100644 index 0000000..0d315fa --- /dev/null +++ b/rattail_tutorial/web/static/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8; mode: python -*- +""" +Static assets +""" + + +def includeme(config): + config.include('tailbone.static') + config.add_static_view('rattail_tutorial', 'rattail_tutorial.web:static', cache_max_age=3600) diff --git a/rattail_tutorial/web/subscribers.py b/rattail_tutorial/web/subscribers.py new file mode 100644 index 0000000..9f9aa02 --- /dev/null +++ b/rattail_tutorial/web/subscribers.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8; mode: python -*- +""" +Pyramid event subscribers +""" + +from __future__ import unicode_literals, absolute_import + +import rattail_tutorial + + +def add_rattail_tutorial_to_context(event): + renderer_globals = event + renderer_globals['rattail_tutorial'] = rattail_tutorial + + +def includeme(config): + config.include('tailbone.subscribers') + config.add_subscriber(add_rattail_tutorial_to_context, 'pyramid.events.BeforeRender') diff --git a/rattail_tutorial/web/templates/base_meta.mako b/rattail_tutorial/web/templates/base_meta.mako new file mode 100644 index 0000000..3672e33 --- /dev/null +++ b/rattail_tutorial/web/templates/base_meta.mako @@ -0,0 +1,20 @@ +## -*- coding: utf-8; mode: html; -*- +<%inherit file="tailbone:templates/base_meta.mako" /> + +## default behavior is to read app_title from settings +## <%def name="app_title()">Rattail Tutorial + +<%def name="favicon()"> + ## + + + +<%def name="header_logo()"> + ${h.image(request.static_url('tailbone:static/img/rattail.ico'), "Header Logo", style="height: 49px;")} + + +<%def name="footer()"> +

+ ${h.link_to("Rattail Tutorial {}{}".format(rattail_tutorial.__version__, '' if request.rattail_config.production() else '+dev'), url('about'))} +

+ diff --git a/rattail_tutorial/web/templates/home.mako b/rattail_tutorial/web/templates/home.mako new file mode 100644 index 0000000..51360f4 --- /dev/null +++ b/rattail_tutorial/web/templates/home.mako @@ -0,0 +1,14 @@ +## -*- coding: utf-8; mode: html; -*- +<%inherit file="tailbone:templates/home.mako" /> + +<%def name="title()">Home + + + +

Welcome to Rattail Tutorial

+ diff --git a/rattail_tutorial/web/templates/login.mako b/rattail_tutorial/web/templates/login.mako new file mode 100644 index 0000000..786e149 --- /dev/null +++ b/rattail_tutorial/web/templates/login.mako @@ -0,0 +1,18 @@ +## -*- coding: utf-8; mode: html; -*- +<%inherit file="tailbone:templates/login.mako" /> + +<%def name="extra_styles()"> + ${parent.extra_styles()} + + + +<%def name="logo()"> + ## ${h.image(request.static_url('ratbob.web:static/img/ratbob.jpg'), "Ratbob Logo", id='logo', width=500)} + ${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", id='logo')} + + +${parent.body()} diff --git a/rattail_tutorial/web/templates/mobile/base.mako b/rattail_tutorial/web/templates/mobile/base.mako new file mode 100644 index 0000000..fbe84c0 --- /dev/null +++ b/rattail_tutorial/web/templates/mobile/base.mako @@ -0,0 +1,27 @@ +## -*- coding: utf-8; mode: html; -*- +<%inherit file="tailbone:templates/mobile/base.mako" /> + +<%def name="app_title()">Rattail Tutorial + +<%def name="mobile_usermenu()"> +
+ +
+ + +<%def name="mobile_footer()"> +
+

${h.link_to("Rattail Tutorial {}{}".format(rattail_tutorial.__version__, '' if request.rattail_config.production() else '+dev'), url('mobile.about'))}

+
+ + +${parent.body()} diff --git a/rattail_tutorial/web/templates/mobile/home.mako b/rattail_tutorial/web/templates/mobile/home.mako new file mode 100644 index 0000000..8d15a60 --- /dev/null +++ b/rattail_tutorial/web/templates/mobile/home.mako @@ -0,0 +1,8 @@ +## -*- coding: utf-8; mode: html; -*- +<%inherit file="tailbone:templates/mobile/home.mako" /> + +
+ ## ${h.image(request.static_url('rattail_tutorial.web:static/img/rattail_tutorial.jpg'), "Rattail Tutorial Logo", width='300')} + ${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", width='400')} +

Welcome to ${self.app_title()}

+
diff --git a/rattail_tutorial/web/views/__init__.py b/rattail_tutorial/web/views/__init__.py new file mode 100644 index 0000000..70be13f --- /dev/null +++ b/rattail_tutorial/web/views/__init__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Views +""" + +from __future__ import unicode_literals, absolute_import + + +def includeme(config): + + # core views + config.include('rattail_tutorial.web.views.common') + config.include('tailbone.views.auth') + config.include('tailbone.views.tables') + config.include('tailbone.views.upgrades') + config.include('tailbone.views.progress') + + # main table views + config.include('tailbone.views.brands') + config.include('tailbone.views.customers') + config.include('tailbone.views.customergroups') + config.include('tailbone.views.datasync') + config.include('tailbone.views.departments') + config.include('tailbone.views.email') + config.include('tailbone.views.employees') + config.include('tailbone.views.messages') + config.include('tailbone.views.people') + config.include('tailbone.views.products') + config.include('tailbone.views.reportcodes') + config.include('tailbone.views.roles') + config.include('tailbone.views.settings') + config.include('tailbone.views.shifts') + config.include('tailbone.views.stores') + config.include('tailbone.views.subdepartments') + config.include('tailbone.views.users') + config.include('tailbone.views.vendors') + + # batch views + config.include('tailbone.views.handheld') + config.include('tailbone.views.inventory') diff --git a/rattail_tutorial/web/views/common.py b/rattail_tutorial/web/views/common.py new file mode 100644 index 0000000..04d86c3 --- /dev/null +++ b/rattail_tutorial/web/views/common.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8; mode: python; -*- +""" +Common views +""" + +from __future__ import unicode_literals, absolute_import + +from tailbone.views import common as base + +import rattail_tutorial + + +class CommonView(base.CommonView): + + project_title = "Rattail Tutorial" + project_version = rattail_tutorial.__version__ + '+dev' + + +def includeme(config): + CommonView.defaults(config) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a11ffd3 --- /dev/null +++ b/setup.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8; mode: python -*- +""" +Rattail Tutorial setup script +""" + +from __future__ import unicode_literals, absolute_import + +import os +from setuptools import setup, find_packages + + +here = os.path.abspath(os.path.dirname(__file__)) +exec(open(os.path.join(here, 'rattail_tutorial', '_version.py')).read()) +README = open(os.path.join(here, 'README.rst')).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 + + 'psycopg2', # 2.6.2 + 'rattail', # 0.7.25 + 'Tailbone', # 0.5.29 +] + + +setup( + name = "Rattail_tutorial", + version = __version__, + author = "Your Name", + author_email = "you@example.com", + # url = "", + description = "Rattail project for Your Company", + long_description = README, + + classifiers = [ + 'Private :: Do Not Upload', + 'Development Status :: 3 - Alpha', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Framework :: Pyramid', + 'Intended Audience :: Developers', + 'Natural Language :: English', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Topic :: Office/Business', + ], + + install_requires = requires, + packages = find_packages(), + include_package_data = True, + + entry_points = { + + 'rattail.config.extensions': [ + 'rattail_tutorial = rattail_tutorial.config:Rattail_tutorialConfig', + ], + + 'console_scripts': [ + 'rattail_tutorial = rattail_tutorial.commands:main', + ], + + 'rattail_tutorial.commands': [ + 'hello = rattail_tutorial.commands:HelloWorld', + ], + + 'paste.app_factory': [ + 'main = rattail_tutorial.web.app:main', + ], + }, +)