Include Templates and Bump Version to 0.1.1

I forgot to include the templates in setup.py, so httpbin would complain
and return a 500 when accessing views that require templates.  This
fixes that problem by adding them as "data" in setup.py and MANIFEST.in
This commit is contained in:
Kevin McCarthy
2014-06-01 11:55:44 -10:00
parent 9074c32030
commit a109bbbe29
4 changed files with 22 additions and 2 deletions
+2
View File
@@ -1,4 +1,6 @@
env/
build/
dist/
.workon
.epio-app
*.pyc
+14
View File
@@ -114,6 +114,20 @@ All endpoint responses are JSON-encoded.
"url": "http://httpbin.org/get?show_env=1"
}
## Installing and running from PyPI
You can install httpbin as a library from PyPI and run it as a WSGI app. For example, using Gunicorn:
```bash
$ pip install httpbin
$ gunicorn httpbin:app
```
## Changelog
* 0.1.1: Added templates as data in setup.py
* 0.1.0: Added python3 support and (re)publish on PyPI
## AUTHOR
A [Kenneth Reitz](http://kennethreitz.com/pages/open-projects.html)
+4 -1
View File
@@ -40,7 +40,10 @@ ENV_COOKIES = (
# Prevent WSGI from correcting the casing of the Location header
BaseResponse.autocorrect_location_header = False
app = Flask(__name__)
# Find the correct template folder when running from a different location
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
app = Flask(__name__, template_folder=tmpl_dir)
# -----------
+2 -1
View File
@@ -5,7 +5,7 @@ import re
setup(
name="httpbin",
version="0.1.0",
version="0.1.1",
description="HTTP Request and Response Service",
# The project URL.
@@ -28,5 +28,6 @@ setup(
'Programming Language :: Python :: 3.4',
],
packages=find_packages(),
include_package_data = True, # include files listed in MANIFEST.in
install_requires=['Flask','MarkupSafe','decorator','itsdangerous','six'],
)