Permalink
Browse files

static redux

  • Loading branch information...
lukearno committed Jan 20, 2014
0 parents commit 1c0fd66d6a2cda1e583a885219cb84136a075866
@@ -0,0 +1,14 @@
*.pyc
*~
*/*.pyc
*/*/*.pyc
.virts
.coverage
build
dist
*.tar.gz
*.log
coverage.xml
*.egg-info
.#*
coverage-html
@@ -0,0 +1 @@
include */VERSION
@@ -0,0 +1,24 @@
pyversion=2.7
export
clean:
rm coverage.xml -f
rm .coverage -f
rm full-test-coverage-html -rf
rm .virts -rf
develop:
mkdir -p .virts/
virtualenv .virts/dev
. .virts/dev/bin/activate && pip install -i 'http://pypi.python.org/simple' -r dev-requirements.txt > /dev/null
. .virts/dev/bin/activate && pip install -e '.' > /dev/null
test-python:
virtualenv .virts/$(pyversion) --python=python$(pyversion)
. .virts/$(pyversion)/bin/activate && pip install -i 'http://pypi.python.org/simple' -r dev-requirements.txt > /dev/null
. .virts/$(pyversion)/bin/activate && pip install -e '.' > /dev/null
. .virts/$(pyversion)/bin/activate && nosetests tests/
stylecheck:
. .virts/dev/bin/activate && flake8 static tests --max-complexity=12
test:
. .virts/dev/bin/activate && nosetests -xs --with-coverage --cover-package static --cover-html --cover-html-dir coverage-html tests/
viewcoverage:
. .virts/dev/bin/activate && static localhost 6897 coverage-html
fulltest: clean develop test stylecheck
@@ -0,0 +1,3 @@
# static - A very simple WSGI way to serve static and dynamic content.

See docstrings of static module for details.
@@ -0,0 +1,4 @@
nose
nose-cov
wsgi-intercept
flake8
@@ -0,0 +1,2 @@
[console_scripts]
static = static.cli:run
@@ -0,0 +1 @@
pystache
@@ -0,0 +1,45 @@

import os

from setuptools import setup, find_packages


with open('README.md') as readme_file:
README = readme_file.read().strip()

PROJECT = README.strip('#').split('\n')[0].strip().split()[0].lower()
DESCRIPTION = README.split('\n')[2]

with open('%s/VERSION' % PROJECT) as version_file:
VERSION = version_file.read().strip()

with open('requirements.txt') as reqs_file:
REQS = reqs_file.read()

with open('entrypoints.conf') as ep_file:
ENTRYPOINTS = ep_file.read()


setup(name=PROJECT,
version=VERSION,
description=DESCRIPTION,
long_description=README,
author='Luke Arno',
author_email='luke.arno@gmail.com',
url='http://github.com/lukearno/%s' % PROJECT,
license='MIT',
packages=find_packages(exclude=['tests']),
include_package_data=True,
install_requires=REQS,
entry_points=ENTRYPOINTS,
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Topic :: Software Development :: Libraries',
'Topic :: Utilities'])
@@ -0,0 +1 @@
1.0.0
@@ -0,0 +1,28 @@
import pkg_resources

version_file = pkg_resources.resource_filename(__name__, 'VERSION')
with open(version_file) as vf:
__version__ = vf.read()
del version_file


from static.apps import (
BaseMagic,
cling_wrap,
Cling,
MagicError,
MoustacheMagic,
Shock,
StatusApp,
StringMagic)


__all__ = ['__version__',
'BaseMagic',
'cling_wrap',
'Cling',
'MagicError',
'MoustacheMagic',
'Shock',
'StatusApp',
'StringMagic']
Oops, something went wrong.

0 comments on commit 1c0fd66

Please sign in to comment.