简体   繁体   中英

Python setup.py not copying child directories

I'm trying to install this: https://github.com/andrewebdev/django-video/

But, for some reason when I try to install it with python setup.py install it only installs files in src/videostream and none of the files in child directories src/videostream/management , src/videostream/templates , etc.

I have used setuptools and distutils a few times, but I'm clearly not an expert.

The setup.py is here 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'}
)

I've tried replacing the packages list with find_packages() from setuptools but that didn't solve the problem.

Thanks in advance.

Ended up solving this by changing the setup.py to:

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,
)

and adding MANIFEST.in with:

recursive-include src/videostream/templates *

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM