Skip to content

Copy DLL to Python site packages #187

@technikamateur

Description

@technikamateur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions