packaging - Cannot include non-python files with setup.py -
packaging - Cannot include non-python files with setup.py -
i read lot of answers on question, no solution works me.
project layout:
generators_data\ en_family_names.txt en_female_names.txt __init__.py generators.py setup.py
i want include "generators_data" it's content installation. setup.py:
from distutils.core import setup setup(name='generators', version='1.0', package_data={'generators': ['generators_data/*']} )
i tried
python setup.py install
got
running install running build running install_egg_info removing c:\python27\lib\site-packages\generators-1.0-py2.7.egg-info writing c:\python27\lib\site-packages\generators-1.0-py2.7.egg-info
but generators_data directory doesn't appear in "c:\python27\lib\site-packages\". why?
the code posted contains 2 issues: setup.py should sibling bundle want distribute, not within it, , need list packages in setup.py.
try this layout:
generators/ # project root, directory git clone or equivalent setup.py generators/ # python bundle __init__.py # other modules generators_data/ names.txt
and setup.py:
setup(name='generators', version='1.0', packages=['generators'], package_data={'generators': ['generators_data/*']}, )
python packaging setuptools distutils setup.py
Comments
Post a Comment