FS#68850 - [pybind11] use PYBIND11_GLOBAL_SDIST.

Attached to Project: Community Packages
Opened by bartus (bartus) - Friday, 04 December 2020, 14:29 GMT
Last edited by Daniel Bermond (Bermond) - Friday, 25 December 2020, 00:15 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Santiago Torres (sangy)
Daniel Bermond (Bermond)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Instead of using `ls -s` to expose `/usr/lib/python3.9/pybind11/{cmake,include}` folders, there's a control variable PYBIND11_GLOBAL_SDIST in `setup.py` which makes `install` command produces directory tree structure conforming default Linux scheme (/usr/{include,share/cmake,lib/python3.9/site-package})

Additional info:
* package version: 2.6.0-3
* setup.py PYBIND11_GLOBAL_SDIST: https://github.com/pybind/pybind11/blob/master/setup.py#L22-L25
* patch included.

This task depends upon

Closed by  Daniel Bermond (Bermond)
Friday, 25 December 2020, 00:15 GMT
Reason for closing:  Not a bug
Additional comments about closing:  requested by the OP
Comment by Daniel Bermond (Bermond) - Monday, 07 December 2020, 02:45 GMT
Can you please clarify what is the bug or the problem that needs a fix? Please provide a way to reproduce it.

Are you aware that when using PYBIND11_GLOBAL_SDIST the python files becomes missing?
Comment by bartus (bartus) - Monday, 07 December 2020, 10:11 GMT
I've dived deeper in pybind11 documentation and find an author explanation on why the split into [wheel/sdist](https://github.com/pybind/pybind11/pull/2588) was introduced and [how to use properly build the pybind11](https://github.com/pybind/pybind11/blob/e37921d7617f7bf87ee2fa9591c9cec91ae216b4/.github/CONTRIBUTING.md#explanation-of-the-sdistwheel-building-design).

Comment by Daniel Bermond (Bermond) - Monday, 07 December 2020, 21:26 GMT
I'm aware of the differences of the available installation procedures (with and without PYBIND11_GLOBAL_SDIST). And I've already talked to the responsible upstream developer about this for further clarification.

As I already said, when using PYBIND11_GLOBAL_SDIST the python files becomes missing. As a consequence, the users will lose the functionality of doing an 'import pybind11' in python. Our Arch package installs the python files, so does Debian, and so does Fedora. I think we can maintain these python files on our Arch package, as they don't hurt and makes the package to be more complete.

As far I understand, python software expects their target files to be installed inside the python's site-packages directory, even if they are C++ headers, cmake files or any other file. If you take a look at other repository packages that have python software, you'll see that many of them install all sort of files inside python's site-packages directory, like .h/.xml/.html/.js/.png/.gif/.so/whatever files. As some examples I can cite scons, deluge, python-numpy, python-matplotlib, python-twisted and python-wxpython. You can also see that Debian and Fedora install the C++ headers and cmake files inside python's site-package directory in their corresponding pybind11 package. So, I see no need to be concerned about the C++ headers and cmake files being installed inside the python's site-packages directory, because this is expected and is also by upstream design.

That being said, I still cannot see what is the bug or the problem that needs a fix. (and you did not answered my question)
Comment by bartus (bartus) - Tuesday, 08 December 2020, 14:27 GMT
Ok, I see where I was wrong. Packaging with PYBIND11_GLOBAL_SDIST works but only for `cmake` packages (like aur/mitsuba2-git), but if package leverages `PEP518` build system (extra/python-build) it requires the `pybind11` python module that is discarded in sdist version of `pybind11`.

Thanks for explanation and sorry for my incomprehension of the subject :)

btw. I've also take a looksies at how other distros is packaging `pybind11` and found this script from `alpine-linux`: https://git.alpinelinux.org/aports/tree/community/py3-pybind11/APKBUILD
Can't tell if it follows jwenzel intention as it weirdly splits files into base/dev packages.
Comment by Daniel Bermond (Bermond) - Tuesday, 08 December 2020, 15:09 GMT
No problem. You're welcome.
Comment by Daniel Bermond (Bermond) - Friday, 25 December 2020, 00:14 GMT
Closing as requested by the OP.

Loading...