Excluding a top-level directory from a setuptools package

后端 未结 7 2003
闹比i
闹比i 2020-12-25 11:02

I\'m trying to put a Python project into a tarball using setuptools. The problem is that setuptools doesn\'t appear to like the way that the source tree was originally setu

7条回答
  •  情话喂你
    2020-12-25 11:43

    An additional solution that worked in my case. Apparently: packages=setuptools.find_packages(exclude=["tests.*", "tests"]),

    didn't work, but:

    packages=setuptools.find_packages(exclude=["*tests.*", "*tests"]),
    

    adding the star character at the beginning of the word did the trick.

提交回复
热议问题