Skip to content

Commit

Permalink
include data_files recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
posativ committed Aug 27, 2012
1 parent fb37f8a commit 86ba1a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion regenwolken/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ def main():
if '--debug' in sys.argv: if '--debug' in sys.argv:
app.debug = True app.debug = True


app.run(host=app.config.get('BIND_ADDRESS', '0.0.0.0'), port=app.config.get('PORT', 1234)) app.run(host=app.config['BIND_ADDRESS'], port=app.config['PORT'])
12 changes: 8 additions & 4 deletions setup.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-


import sys import sys

import os
import re import re


from glob import glob
from os.path import join, dirname from os.path import join, dirname
from setuptools import setup, find_packages from setuptools import setup, find_packages


Expand All @@ -18,6 +19,11 @@ def install_data_files_hack():
scheme['data'] = scheme['purelib'] scheme['data'] = scheme['purelib']




def find(path):
for root, dirs, files in os.walk(path):
yield [root, [join(root, p) for p in files]]


install_data_files_hack() install_data_files_hack()
version = re.search("__version__ = '([^']+)'", version = re.search("__version__ = '([^']+)'",
open('regenwolken/__init__.py').read()).group(1) open('regenwolken/__init__.py').read()).group(1)
Expand All @@ -36,9 +42,7 @@ def install_data_files_hack():
data_files=[ data_files=[
'README.md', 'README.md',
'LICENSE.txt', 'LICENSE.txt',
['regenwolken/templates', glob('regenwolken/templates/*')], ] + list(find('regenwolken/static/')) + list(find('regenwolken/templates/')),
['regenwolken/static', glob('regenwolken/static/*')],
],
long_description=open(join(dirname(__file__), 'README.md')).read(), long_description=open(join(dirname(__file__), 'README.md')).read(),
classifiers=[ classifiers=[
"Development Status :: 4 - Beta", "Development Status :: 4 - Beta",
Expand Down

0 comments on commit 86ba1a2

Please sign in to comment.