Skip to content

Commit

Permalink
static redux
Browse files Browse the repository at this point in the history
  • Loading branch information
lukearno committed Jan 20, 2014
0 parents commit 1c0fd66
Show file tree
Hide file tree
Showing 23 changed files with 707 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.pyc
*~
*/*.pyc
*/*/*.pyc
.virts
.coverage
build
dist
*.tar.gz
*.log
coverage.xml
*.egg-info
.#*
coverage-html
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include */VERSION
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# static - A very simple WSGI way to serve static and dynamic content.

See docstrings of static module for details.
4 changes: 4 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nose
nose-cov
wsgi-intercept
flake8
2 changes: 2 additions & 0 deletions entrypoints.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[console_scripts]
static = static.cli:run
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pystache
45 changes: 45 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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'])
1 change: 1 addition & 0 deletions static/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
28 changes: 28 additions & 0 deletions static/__init__.py
Original file line number Diff line number Diff line change
@@ -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']
Loading

0 comments on commit 1c0fd66

Please sign in to comment.