From 9895e8efbf7ae52252ad1ff6dc4b4415fb5909dc Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sat, 19 Oct 2013 09:53:37 -0400 Subject: [PATCH] Initial commit --- .gitignore | 1 + Makefile | 40 +++++++++++++++++++++++++++++++++++++++ mercy/MercyApplication.py | 4 ++++ mercy/__init__.py | 0 mercy/version.py | 1 + scripts/mercy_app.py | 7 +++++++ setup.py | 31 ++++++++++++++++++++++++++++++ version.sh | 15 +++++++++++++++ 8 files changed, 99 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 mercy/MercyApplication.py create mode 100644 mercy/__init__.py create mode 100644 mercy/version.py create mode 100644 scripts/mercy_app.py create mode 100644 setup.py create mode 100644 version.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66072c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +virtualenv diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c797d53 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +MAJOR:=$(shell bash -c 'source version.sh ; echo $$MAJOR') +BUILD:=$(shell bash -c 'source version.sh ; echo $$BUILD') +OS_NAME:=$(shell bash -c 'source version.sh ; echo $$OS_NAME') +ifeq "$(OS_NAME)" "win" + PIP=$(shell pwd)/virtualenv/Scripts/pip + SDIST_EXT=zip + VIRTUALENV_PKGS_DIR=$(shell pwd)/virtualenv/Lib/site-packages +else + PIP=$(shell pwd)/virtualenv/bin/pip + SDIST_EXT=tar.gz + VIRTUALENV_PKGS_DIR=$(shell pwd)/virtualenv/lib/site-packages +endif +VIRTUALENV=$(shell which virtualenv) +PYTHON=$(shell which python) + +PYTHON_FILES=setup.py mercy/version.py $(shell find mercy -iname "*py") +PYTHON_SDIST=./dist/mercy-$(MAJOR)-$(BUILD).$(SDIST_EXT) + +.PHONY: virtualenv +virtualenv: + $(VIRTUALENV) --no-site-packages --distribute virtualenv + +.PHONY: clean +clean: + rm -fr dist/* + find mercy -iname "*pyc" -exec rm -vf \{\} \; + +sdist: $(PYTHON_SDIST) + +mercy/version.py: version.sh + source version.sh && echo "VERSION=\"$${MAJOR}-$${BUILD}\"" > $@ + +$(PYTHON_SDIST): $(PYTHON_FILES) + $(PYTHON) setup.py sdist + +uninstall: + rm -fr $(VIRTUALENV_PKGS_DIR)/mercy-* || echo 'not installed' + +install: $(PYTHON_SDIST) + $(PIP) install $(PYTHON_SDIST) --upgrade diff --git a/mercy/MercyApplication.py b/mercy/MercyApplication.py new file mode 100644 index 0000000..9de73dd --- /dev/null +++ b/mercy/MercyApplication.py @@ -0,0 +1,4 @@ +import flask + +class MercyApplication(flask.Flask): + pass diff --git a/mercy/__init__.py b/mercy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mercy/version.py b/mercy/version.py new file mode 100644 index 0000000..33c1bc1 --- /dev/null +++ b/mercy/version.py @@ -0,0 +1 @@ +VERSION="0.0-0" diff --git a/scripts/mercy_app.py b/scripts/mercy_app.py new file mode 100644 index 0000000..e193502 --- /dev/null +++ b/scripts/mercy_app.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +from mercy.MercyApplication import MercyApplication + +if __name__ == "__main__": + app = MercyApplication("mercy") + app.run() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c13a6fe --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +from distutils.core import setup +import mercy.version +import os +import sys + +if __name__ == "__main__": + setup( + name="mercy", + url="https://www.github.com/akesterson/mercy", + version=mercy.version.VERSION, + description="A flask application that facilitates paying for prescriptions", + long_description="", + author=("Andrew Kesterson"), + author_email="andrew@aklabs.net", + license="MIT", + install_requires=["flask", "sqlalchemy"], + scripts=[], + packages=["mercy"], + data_files=[], + classifiers=[ + 'Development Status :: 1 - Planning', + 'Environment :: Web Environment', + 'Framework :: Flask', + 'Intended Audience :: Healthcare Industry', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 2.7', + 'Topic :: Other/Nonlisted Topic', + ], + ) + diff --git a/version.sh b/version.sh new file mode 100644 index 0000000..4999b6e --- /dev/null +++ b/version.sh @@ -0,0 +1,15 @@ +TAG="build,0.0,0" +BRANCH="master" +MAJOR="0.0" +BUILD="0" +SHA1="9b83e26ec3d0e3d1526a4226a8ac0c8580a77bcf" +OS_NAME="${OS_NAME:-win}" +OS_VERSION="${OS_VERSION:-}" +ARCH="${ARCH:-i686}" +VERSION="0.0-0" +BUILDHOST="akesterson-pc" +BUILDUSER="akesterson-pc\akesterson" +BUILDDIR="/c/Users/akesterson/source/upstream/git/akesterson/mercy" +SOURCE="git@github.com:akesterson/mercy.git" +REBUILDING=0 +CHANGELOG=""