Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-11-03 Thread Jun Aruga
@pmatilai thanks for your checking!

> but I don't see this helping #130 at least in the general case.

OK, perhaps, I may need to send additional PR for that.

-- 
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/327#issuecomment-341691588___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-11-03 Thread Panu Matilainen
Merged #327.

-- 
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/327#event-1324601413___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-11-03 Thread Panu Matilainen
Because we haven't had a chance to dig into it?

I suppose it's fine for what it is, but I don't see this helping #130 at least 
in the general case.

-- 
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/327#issuecomment-341666860___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-10-25 Thread Jun Aruga
Hi maintainers of the RPM!
Why this PR has not been merged yet?


-- 
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/327#issuecomment-339370535___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-09-28 Thread Jun Aruga
OK.

By the way, we can do "import rpm" without `LD_LIBRARY_PATH` for custom prefix 
by adding `runtime_library_dirs = pkgconfig('--libs-only-L')` to each 
`Extension` class
Do you want to add this in this PR?

I thought an another PR was better after merging this PR, because we may need 
more discussion for that.

-- 
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/327#issuecomment-332791606___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-09-26 Thread Igor Gnatenko
@junaruga, I'm not maintainer of RPM.. =)

-- 
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/327#issuecomment-332160997___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-09-26 Thread Jun Aruga
Why don't you merge?


-- 
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/327#issuecomment-332135262___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-09-23 Thread Igor Gnatenko
ignatenkobrain approved this pull request.

sounds about right



-- 
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/327#pullrequestreview-64736875___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix Python bindings library path for custom prefix. (#327)

2017-09-22 Thread Jun Aruga
This fixes the Python bindings ModuleNotFoundError for custom prefix.
http://lists.rpm.org/pipermail/rpm-maint/2017-September/006568.html

The reason is the Extension class libraries attribute does not accept library 
file or directory path.

According to
https://docs.python.org/3/distutils/apiref.html
https://docs.python.org/2/distutils/apiref.html
> libraries list of library names (not filenames or paths) to link against


We may close below ticket by this PR.
https://github.com/rpm-software-management/rpm/issues/130


Below is the work flow to check the bug is fixed.

```
$ 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
PackageVersion
-- ---
pip9.0.1  
setuptools 28.8.0 
wheel  0.30.0 

$ python3 setup.py build

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

$ python3 -m pip list
PackageVersion
-- ---
pip9.0.1  
rpm4.14.90
setuptools 28.8.0 
wheel  0.30.0 
```

The there was a trap I faced for below command.

`cd ..` is needed to change directory from `rpm/python`.

We should not run below `python3 -c 'import rpm'` in the `rpm/python` directory.

Because the command wrongly check `rpm/python/rpm/__init__.py` to do `import 
rpm`, it is not installed rpm python bindings' directory.

Thanks @pmatilai . I found it by `strace` command that you recommended me.

Then

```
$ cd ..

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

Correctly the library is loaded.


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

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

-- Commit Summary --

  * Fix Python bindings library path for custom prefix.

-- File Changes --

M python/setup.py.in (9)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/327.patch
https://github.com/rpm-software-management/rpm/pull/327.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/327
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint