Excluding a top-level directory from a setuptools package

后端 未结 7 1981
闹比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:42

    Ug, setuptools makes this really tricky :(

    I don't know if this is what you want, but one project I work on uses a combination of two things:

    from setuptools import setup, find_packages
    ...
    packages = find_packages(exclude=['tests']),
    data_files = os.walk(path_to_files),
    

提交回复
热议问题