pybind / pybind/pybind11

how to save shared lib when setup

Open
#1,939 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

My project reply on a SO file which I will make it by cmake installing under my project folder.And it works files when I run python setup.py install

But I install it by pip, because pip will copy the project into a tmpfile,It will be removed after installed and the SO file also be removed. Hence, when I import my project, it fails for not finding the SO file.

Of course, I can install the SO file to /usr/local/lib, but I don't want to

Anyone has idea to solve it?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the setup.py installation path with the CMake installation step, focusing on why pip's temporary build directory affects the shared object. Reproduce the install through pip, then verify whether importing the project can find the shared library without installing it under /usr/local/lib.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.