Including static data in setup.py (setuptools)
python, setuptools
Solution
I solved the problem by processing the static files separately, not using setuptools.
from sys import argv
try:
if argv[1] == 'install':
from os.path import join
from distutils.sysconfig import get_python_lib
from shutil import copytree
OrigSkeleton = join('src', 'skeleton')
DestSkeleton = join(get_python_lib(), 'cumulus', 'skeleton')
copytree(OrigSkeleton, DestSkeleton)
except IndexError: pass
Problem
I am currently coding setup.py using setuptools. And I want to copy the static data (which is not a Python module) to site-packages. The thing is, the current folder hierarchy is structured like the following: ``` setup.py src Pure Python Module skeleton example __init__.py resources static error.css example.css logo_shadow.png template error.html example.html server.tmplt ``` I want to copy the skeleton directory to site-packages WHILE maintaining the folder structure/hierarchy, but how should I do this?