When creating a source distribution using python's setuptools (python setup.py sdist), I am using a MANIFEST.in file containing the line:

recursive-include mypackage

because I want to include some non-module files inside the mypackage directory. However, there are also symbolic links under the mypackage directory whose targets I do not want included in my source distribution. Is there a way to specify "ignore symlinks" inside the MANIFEST.in ?

I know... I probably shouldn't have those symlinks there.

有帮助吗?

解决方案

Distutils does not offer any special handling of symlinks. You can look through the distutils code and see that the processing of the MANIFEST.in file is doing simple pattern matching, using os.listdir recursively, without any special handling for symlinks.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top