How can I include files that are not written in python to the packaging? Or to make it more concrete: Assuming I have the following package structure, how do I include all the files of the templates directory?
- projectname
- __init__.py
- classfile.py
- templates
- file1.prototxt
- file2.caffemodel
I have the following setup.py
from distutils.core import setup
setup(
name = 'projectname',
packages = ['projectname'],
version = '0.1',
license='MIT',
description = 'my description',
author = 'FULL NAME',
author_email = 'example@gmail.com',
url = 'https://github.com/repo',
download_url = 'https://github.com/repo/.../v_01.tar.gz',
keywords = ['keywords'],
install_requires=[
'opencv-python',
'numpy'
],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
],
)
As I read somewhere on stackoverflow, I tried adding the following to the setup.py
file but it didn't make a difference.
package_data = {
'templates': ['*'],
}