foobarbecue
foobarbecue

Reputation: 7060

Can I ignore symlinks in setuptools MANIFEST.in?

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.

Upvotes: 11

Views: 1322

Answers (1)

MattL
MattL

Reputation: 1362

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.

Upvotes: 3

Related Questions