Copy DLL to Python site packages
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 670
- Forks
- 219
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 1
Description
Hi everybody,
I created a project based on this example. What my project basicaly does, is fetching data from an API. The API consists of a .lib, .h and .DLL file. I included the .h file in my CPP code and added the .lib via target_link_libraries in CMakeLists.txt.
After running pip install . the .pyd file gets copied to site packages, but after an import in python it fails because of the missing .DLL
I solved the problem by copying the DLL next to the pyd under site packages, but would like to automate this process. What would be the best way, to accomplish this?
I already tried adding package_data to setup.py without success.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with setup.py and CMakeLists.txt, then reproduce the pip install . and Python import flow to inspect which files are installed alongside the .pyd. The work is complete when the required DLL is installed with the extension so importing the module succeeds without manual copying.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100