## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name ebcdic %global gh_name CodecMapper %global forgeurl https://github.com/roskakori/CodecMapper Name: python-%{pypi_name} Version: 1.1.1 Release: %{autorelease} Summary: Additional EBCDIC codecs for data exchange with legacy system %forgemeta License: BSD-2-Clause URL: https://github.com/roskakori/CodecMapper/tree/master/ebcdic Source: %forgesource # Fix `test/` and `examples/` being omitted from sdist # https://github.com/roskakori/CodecMapper/pull/17 Patch: %{forgeurl}/pull/17.patch Patch: Fedora-build.xml-modifications.patch BuildArch: noarch BuildRequires: ant BuildRequires: python3-devel BuildRequires: python3-pytest %global _description %{expand: Python package adding additional EBCDIC codecs for data exchange with legacy system. EBCDIC (https://en.wikipedia.org/wiki/EBCDIC) is short for Extended Binary Coded Decimal Interchange Code and is a family of character encodings that is mainly used on mainframe computers. There is no real point in using it unless you have to exchange data with legacy systems that still only support EBCDIC as character encoding.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %forgeautosetup -p1 %generate_buildrequires cd ebcdic %pyproject_buildrequires %build ant ebcdic -Dpython=%{python3} cd ebcdic %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check %pytest -v ebcdic/ebcdic/test/test_ebcdic.py %files -n python3-%{pypi_name} -f %{pyproject_files} %doc ebcdic/README.rst ebcdic/ebcdic/examples %changelog * Mon Nov 13 2023 Sandro - 1.1.1-6 - Apply patches from @gotmax23 * Sat Nov 11 2023 Sandro - 1.1.1-5 - Patch `build.xml` - Don't run `setup.py` - Use `python3` * Wed Nov 08 2023 Sandro - 1.1.1-4 - Move codec extraction to %%build * Mon Oct 16 2023 Sandro - 1.1.1-3 - Generate codecs without running tests (linting) - Drop BR on python3-pycodestyle * Sun Oct 15 2023 Sandro - 1.1.1-2 - Use patch from PR submitted upstream - Add example to docs * Sun Oct 15 2023 Sandro - 1.1.1-1 - Initial package