## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # tests are enabled by default %bcond_without tests %global srcname javaproperties %global forgeurl https://github.com/jwodder/javaproperties Version: 0.8.1 %global tag v%{version} %forgemeta Name: python-%{srcname} Release: %autorelease Summary: Read & write Java .properties files License: MIT URL: %forgeurl Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-mock) BuildRequires: python3dist(python-dateutil) %endif %global _description %{expand: Read & write Java .properties files} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %if %{with tests} %check # Environment variables come from upstream's tox.ini: # https://github.com/major/javaproperties/blob/master/tox.ini # Tests fail if they are not present due to time zone shenanigans. export LC_ALL=en_US.UTF-8 export TZ=EST5EDT,M3.2.0,M11.1.0 %pytest %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %changelog * Sun Apr 24 2022 Major Hayden 0.8.1-3 - Switch to pyproject-rpm-macros * Fri Jan 21 2022 Fedora Release Engineering 0.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Oct 06 2021 Major Hayden 0.8.1-1 - Update to 0.8.1 * Tue Jul 27 2021 Fedora Release Engineering 0.8.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 08 2021 Major Hayden 0.8.0-2 - Add BuildRequires for setuptools * Tue Jun 08 2021 Major Hayden 0.8.0-1 - Initial import (#1967776)