You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dereference directory symlink in src/main/python/ #768
Adding symlinks to files under src/main/python dereferences the files.
How to add a directory symlink in src/main/python and deference it so that the directory it points to gets included? It seems by default directory symlinks under src/main/python are simply ignored.
Further digging revealed that symlinked directories are dereferenced properly, and copied to target/dist/$name/.
However, setup.py -v clean --all bdist_wheel does not include the copied files in the tarball, because they are not included in packages or py_modules.
This appears to be a bug in pybuilder: it seems to dereference directory symlinks when copying the files, but not when generating packages/py_modules.
Relevant source code is probably pybuilder.plugins.python.core_plugin.{list_packages,list_modules}:
Activity
hoxu commentedon Feb 11, 2021
Further digging revealed that symlinked directories are dereferenced properly, and copied to
target/dist/$name/.However,
setup.py -v clean --all bdist_wheeldoes not include the copied files in the tarball, because they are not included inpackagesorpy_modules.This appears to be a bug in pybuilder: it seems to dereference directory symlinks when copying the files, but not when generating
packages/py_modules.Relevant source code is probably
pybuilder.plugins.python.core_plugin.{list_packages,list_modules}:pybuilder/src/main/python/pybuilder/plugins/python/core_plugin.py
Lines 106 to 124 in 6ac1ef4
os.walkdefaults tofollowlinks=False.Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts
Rework list_modules, list_packages and list_scripts