Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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="[email protected]",
    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.

like image 705
Ted Avatar asked Mar 21 '26 01:03

Ted


1 Answers

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="[email protected]",
    package_dir={'': 'src'},
    packages=find_packages('src'),
    include_package_data=True,
)

and adding MANIFEST.in with:

recursive-include src/videostream/templates *
like image 82
Ted Avatar answered Mar 23 '26 14:03

Ted