Flask
From charlesreid1
To embed a Flask app inside a module:
/yourlibrary
/yourlibrary
__init__.py
some_code.py
[...]
/webapp
__init__.py
templates/
index.html
[...]
Then you will structure your setup.py like this:
config = {
'description': 'foo',
'author': 'bar',
'version': '1.0',
'install_requires': ['flask'],
'packages': ['yourlibrary','webapp'],
'include_package_data' : True,
'scripts': [],
'name': 'yourlibarary',
'zip_safe' : False
}
setup(**config)
The include package data directive points setup.py to a manifest file called MAFIEST.in, which sits next to setup.py. That should have these lines:
recursive-include yourlibrary/templates * recursive-include yourlibrary/static *