Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

include data_files recursively

  • Loading branch information...
commit 86ba1a234b4e7fb9817bae17da440dac5dda5caa 1 parent fb37f8a
Martin Zimmermann authored

Showing 2 changed files with 9 additions and 5 deletions. Show diff stats Hide diff stats

  1. +1 1  regenwolken/__init__.py
  2. +8 4 setup.py
2  regenwolken/__init__.py
@@ -127,4 +127,4 @@ def main():
127 127 if '--debug' in sys.argv:
128 128 app.debug = True
129 129
130   - app.run(host=app.config.get('BIND_ADDRESS', '0.0.0.0'), port=app.config.get('PORT', 1234))
  130 + app.run(host=app.config['BIND_ADDRESS'], port=app.config['PORT'])
12 setup.py
@@ -2,9 +2,10 @@
2 2 # -*- encoding: utf-8 -*-
3 3
4 4 import sys
  5 +
  6 +import os
5 7 import re
6 8
7   -from glob import glob
8 9 from os.path import join, dirname
9 10 from setuptools import setup, find_packages
10 11
@@ -18,6 +19,11 @@ def install_data_files_hack():
18 19 scheme['data'] = scheme['purelib']
19 20
20 21
  22 +def find(path):
  23 + for root, dirs, files in os.walk(path):
  24 + yield [root, [join(root, p) for p in files]]
  25 +
  26 +
21 27 install_data_files_hack()
22 28 version = re.search("__version__ = '([^']+)'",
23 29 open('regenwolken/__init__.py').read()).group(1)
@@ -36,9 +42,7 @@ def install_data_files_hack():
36 42 data_files=[
37 43 'README.md',
38 44 'LICENSE.txt',
39   - ['regenwolken/templates', glob('regenwolken/templates/*')],
40   - ['regenwolken/static', glob('regenwolken/static/*')],
41   - ],
  45 + ] + list(find('regenwolken/static/')) + list(find('regenwolken/templates/')),
42 46 long_description=open(join(dirname(__file__), 'README.md')).read(),
43 47 classifiers=[
44 48 "Development Status :: 4 - Beta",

0 comments on commit 86ba1a2

Please sign in to comment.
Something went wrong with that request. Please try again.