Python setup.py不复制子目录

时间:2013-11-05 15:58:27

标签: python django setuptools distribute

我正在尝试安装此: https://github.com/andrewebdev/django-video/

但是,出于某种原因,当我尝试使用python setup.py install安装它时,它只安装src/videostream中的文件,而不安装子目录src/videostream/managementsrc/videostream/templates中的任何文件,等

我已经使用过setuptools和distutils几次,但我显然不是专家。

setup.py在这里https://github.com/andrewebdev/django-video/blob/master/setup.py

from distutils.core import setup

setup(
    name="videostream",
    version="0.2",
    url="http://github.com/andrewebdev/django-video",
    description="A simple video streaming application for django",
    author="Andre Engelbrech",
    author_email="andre@teh-node.co.za",
    packages=['videostream'],
    package_dir={'': 'src'}
)

我尝试用setuptools中的find_packages()替换包列表,但这并没有解决问题。

提前致谢。

1 个答案:

答案 0 :(得分:0)

通过将setup.py更改为:

结束解决此问题
from setuptools import setup, find_packages

setup(
    name="videostream",
    version="0.2",
    url="http://github.com/andrewebdev/django-video",
    description="A simple video streaming application for django",
    author="Andre Engelbrech",
    author_email="andre@teh-node.co.za",
    package_dir={'': 'src'},
    packages=find_packages('src'),
    include_package_data=True,
)

并添加MANIFEST.in:

recursive-include src/videostream/templates *