Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78355 - [dtc] Reenable python bindings

Attached to Project: Community Packages
Opened by Luca Weiss (z3ntu) - Monday, 01 May 2023, 17:24 GMT
Last edited by Toolybird (Toolybird) - Friday, 05 May 2023, 03:00 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Since dtc v1.7.0 in Arch Linux the Python bindings are not shipped with the package anymore.

Attached is a patch that switches both the build system over to meson (Makefile is deprecated for dtc upstream?). And also reenables the Python bindings. Unfortunately due to setuptools-scm usage not liking tarballs, I've taken the patch from Alpine Linux replacing it by a simple version definition filled from $pkgver.

Also one patch from upstream git is picked to resolve a test failure.

Please let me know for any questions.

Additional info:
* dtc 1.7.0-1
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 05 May 2023, 03:00 GMT
Reason for closing:  Fixed
Comment by Anatol Pomozov (anatolik) - Tuesday, 02 May 2023, 18:46 GMT
Thank you for the patch.

A few observations for the patch:

* meson produces libfdt.so.1.6.0 while previous build system produces libfdt-1.7.0.so

* Compiling against python 3.11 produces following warning:

```
[1/156] Generating version_gen.h with a custom command
[2/2] Generating pylibfdt/pylibfdt with a custom command
/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.

See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************

!!
self.initialize_options()
```
Comment by Luca Weiss (z3ntu) - Tuesday, 02 May 2023, 19:00 GMT
Right, didn't catch the first. Seems they missed updating the version number there, https://github.com/dgibson/dtc/commit/64a907f08b9bedd89833c1eee674148cff2343c6 updates it.

For the second nothing really changed for the python setup I believe, but I imagine upstream will be moving away from setuptools at some point.

Also fyi, I switched to meson here because there's some issue with the install path with the Makefile setup so instead of either picking some patch for that (I think Alpine has something?) I thought it was easier just to switch to the new build system. Hopefully next release meson will be smoother (and not need two patches, the check fix + that version bump)
Comment by Anatol Pomozov (anatolik) - Tuesday, 02 May 2023, 20:39 GMT
Thanks Luca

I just pushed to dtc-1.7.0-3 to [community-testing] (it also contains rebuild for python 3.11)

Please give it a try and let me know if you still see any issues.
Comment by Christopher Snowhill (kode54) - Wednesday, 03 May 2023, 01:05 GMT
The dtc-1.7.0-3 you just pushed to [community-testing] is built against Python 3.10.
Comment by Luca Weiss (z3ntu) - Wednesday, 03 May 2023, 17:02 GMT
True, built against Python 3.10 but at least I could test it now and it works fine with just that package from community-testing ;)

Thanks Anatol!
Comment by Anatol Pomozov (anatolik) - Thursday, 04 May 2023, 17:14 GMT
Sorry for the confusion. The current version dtc-1.7.0-3 should work with python 3.11 properly.

Loading...