I have this project:
.
├── django_mysetup
│ ├── __init__.py
│ ├── template-basket
│ │ └── apple
│ │ ├── app_template
│ │ │ ├── forms.py
│ │ │ ├── __init__.py
│ │ │ ├── models.py
│ │ │ ├── tests.py
│ │ │ └── views.py
│ │ └── project_template
│ │ ├── manage.py
│ │ └── project_name
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ └── templates
│ ├── example_direct.html
│ ├── example.html
│ └── stylesheets
│ ├── base.css
│ ├── layout.css
│ └── skeleton.css
├── MANIFEST.in
├── README.rst
└── setup.py
This is the setup.py
file:
from distutils.core import setup
setup(
name='Django_mysetup',
py_modules=['django_mysetup'],
entry_points={
'console_scripts': ['django_mysetup = django_mysetup:main', ],},
description='A Personalised Django startproject and startapp setup script.',
long_description=open('README.rst').read(),
packages=['django_mysetup'],
package_data={'django_mysetup': ['templates/*', 'templates/stylesheets/*',
'template-basket/apple/app_template/*',
'template-basket/apple/project_template/*',
'template-basket/apple/project_template/project_name/*',
'template-basket/apple/project_template/manage.py'
]}
)
This is the MANIFEST.in
file (the MANIFEST
generation template)
include README.rst
recursive-include template-basket *
recursive-include templates *
When I do python setup.py sdist
and pip install
the *.tar.gz
file to my virtualenv, I get this:
error: can't copy 'Django-mysetup/templates/stylesheets': doesn't exist or not a regular file
So the problem is in package_data
.
How do I adjust my setup.py
script so the template-basket
and templates
dirs with all their contents are installed in my virtual environment? (Preferably in a way where I don't need to write every single file in those dirs, just the top dir names.)