pyproject-rpm-macros/tests/printrun.spec
Miro Hrončok 6b0ce0731f CI: Convert all test spec License tags to SPDX
python-ldap is a SPDX tag: https://spdx.org/licenses/python-ldap.html

(cherry picked from Fedora commit ac4f008073)
2025-12-01 12:16:55 +01:00

55 lines
1.3 KiB
RPMSpec

Name: printrun
Version: 2.0.0~rc6
%global upstream_version 2.0.0rc6
Release: 0%{?dist}
Summary: RepRap printer interface and tools
License: GPL-3.0-or-later AND FSFAP
URL: https://github.com/kliment/Printrun
Source0: https://github.com/kliment/Printrun/archive/%{name}-%{upstream_version}.tar.gz
# fix locale location
Patch0: https://github.com/kliment/Printrun/pull/1101.patch
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-devel
BuildRequires: gcc
%description
This package contains lang files outside of printrun module.
Building this tests that lang files are marked with %%lang in filelist.
%prep
%autosetup -p1 -n Printrun-printrun-%{upstream_version}
%generate_buildrequires
%pyproject_buildrequires -R
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files -l printrun +auto
%check
# Internal check if generated lang entries are same as
# the ones generated using %%find_lang
%find_lang pronterface
%find_lang plater
grep '^%%lang' %{pyproject_files} | sort > tested.lang
sort pronterface.lang plater.lang > expected.lang
diff tested.lang expected.lang
# Internal check that generated files contain nested __pycache__ directories
grep -E '/printrun/__pycache__$' %{pyproject_files}
%files -f %{pyproject_files}
%doc README*