[Rpm-maint] [rpm-software-management/rpm] Add runtime_library_dirs for custom prefix. (#348)

Jun Aruga notifications at github.com
Fri Nov 3 12:45:21 UTC 2017


Previously we needed to set `LD_LIBRARY_PATH` to run the Python bindings for custom prefix.

```
$ LD_LIBRARY_PATH=$HOME/git/rpm/dest/lib python3 -c 'import rpm; print(rpm.__version__)'
4.14.90
```

This PR to do "import rpm" without LD_LIBRARY_PATH.
Below is the way to reproduce and test it.

This PR is related to https://github.com/rpm-software-management/rpm/pull/327 and https://github.com/rpm-software-management/rpm/issues/130 .

```
$ pwd
/home/jaruga/git/rpm

$ ./autogen.sh --noconfigure
$ ./configure --prefix="$(pwd)/dest"
$ make 
$ make install

$ dest/bin/rpm --version
RPM version 4.14.90

$ cd python/

$ which python3
/usr/local/python-3.6.2/bin/python3

$ python3 -m pip list | grep rpm

$ python3 setup.py build

$ sudo /usr/local/python-3.6.2/bin/python3 setup.py install

$ python3 -m pip list | grep rpm
rpm               4.14.90

$ cd ..

$ python3 -c 'import rpm; print(rpm.__version__)'
4.14.90
```

Ref.
https://docs.python.org/3/distutils/apiref.html
https://docs.python.org/2/distutils/apiref.html
> runtime_library_dirs | list of directories to search for C/C++ libraries at run time (for shared extensions, this is when the extension is loaded)




You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/348

-- Commit Summary --

  * Add runtime_library_dirs for custom prefix.

-- File Changes --

    M python/setup.py.in (3)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/348.patch
https://github.com/rpm-software-management/rpm/pull/348.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/348
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171103/05cb25e7/attachment.html>


More information about the Rpm-maint mailing list