## START: Set by rpmautospec ## (rpmautospec version 0.3.8) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; 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 BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest # Although `setuptools` and `wheel` are installed automatically by # %%pyproject_buildrequires, we need them in %%prep for generating # additional codecs BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: ant %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 codecs with local python3 ant ebcdic -Dpython=%{python3} # Remove unneeded code from project. We are only interested in # everything below CodecMapper/ebcdic/ # The codecs generated above have been added to CodecMapper/ebcdic/ find ./ -mindepth 1 -maxdepth 1 ! -name ebcdic -type d -exec rm -rf '{}' + find ./ -maxdepth 1 -type f -delete mv ebcdic top mv top/* . rmdir top %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check %{pytest} -v ebcdic/test/test_ebcdic.py %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.* ebcdic/examples %changelog ## START: Generated by rpmautospec * Sat Dec 09 2023 Sandro - 1.1.1-4 - Uncommitted changes * 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 ## END: Generated by rpmautospec