I'm unable to add dll
files using package_data
in setup.py
file. Here's a look at directory structure:
my_project
├── key
│ ├── 1_0
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ ├── 1_1
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ ├── 1_2
│ │ ├── sub_dir
│ │ │ ├── _required.dll
│ │ │ └── __init__.py
│ │ ├── get_key.py
│ │ └── __init__.py
│ └── __init__.py
├── my_program.py
└── __init__.py
I've been trying without success to add the required.dll
files with the installation of this module. I know I have to add it in the setup.py
file. What I've tried so far (I'll skip all unnecessary parameters) :
First:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'': ['my_project\\key\\1_0\\sub_dir\\_required.dll',
'my_project\\key\\1_1\\sub_dir\\_required.dll',
'my_project\\key\\1_2\\sub_dir\\_required.dll']},
...)
Second:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'key': ['1_0\\sub_dir\\_required.dll',
'1_1\\sub_dir\\_required.dll',
'1_2\\sub_dir\\_required.dll']},
...)
Third:
setuptools.setup(name='my_project',
packages=setuptools.find_packages(),
include_package_data=True,
package_data={'my_project\\key\\1_0\\sub_dir': ['_required.dll'],
'my_project\\key\\1_1\\sub_dir': ['_required.dll'],
'my_project\\key\\1_2\\sub_dir': ['_required.dll']}
...)
Whenever I call python setup.py sdist --format=zip
, dll
files are never included. BTW, I'd rather not change directory structure, unless there is no other option.
What am I missing here?
Regards.
François