From 0bfa77ed4f1f2eb042a8bdfd91d8c4ed6a9021a8 Mon Sep 17 00:00:00 2001 From: aleontiev Date: Sat, 11 Feb 2017 19:42:07 -0800 Subject: [PATCH] .. --- .build/bin/activate | 78 ++++++++++++++++++ .build/bin/activate.csh | 36 ++++++++ .build/bin/activate.fish | 76 +++++++++++++++++ .build/bin/activate_this.py | 34 ++++++++ .build/bin/coverage | 11 +++ .build/bin/coverage-2.7 | 11 +++ .build/bin/coverage2 | 11 +++ .build/bin/django-admin | 12 +++ .build/bin/django-admin.py | 5 ++ .build/bin/easy_install | 11 +++ .build/bin/easy_install-2.7 | 11 +++ .build/bin/flake8 | 11 +++ .build/bin/manage.py | 4 + .build/bin/pep8 | 11 +++ .build/bin/pip | 11 +++ .build/bin/pip2 | 11 +++ .build/bin/pip2.7 | 11 +++ .build/bin/py.test | 11 +++ .build/bin/py.test-2.7 | 11 +++ .build/bin/pybabel | 11 +++ .build/bin/pycodestyle | 11 +++ .build/bin/pyflakes | 11 +++ .build/bin/pygmentize | 11 +++ .build/bin/python | 1 + .build/bin/python-config | 78 ++++++++++++++++++ .build/bin/python2 | 1 + .build/bin/python2.7 | Bin 0 -> 8872 bytes .build/bin/rst2html.py | 23 ++++++ .build/bin/rst2html5.py | 35 ++++++++ .build/bin/rst2latex.py | 26 ++++++ .build/bin/rst2man.py | 26 ++++++ .build/bin/rst2odt.py | 30 +++++++ .build/bin/rst2odt_prepstyles.py | 67 +++++++++++++++ .build/bin/rst2pseudoxml.py | 23 ++++++ .build/bin/rst2s5.py | 24 ++++++ .build/bin/rst2xetex.py | 27 ++++++ .build/bin/rst2xml.py | 23 ++++++ .build/bin/rstpep2html.py | 25 ++++++ .build/bin/sphinx-apidoc | 11 +++ .build/bin/sphinx-autogen | 11 +++ .build/bin/sphinx-build | 11 +++ .build/bin/sphinx-quickstart | 11 +++ .build/bin/sqlformat | 11 +++ .build/bin/tox | 11 +++ .build/bin/tox-quickstart | 11 +++ .build/bin/virtualenv | 11 +++ .build/bin/wheel | 11 +++ .build/include/python2.7 | 1 + .build/pip-selfcheck.json | 1 + .gitignore | 1 + MANIFEST.in | 2 + Makefile | 21 ++--- dj.yml | 1 + dynamic_rest/blueprints/init/__init__.py | 0 dynamic_rest/blueprints/init/context.py | 6 ++ .../init/templates/{{apo}}/settings.py.j2 | 4 + dynamic_rest/constants.py | 8 -- setup.py | 27 +++--- 58 files changed, 960 insertions(+), 41 deletions(-) create mode 100644 .build/bin/activate create mode 100644 .build/bin/activate.csh create mode 100644 .build/bin/activate.fish create mode 100644 .build/bin/activate_this.py create mode 100755 .build/bin/coverage create mode 100755 .build/bin/coverage-2.7 create mode 100755 .build/bin/coverage2 create mode 100755 .build/bin/django-admin create mode 100755 .build/bin/django-admin.py create mode 100755 .build/bin/easy_install create mode 100755 .build/bin/easy_install-2.7 create mode 100755 .build/bin/flake8 create mode 100755 .build/bin/manage.py create mode 100755 .build/bin/pep8 create mode 100755 .build/bin/pip create mode 100755 .build/bin/pip2 create mode 100755 .build/bin/pip2.7 create mode 100755 .build/bin/py.test create mode 100755 .build/bin/py.test-2.7 create mode 100755 .build/bin/pybabel create mode 100755 .build/bin/pycodestyle create mode 100755 .build/bin/pyflakes create mode 100755 .build/bin/pygmentize create mode 120000 .build/bin/python create mode 100755 .build/bin/python-config create mode 120000 .build/bin/python2 create mode 100755 .build/bin/python2.7 create mode 100755 .build/bin/rst2html.py create mode 100755 .build/bin/rst2html5.py create mode 100755 .build/bin/rst2latex.py create mode 100755 .build/bin/rst2man.py create mode 100755 .build/bin/rst2odt.py create mode 100755 .build/bin/rst2odt_prepstyles.py create mode 100755 .build/bin/rst2pseudoxml.py create mode 100755 .build/bin/rst2s5.py create mode 100755 .build/bin/rst2xetex.py create mode 100755 .build/bin/rst2xml.py create mode 100755 .build/bin/rstpep2html.py create mode 100755 .build/bin/sphinx-apidoc create mode 100755 .build/bin/sphinx-autogen create mode 100755 .build/bin/sphinx-build create mode 100755 .build/bin/sphinx-quickstart create mode 100755 .build/bin/sqlformat create mode 100755 .build/bin/tox create mode 100755 .build/bin/tox-quickstart create mode 100755 .build/bin/virtualenv create mode 100755 .build/bin/wheel create mode 120000 .build/include/python2.7 create mode 100644 .build/pip-selfcheck.json create mode 100644 dj.yml create mode 100644 dynamic_rest/blueprints/init/__init__.py create mode 100644 dynamic_rest/blueprints/init/context.py create mode 100644 dynamic_rest/blueprints/init/templates/{{apo}}/settings.py.j2 diff --git a/.build/bin/activate b/.build/bin/activate new file mode 100644 index 00000000..d1178e95 --- /dev/null +++ b/.build/bin/activate @@ -0,0 +1,78 @@ +# This file must be used with "source bin/activate" *from bash* +# you cannot run it directly + +deactivate () { + unset -f pydoc >/dev/null 2>&1 + + # reset old environment variables + # ! [ -z ${VAR+_} ] returns true if VAR is declared at all + if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then + PATH="$_OLD_VIRTUAL_PATH" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then + PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then + hash -r 2>/dev/null + fi + + if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then + PS1="$_OLD_VIRTUAL_PS1" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + if [ ! "${1-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +VIRTUAL_ENV="/Users/ant/code/altschool/dynamic-rest/.build" +export VIRTUAL_ENV + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/bin:$PATH" +export PATH + +# unset PYTHONHOME if set +if ! [ -z "${PYTHONHOME+_}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then + _OLD_VIRTUAL_PS1="$PS1" + if [ "x" != x ] ; then + PS1="$PS1" + else + PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1" + fi + export PS1 +fi + +# Make sure to unalias pydoc if it's already there +alias pydoc 2>/dev/null >/dev/null && unalias pydoc + +pydoc () { + python -m pydoc "$@" +} + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then + hash -r 2>/dev/null +fi diff --git a/.build/bin/activate.csh b/.build/bin/activate.csh new file mode 100644 index 00000000..f635c0ab --- /dev/null +++ b/.build/bin/activate.csh @@ -0,0 +1,36 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. +# Created by Davide Di Blasi . + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV "/Users/ant/code/altschool/dynamic-rest/.build" + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/bin:$PATH" + + + +if ("" != "") then + set env_name = "" +else + set env_name = `basename "$VIRTUAL_ENV"` +endif + +# Could be in a non-interactive environment, +# in which case, $prompt is undefined and we wouldn't +# care about the prompt anyway. +if ( $?prompt ) then + set _OLD_VIRTUAL_PROMPT="$prompt" + set prompt = "[$env_name] $prompt" +endif + +unset env_name + +alias pydoc python -m pydoc + +rehash + diff --git a/.build/bin/activate.fish b/.build/bin/activate.fish new file mode 100644 index 00000000..00fffda1 --- /dev/null +++ b/.build/bin/activate.fish @@ -0,0 +1,76 @@ +# This file must be used using `. bin/activate.fish` *within a running fish ( http://fishshell.com ) session*. +# Do not run it directly. + +function deactivate -d 'Exit virtualenv mode and return to the normal environment.' + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + # Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`. + set -l fish_function_path + + # Erase virtualenv's `fish_prompt` and restore the original. + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + set -e _OLD_FISH_PROMPT_OVERRIDE + end + + set -e VIRTUAL_ENV + + if test "$argv[1]" != 'nondestructive' + # Self-destruct! + functions -e pydoc + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV "/Users/ant/code/altschool/dynamic-rest/.build" + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/bin" $PATH + +# Unset `$PYTHONHOME` if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +function pydoc + python -m pydoc $argv +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # Copy the current `fish_prompt` function as `_old_fish_prompt`. + functions -c fish_prompt _old_fish_prompt + + function fish_prompt + # Save the current $status, for fish_prompts that display it. + set -l old_status $status + + # Prompt override provided? + # If not, just prepend the environment name. + if test -n "" + printf '%s%s' "" (set_color normal) + else + printf '%s(%s) ' (set_color normal) (basename "$VIRTUAL_ENV") + end + + # Restore the original $status + echo "exit $old_status" | source + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" +end diff --git a/.build/bin/activate_this.py b/.build/bin/activate_this.py new file mode 100644 index 00000000..f18193bf --- /dev/null +++ b/.build/bin/activate_this.py @@ -0,0 +1,34 @@ +"""By using execfile(this_file, dict(__file__=this_file)) you will +activate this virtualenv environment. + +This can be used when you must use an existing Python interpreter, not +the virtualenv bin/python +""" + +try: + __file__ +except NameError: + raise AssertionError( + "You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))") +import sys +import os + +old_os_path = os.environ.get('PATH', '') +os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + os.pathsep + old_os_path +base = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if sys.platform == 'win32': + site_packages = os.path.join(base, 'Lib', 'site-packages') +else: + site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages') +prev_sys_path = list(sys.path) +import site +site.addsitedir(site_packages) +sys.real_prefix = sys.prefix +sys.prefix = base +# Move the added items to the front of the path: +new_sys_path = [] +for item in list(sys.path): + if item not in prev_sys_path: + new_sys_path.append(item) + sys.path.remove(item) +sys.path[:0] = new_sys_path diff --git a/.build/bin/coverage b/.build/bin/coverage new file mode 100755 index 00000000..970e6792 --- /dev/null +++ b/.build/bin/coverage @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from coverage import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/coverage-2.7 b/.build/bin/coverage-2.7 new file mode 100755 index 00000000..970e6792 --- /dev/null +++ b/.build/bin/coverage-2.7 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from coverage import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/coverage2 b/.build/bin/coverage2 new file mode 100755 index 00000000..970e6792 --- /dev/null +++ b/.build/bin/coverage2 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from coverage import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/django-admin b/.build/bin/django-admin new file mode 100755 index 00000000..807e0862 --- /dev/null +++ b/.build/bin/django-admin @@ -0,0 +1,12 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python +# EASY-INSTALL-ENTRY-SCRIPT: 'Django==1.10','console_scripts','django-admin' +__requires__ = 'Django==1.10' +import re +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point('Django==1.10', 'console_scripts', 'django-admin')() + ) diff --git a/.build/bin/django-admin.py b/.build/bin/django-admin.py new file mode 100755 index 00000000..f6c10474 --- /dev/null +++ b/.build/bin/django-admin.py @@ -0,0 +1,5 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 +from django.core import management + +if __name__ == "__main__": + management.execute_from_command_line() diff --git a/.build/bin/easy_install b/.build/bin/easy_install new file mode 100755 index 00000000..4369524e --- /dev/null +++ b/.build/bin/easy_install @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from setuptools.command.easy_install import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/easy_install-2.7 b/.build/bin/easy_install-2.7 new file mode 100755 index 00000000..4369524e --- /dev/null +++ b/.build/bin/easy_install-2.7 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from setuptools.command.easy_install import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/flake8 b/.build/bin/flake8 new file mode 100755 index 00000000..b2b83cd0 --- /dev/null +++ b/.build/bin/flake8 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from flake8.main import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/manage.py b/.build/bin/manage.py new file mode 100755 index 00000000..6955e3aa --- /dev/null +++ b/.build/bin/manage.py @@ -0,0 +1,4 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python +# EASY-INSTALL-SCRIPT: 'dynamic-rest==1.6.1','manage.py' +__requires__ = 'dynamic-rest==1.6.1' +__import__('pkg_resources').run_script('dynamic-rest==1.6.1', 'manage.py') diff --git a/.build/bin/pep8 b/.build/bin/pep8 new file mode 100755 index 00000000..3ad0ee24 --- /dev/null +++ b/.build/bin/pep8 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pep8 import _main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(_main()) diff --git a/.build/bin/pip b/.build/bin/pip new file mode 100755 index 00000000..6d830c07 --- /dev/null +++ b/.build/bin/pip @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/pip2 b/.build/bin/pip2 new file mode 100755 index 00000000..6d830c07 --- /dev/null +++ b/.build/bin/pip2 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/pip2.7 b/.build/bin/pip2.7 new file mode 100755 index 00000000..6d830c07 --- /dev/null +++ b/.build/bin/pip2.7 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pip import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/py.test b/.build/bin/py.test new file mode 100755 index 00000000..909e51fc --- /dev/null +++ b/.build/bin/py.test @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pytest import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/py.test-2.7 b/.build/bin/py.test-2.7 new file mode 100755 index 00000000..909e51fc --- /dev/null +++ b/.build/bin/py.test-2.7 @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pytest import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/pybabel b/.build/bin/pybabel new file mode 100755 index 00000000..f66bcf37 --- /dev/null +++ b/.build/bin/pybabel @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from babel.messages.frontend import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/pycodestyle b/.build/bin/pycodestyle new file mode 100755 index 00000000..b1920713 --- /dev/null +++ b/.build/bin/pycodestyle @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pycodestyle import _main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(_main()) diff --git a/.build/bin/pyflakes b/.build/bin/pyflakes new file mode 100755 index 00000000..0184d8db --- /dev/null +++ b/.build/bin/pyflakes @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pyflakes.api import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/pygmentize b/.build/bin/pygmentize new file mode 100755 index 00000000..58d980e5 --- /dev/null +++ b/.build/bin/pygmentize @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from pygments.cmdline import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/python b/.build/bin/python new file mode 120000 index 00000000..8f7a3c1a --- /dev/null +++ b/.build/bin/python @@ -0,0 +1 @@ +python2.7 \ No newline at end of file diff --git a/.build/bin/python-config b/.build/bin/python-config new file mode 100755 index 00000000..4637b7ac --- /dev/null +++ b/.build/bin/python-config @@ -0,0 +1,78 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python + +import sys +import getopt +import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'help'] + +if sys.version_info >= (3, 2): + valid_opts.insert(-1, 'extension-suffix') + valid_opts.append('abiflags') +if sys.version_info >= (3, 3): + valid_opts.append('configdir') + + +def exit_with_usage(code=1): + sys.stderr.write("Usage: {0} [{1}]\n".format( + sys.argv[0], '|'.join('--'+opt for opt in valid_opts))) + sys.exit(code) + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print(sysconfig.get_config_var('prefix')) + + elif opt == '--exec-prefix': + print(sysconfig.get_config_var('exec_prefix')) + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_path('include'), + '-I' + sysconfig.get_path('platinclude')] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print(' '.join(flags)) + + elif opt in ('--libs', '--ldflags'): + abiflags = getattr(sys, 'abiflags', '') + libs = ['-lpython' + pyver + abiflags] + libs += getvar('LIBS').split() + libs += getvar('SYSLIBS').split() + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + if not getvar('PYTHONFRAMEWORK'): + libs.extend(getvar('LINKFORSHARED').split()) + print(' '.join(libs)) + + elif opt == '--extension-suffix': + ext_suffix = sysconfig.get_config_var('EXT_SUFFIX') + if ext_suffix is None: + ext_suffix = sysconfig.get_config_var('SO') + print(ext_suffix) + + elif opt == '--abiflags': + if not getattr(sys, 'abiflags', None): + exit_with_usage() + print(sys.abiflags) + + elif opt == '--configdir': + print(sysconfig.get_config_var('LIBPL')) diff --git a/.build/bin/python2 b/.build/bin/python2 new file mode 120000 index 00000000..8f7a3c1a --- /dev/null +++ b/.build/bin/python2 @@ -0,0 +1 @@ +python2.7 \ No newline at end of file diff --git a/.build/bin/python2.7 b/.build/bin/python2.7 new file mode 100755 index 0000000000000000000000000000000000000000..63ea399ee948f2ff2c27b0de2a06ada3cd52faa7 GIT binary patch literal 8872 zcmeHM&yUka6rQk9mLDxy4v11v1KO=92v3r(*l^nvLKk%xLRqR65*nPuAr_7uY$t4P zsRU91A?>MGI8q5A4oLh3T&haFwO2S4fe`;d4^6*k&m>NkazNsMG*5b-d2inP=J^{( za{T`I=gq&H8B0wt*4w}sn}Y7%#Mlj%!Hlubp$kwU%Ej+W7fL^zA@8W9M$NZcg!3~3 zg;*}FERTjn`RP#~lQwE&D2Hv7%R+?KYB-D?$LsCD&0u+}3?W}Iqvs@P51-q`Q>VW#oj9eQxy;yo!X~*dNh6$O zT?g>H$WlNi-g^?`ZnC9hG7)twi;?08hSnRfKf}1PpRqCkw_#p}l5CMmvE)zI4Rb^m zkU#SL%2mS7K(|AAJMg((C-=F3$-aROu9e%v;`80f>4jbba z0zIT`@<9&bekqTBH%Xy=sD4_DsM?Gxl%EeQKj5Yta--F?+z#)+wmmoCd1KBv7S)B? zTHUbWx#U8Tb|tF2kibiA{SCL78r}a^D${4AyhafM!55pc&8%Xa+O` zngPv#W8W{9?usSTc46Y< zfIvTfgJ?E{wQ5z{p@m+zN#XmO6f#2}BPLkyO9F+c$#Kk8Z<72E$LuGt>k}#VYwD*J zTBmOi1}^kngXURWrW5v2%&$|R6pERKs=hzjr*TQzHF8R!GIyk+PH2R`E3$|C(f1XE z4>G9#m$dV-O)!yAfArIMI#2TqI^yd&5)nt>bIGiVlJ9$HoGWtI@y|P^&+DE8asysJ z%2)HQnC)J6b64i7tM%M$r_dC+V78itTz2^~k9({~Ds9`T8To8(E}P38%Vl%U z=DsQLa@2)A5_e_|zU0-~jumhgXBt(;TfW^fL+eBDt#+0hdn{&VSkj=Pm{ay2r+PJE literal 0 HcmV?d00001 diff --git a/.build/bin/rst2html.py b/.build/bin/rst2html.py new file mode 100755 index 00000000..8e1dd35f --- /dev/null +++ b/.build/bin/rst2html.py @@ -0,0 +1,23 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML documents from standalone reStructuredText ' + 'sources. ' + default_description) + +publish_cmdline(writer_name='html', description=description) diff --git a/.build/bin/rst2html5.py b/.build/bin/rst2html5.py new file mode 100755 index 00000000..af5b3c6e --- /dev/null +++ b/.build/bin/rst2html5.py @@ -0,0 +1,35 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 +# -*- coding: utf8 -*- +# :Copyright: © 2015 Günter Milde. +# :License: Released under the terms of the `2-Clause BSD license`_, in short: +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. +# This file is offered as-is, without any warranty. +# +# .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause +# +# Revision: $Revision: 7847 $ +# Date: $Date: 2015-03-17 18:30:47 +0100 (Di, 17. Mär 2015) $ + +""" +A minimal front end to the Docutils Publisher, producing HTML 5 documents. + +The output also conforms to XHTML 1.0 transitional +(except for the doctype declaration). +""" + +try: + import locale # module missing in Jython + locale.setlocale(locale.LC_ALL, '') +except locale.Error: + pass + +from docutils.core import publish_cmdline, default_description + +description = (u'Generates HTML 5 documents from standalone ' + u'reStructuredText sources ' + + default_description) + +publish_cmdline(writer_name='html5', description=description) diff --git a/.build/bin/rst2latex.py b/.build/bin/rst2latex.py new file mode 100755 index 00000000..d5dbfba3 --- /dev/null +++ b/.build/bin/rst2latex.py @@ -0,0 +1,26 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing LaTeX. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources. ' + 'Reads from (default is stdin) and writes to ' + ' (default is stdout). See ' + ' for ' + 'the full reference.') + +publish_cmdline(writer_name='latex', description=description) diff --git a/.build/bin/rst2man.py b/.build/bin/rst2man.py new file mode 100755 index 00000000..71902768 --- /dev/null +++ b/.build/bin/rst2man.py @@ -0,0 +1,26 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# Author: +# Contact: grubert@users.sf.net +# Copyright: This module has been placed in the public domain. + +""" +man.py +====== + +This module provides a simple command line interface that uses the +man page writer to output from ReStructuredText source. +""" + +import locale +try: + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description +from docutils.writers import manpage + +description = ("Generates plain unix manual documents. " + default_description) + +publish_cmdline(writer=manpage.Writer(), description=description) diff --git a/.build/bin/rst2odt.py b/.build/bin/rst2odt.py new file mode 100755 index 00000000..a96b2d1b --- /dev/null +++ b/.build/bin/rst2odt.py @@ -0,0 +1,30 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2odt.py 5839 2009-01-07 19:09:28Z dkuhlman $ +# Author: Dave Kuhlman +# Copyright: This module has been placed in the public domain. + +""" +A front end to the Docutils Publisher, producing OpenOffice documents. +""" + +import sys +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline_to_binary, default_description +from docutils.writers.odf_odt import Writer, Reader + + +description = ('Generates OpenDocument/OpenOffice/ODF documents from ' + 'standalone reStructuredText sources. ' + default_description) + + +writer = Writer() +reader = Reader() +output = publish_cmdline_to_binary(reader=reader, writer=writer, + description=description) + diff --git a/.build/bin/rst2odt_prepstyles.py b/.build/bin/rst2odt_prepstyles.py new file mode 100755 index 00000000..387fdefd --- /dev/null +++ b/.build/bin/rst2odt_prepstyles.py @@ -0,0 +1,67 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $ +# Author: Dave Kuhlman +# Copyright: This module has been placed in the public domain. + +""" +Fix a word-processor-generated styles.odt for odtwriter use: Drop page size +specifications from styles.xml in STYLE_FILE.odt. +""" + +# +# Author: Michael Schutte + +from lxml import etree +import sys +import zipfile +from tempfile import mkstemp +import shutil +import os + +NAMESPACES = { + "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", + "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +} + +def prepstyle(filename): + + zin = zipfile.ZipFile(filename) + styles = zin.read("styles.xml") + + root = etree.fromstring(styles) + for el in root.xpath("//style:page-layout-properties", + namespaces=NAMESPACES): + for attr in el.attrib: + if attr.startswith("{%s}" % NAMESPACES["fo"]): + del el.attrib[attr] + + tempname = mkstemp() + zout = zipfile.ZipFile(os.fdopen(tempname[0], "w"), "w", + zipfile.ZIP_DEFLATED) + + for item in zin.infolist(): + if item.filename == "styles.xml": + zout.writestr(item, etree.tostring(root)) + else: + zout.writestr(item, zin.read(item.filename)) + + zout.close() + zin.close() + shutil.move(tempname[1], filename) + + +def main(): + args = sys.argv[1:] + if len(args) != 1: + print >> sys.stderr, __doc__ + print >> sys.stderr, "Usage: %s STYLE_FILE.odt\n" % sys.argv[0] + sys.exit(1) + filename = args[0] + prepstyle(filename) + +if __name__ == '__main__': + main() + + +# vim:tw=78:sw=4:sts=4:et: diff --git a/.build/bin/rst2pseudoxml.py b/.build/bin/rst2pseudoxml.py new file mode 100755 index 00000000..d23797a1 --- /dev/null +++ b/.build/bin/rst2pseudoxml.py @@ -0,0 +1,23 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing pseudo-XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates pseudo-XML from standalone reStructuredText ' + 'sources (for testing purposes). ' + default_description) + +publish_cmdline(description=description) diff --git a/.build/bin/rst2s5.py b/.build/bin/rst2s5.py new file mode 100755 index 00000000..25ee8c64 --- /dev/null +++ b/.build/bin/rst2s5.py @@ -0,0 +1,24 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: Chris Liechti +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML slides using +the S5 template system. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates S5 (X)HTML slideshow documents from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='s5', description=description) diff --git a/.build/bin/rst2xetex.py b/.build/bin/rst2xetex.py new file mode 100755 index 00000000..b881b70c --- /dev/null +++ b/.build/bin/rst2xetex.py @@ -0,0 +1,27 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ +# Author: Guenter Milde +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources for compilation with the Unicode-aware TeX variants ' + 'XeLaTeX or LuaLaTeX. ' + 'Reads from (default is stdin) and writes to ' + ' (default is stdout). See ' + ' for ' + 'the full reference.') + +publish_cmdline(writer_name='xetex', description=description) diff --git a/.build/bin/rst2xml.py b/.build/bin/rst2xml.py new file mode 100755 index 00000000..504cd16b --- /dev/null +++ b/.build/bin/rst2xml.py @@ -0,0 +1,23 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing Docutils XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates Docutils-native XML from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='xml', description=description) diff --git a/.build/bin/rstpep2html.py b/.build/bin/rstpep2html.py new file mode 100755 index 00000000..72c06d6c --- /dev/null +++ b/.build/bin/rstpep2html.py @@ -0,0 +1,25 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML from PEP +(Python Enhancement Proposal) documents. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML from reStructuredText-format PEP files. ' + + default_description) + +publish_cmdline(reader_name='pep', writer_name='pep_html', + description=description) diff --git a/.build/bin/sphinx-apidoc b/.build/bin/sphinx-apidoc new file mode 100755 index 00000000..9cc41745 --- /dev/null +++ b/.build/bin/sphinx-apidoc @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from sphinx.apidoc import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/sphinx-autogen b/.build/bin/sphinx-autogen new file mode 100755 index 00000000..904ff9b0 --- /dev/null +++ b/.build/bin/sphinx-autogen @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from sphinx.ext.autosummary.generate import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/sphinx-build b/.build/bin/sphinx-build new file mode 100755 index 00000000..4a172054 --- /dev/null +++ b/.build/bin/sphinx-build @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from sphinx import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/sphinx-quickstart b/.build/bin/sphinx-quickstart new file mode 100755 index 00000000..e088c944 --- /dev/null +++ b/.build/bin/sphinx-quickstart @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from sphinx.quickstart import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/sqlformat b/.build/bin/sqlformat new file mode 100755 index 00000000..9e93e554 --- /dev/null +++ b/.build/bin/sqlformat @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from sqlparse.__main__ import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/tox b/.build/bin/tox new file mode 100755 index 00000000..5cd46ca8 --- /dev/null +++ b/.build/bin/tox @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from tox import cmdline + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(cmdline()) diff --git a/.build/bin/tox-quickstart b/.build/bin/tox-quickstart new file mode 100755 index 00000000..5c7ca68c --- /dev/null +++ b/.build/bin/tox-quickstart @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from tox._quickstart import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/virtualenv b/.build/bin/virtualenv new file mode 100755 index 00000000..da75ba53 --- /dev/null +++ b/.build/bin/virtualenv @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from virtualenv import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/bin/wheel b/.build/bin/wheel new file mode 100755 index 00000000..3f478ba5 --- /dev/null +++ b/.build/bin/wheel @@ -0,0 +1,11 @@ +#!/Users/ant/code/altschool/dynamic-rest/.build/bin/python2.7 + +# -*- coding: utf-8 -*- +import re +import sys + +from wheel.tool import main + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/.build/include/python2.7 b/.build/include/python2.7 new file mode 120000 index 00000000..6a5b44ae --- /dev/null +++ b/.build/include/python2.7 @@ -0,0 +1 @@ +/Users/ant/.pyenv/versions/2.7.9/include/python2.7 \ No newline at end of file diff --git a/.build/pip-selfcheck.json b/.build/pip-selfcheck.json new file mode 100644 index 00000000..d6202790 --- /dev/null +++ b/.build/pip-selfcheck.json @@ -0,0 +1 @@ +{"last_check":"2017-02-12T03:12:43Z","pypi_version":"9.0.1"} \ No newline at end of file diff --git a/.gitignore b/.gitignore index df06f216..53da6e08 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ .Python env/ build/ +.build/ develop-eggs/ dist/ downloads/ diff --git a/MANIFEST.in b/MANIFEST.in index 0b9e38bd..2f9924f4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,7 @@ recursive-include dynamic_rest/templates * recursive-include dynamic_rest/static * +recursive-include dynamic_rest/blueprints * +include *.j2 include *.txt include *.md include *.ini diff --git a/Makefile b/Makefile index c2b1dcf8..91f2e807 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,5 @@ -QUOTE := [\"] -WORD := [A-Z_]+ -WHITESPACE := [ ]* -EXTRACT_REGEX := 's~^$(WHITESPACE)$(WORD)$(WHITESPACE)=$(WHITESPACE)$(QUOTE)(.*)$(QUOTE)$$~\1~' -ORG_NAME := $(shell grep ORG_NAME dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) -REPO_NAME := $(shell grep REPO_NAME dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) -APP_NAME := $(shell grep APP_NAME dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) -PROJECT_NAME := $(shell grep PROJECT_NAME dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) -AUTHOR_EMAIL := $(shell grep AUTHOR_EMAIL dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) -VERSION := $(shell grep VERSION dynamic_rest/constants.py | sed -E $(EXTRACT_REGEX)) - -INSTALL_PREFIX := /usr/local -INSTALL_DIR ?= $(INSTALL_PREFIX)/$(ORG_NAME)/$(REPO_NAME) +APP_NAME := 'dynamic_rest' +INSTALL_DIR ?= ./build PORT ?= 9002 define header @@ -55,7 +44,7 @@ $(INSTALL_DIR): $(INSTALL_DIR)/bin/activate $(INSTALL_DIR)/bin/activate: requirements.txt install_requires.txt dependency_links.txt $(call header,"Updating dependencies") @test -d $(INSTALL_DIR) || virtualenv $(INSTALL_DIR) - @$(INSTALL_DIR)/bin/pip install -q --upgrade pip + @$(INSTALL_DIR)/bin/pip install -q --upgrade pip setuptools flake8 @$(INSTALL_DIR)/bin/pip install --process-dependency-links -Ur requirements.txt @touch $(INSTALL_DIR)/bin/activate @@ -67,7 +56,7 @@ fixtures: install # Removes build files in working directory clean_working_directory: $(call header,"Cleaning working directory") - @rm -rf ./.tox ./build ./dist ./$(APP_NAME).egg-info; + @rm -rf ./.tox ./dist ./$(APP_NAME).egg-info; @find . -name '*.pyc' -type f -exec rm -rf {} \; # Full clean @@ -121,7 +110,7 @@ start: install # Lint the project lint: clean_working_directory $(call header,"Linting code") - @find . -type f -name '*.py' -not -path '$(INSTALL_DIR)/*' -not -path './docs/*' -not -path './build/*' | xargs $(INSTALL_DIR)/bin/flake8 + @find . -type f -name '*.py' -not -path '$(INSTALL_DIR)/*' -not -path './docs/*' -not -path '$(INSTALL_DIR)/*' | xargs $(INSTALL_DIR)/bin/flake8 # Auto-format the project format: clean_working_directory diff --git a/dj.yml b/dj.yml new file mode 100644 index 00000000..134a6b69 --- /dev/null +++ b/dj.yml @@ -0,0 +1 @@ +name: 'dynamic_rest' diff --git a/dynamic_rest/blueprints/init/__init__.py b/dynamic_rest/blueprints/init/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/dynamic_rest/blueprints/init/context.py b/dynamic_rest/blueprints/init/context.py new file mode 100644 index 00000000..b11f5766 --- /dev/null +++ b/dynamic_rest/blueprints/init/context.py @@ -0,0 +1,6 @@ +import click + + +@click.command() +def get_context(): + return {} diff --git a/dynamic_rest/blueprints/init/templates/{{apo}}/settings.py.j2 b/dynamic_rest/blueprints/init/templates/{{apo}}/settings.py.j2 new file mode 100644 index 00000000..b736b82e --- /dev/null +++ b/dynamic_rest/blueprints/init/templates/{{apo}}/settings.py.j2 @@ -0,0 +1,4 @@ +INSTALLED_APPS = ( + 'dynamic_rest', + 'rest_framework' +) diff --git a/dynamic_rest/constants.py b/dynamic_rest/constants.py index 91f53bdc..e69de29b 100644 --- a/dynamic_rest/constants.py +++ b/dynamic_rest/constants.py @@ -1,8 +0,0 @@ -APP_NAME = "dynamic_rest" -AUTHOR = "Anthony Leontiev" -AUTHOR_EMAIL = "ant@altschool.com, ryo@altschool.com" -DESCRIPTION = "Adds Dynamic API support to Django REST Framework." -REPO_NAME = "dynamic-rest" -PROJECT_NAME = "Dynamic REST" -ORG_NAME = "AltSchool" -VERSION = "1.6.0" diff --git a/setup.py b/setup.py index 48e8f831..2b883f56 100644 --- a/setup.py +++ b/setup.py @@ -1,27 +1,20 @@ from setuptools import find_packages, setup -from dynamic_rest.constants import ( - AUTHOR, - AUTHOR_EMAIL, - DESCRIPTION, - ORG_NAME, - REPO_NAME, - VERSION -) - -EXCLUDE_FROM_PACKAGES = [] +NAME = 'dynamic-rest' +DESCRIPTION = 'Adds Dynamic API support to Django REST Framework.' +URL = 'http://github.com/AltSchool/dynamic-rest' +VERSION = '1.6.1' +SCRIPTS = ['manage.py'] setup( - author=AUTHOR, - author_email=AUTHOR_EMAIL, description=DESCRIPTION, include_package_data=True, dependency_links=open('dependency_links.txt').readlines(), install_requires=open('install_requires.txt').readlines(), long_description=open('README.rst').read(), - name=REPO_NAME, - packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), - scripts=['manage.py'], - url='http://github.com/%s/%s' % (ORG_NAME, REPO_NAME), - version=VERSION, + name=NAME, + packages=find_packages(), + scripts=SCRIPTS, + url=URL, + version=VERSION )