setuptools - Python "setup.py develop" why is my data package not available? -


i have problem can't access data package after setup.py develop. here setup:

setup.py

from setuptools import setup, find_packages posixpath import join, relpath, normpath import os  setup(     name         = 'poc_datapath',     version      = '1.0',     package_dir  = { '' : 'target/python', 'resources' : 'target/res'},     packages     = find_packages(where='target/python') + ['resources'],     package_data = { 'resources' : [normpath(join(relpath(root.replace('\\','/'), 'target/res'),fn))                                               root, _, fnames in os.walk('target/res') fn in fnames                                              if not fn.endswith(".py")] }, ) 

which generates sources.txt me, that:

setup.py target/res/__init__.py target/res/resources1/resource.data target/res/resources2/resource.data target/python/poc_datapath.egg-info/sources.txt target/python/package1/__init__.py target/python/package1/code.py target/python/package2/__init__.py target/python/package2/code.py 

accessing package1 , package2 works expected, not able import resources package. why that? worked earlier similar configuration , single data file, , no subfolders

[edit]

maybe did not make clear: doing import resources fails, although there __init__.py in folder.

setup.py develop doesn't support package_dir, see https://bitbucket.org/pypa/setuptools/issue/230

it won't work if folder has different name package (it if do).


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -