%bcond_with check Name: python-gpiozero Version: 1.6.2 Release: 2%{?dist} Summary: A simple interface to GPIO devices with Raspberry Pi. # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: BSD URL: https://github.com/gpiozero/gpiozero # https://github.com/gpiozero/gpiozero/archive/v%%{version}/gpiozero-%%{version}.tar.gz Source: %{pypi_source gpiozero} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with check} BuildRequires: python3-pigpio BuildRequires: python3-lgpio BuildRequires: python3-RPi.GPIO BuildRequires: python3-RPIO %endif # Fill in the actual package description to submit package to Fedora %global _description %{expand: This is package 'gpiozero' generated automatically by pyp2spec.} %description %_description %package -n python3-gpiozero Summary: %{summary} Requires: (python3-pigpio or python3-lgpio or python3-RPi.GPIO or python3-RPIO) Suggests: python3-pigpio %description -n python3-gpiozero %_description %prep %autosetup -p1 -n gpiozero-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # For official Fedora packages, including files with '*' +auto is not allowed # Replace it with a list of relevant Python modules/globs and list extra files in %%files %pyproject_save_files '*' +auto %check %if %{with check} %pyproject_check_import %endif %files -n python3-gpiozero -f %{pyproject_files} %changelog * Thu Nov 03 2022 Luca Magrone - 1.6.2-2 - BuildRequire only if with check - Require dependencies * Thu Nov 03 2022 Luca Magrone - 1.6.2-1 - Initial package