https://bugzilla.redhat.com/show_bug.cgi?id=1871171 --- Comment #3 from Joel Savitz <joelsavitz@xxxxxxxxx> --- (In reply to Fabian Affolter from comment #1) (In reply to Robert-André Mauchin 🐧 from comment #2) > - The package should be named "python-rpi-gpio2" not "python-RPi-GPIO2" Package renamed. > - There is a mismatch between the releases (upstream is 0.3.0a3, package is > 0.3.0 but 0.3.0a3 is used). > > - > > Version: 0.3.0 > Release: 1%{?dist} > > → > > Version: 0.3.0 > Release: 1.a3%{?dist} I added the alpha version number to the Release > - The source tarball contains tests. Run them in %check. > > - As far as I understand, it needs to run on RPi to do the tests. Yes, the tests only run on the actual Raspberry Pi device since they rely on the data structures provided by libgpiod to represent the actual pins. I was considering instrumenting the library to use a fake gpiod module that simulates the pin state in software, but I don't much of a purpose to that other than getting the tests to run on hardware where the library has no use case. I opened an issue for it on the GitHub repo a while ago to track this behavior: https://github.com/underground-software/RPi.GPIO2/issues/16 > - %check is for running tests and not maintenance. > > - Do this at the end of install: > > rm -rf %{buildroot}%{python3_sitelib}/examples > rm -rf %{buildroot}%{python3_sitelib}/tests Got it. Moved the maintenance steps to the end of install. > - This is not needed for a noarch package: > > # This package is pure python code so debuginfo is useless > %global debug_package %{nil} > > Just move: > > BuildArch: noarch > > to the main package. Done. > - Ship the examples as part of %doc or as a subpackage. The same applies for > the documentation. I included the examples as a -doc subpackage, but I have updated the other documentation files since the v0.3.0a3 release. I plan to make another upstream release soon, so I could add those files as an update to this package, or I could do the upstream release first. The documentation is also available at http://rpi.gpio2.underground.software/ > Source0: > https://github.com/underground-software/RPi.GPIO2/archive/v0.3.0a3.tar.gz > > → > > Source0: > https://github.com/underground-software/RPi.GPIO2/archive/v%{version}a3/ > %{name}-%{version}a3.tar.gz > Changed it to the following to reflect the current repo structure, but I could modify the release if that is necessary: Source0: https://github.com/underground-software/%{pypi_name}/archive/v%{version} a3.tar.gz > - Don't mix tabs and spaces I'm not sure where I made this mistake. Did you spot this in the spec? The source files were linted with flake8 but I certainly may have missed something. > - Won't there be an import clash? One is in sitelib, the other in sitearch, > but if I import the package, which one will be loaded? Shouln't you change > the name of derectories to GPIO2? > - %{python3_sitelib}/RPi/ should be renamed. Looks like that there could be > a naming clash if python-rpi-gpio is installed as well. Yes, there is a naming clash and this is intentional. python-rpi-gpio is completely broken and does not work on the latest releases of Fedora as it relies on non-mainline kernel functionality or access to /dev/mem, disallowed in Fedora. When one attempts to use python-rpi-gpio, e.g. by entering `>>> import RPi.GPIO` at the python REPL, the following error is shown: Traceback (most recent call last): File "./callback.py", line 2, in <module> import RPi.GPIO as GPIO File "/usr/lib64/python3.7/site-packages/RPi/GPIO/__init__.py", line 23, in <module> from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi! I propose that python-rpi-gpio be dropped from Fedora as it is broken on the Raspberry Pi, its only use case. This was my original motivation to develop this library, to provide a working transparent drop-in replacement for the RPi.GPIO API to allow users to make use of the RPi.GPIO API as it is widely used in tutorials and higher-level libraries (e.g. gpiozero), and enable more functionality for users of the Raspberry Pi who wish to run Fedora as their OS. Updated spec: https://raw.githubusercontent.com/underground-software/RPi.GPIO2/packaging2/packaging/python-RPi-GPIO2.spec Updated koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=50280565 -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx