%global pkg_name inject %global pypi_name Inject %global pkg_description %{expand:Dependency injection the python way, the good way. Not a port of Guice or Spring. Key features: - Fast. - Thread-safe. - Simple to use. - Does not steal class constructors. - Does not try to manage your application object graph. - Transparently integrates into tests. - Supports type hinting in Python 3.5+. - Autoparams leveraging type annotations. } Name: python-%{pkg_name} Summary: Dependency injection, the Python way License: ASL 2.0 Version: 4.3.1 Release: 9%{?dist} URL: https://github.com/ivankorobkov/python-%{pkg_name} Source0: %pypi_source %global with_tests 1 BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %if 0%{?with_tests} BuildRequires: python3dist(pytest-runner) %endif BuildArch: noarch %description %{pkg_description} %package -n python3-%{pkg_name} Summary: %{summary} BuildArch: noarch %description -n python3-%{pkg_name} %{pkg_description} %prep %autosetup -n %{pypi_name}-%{version} %build %py3_build %install %py3_install %if 0%{?with_tests} %check # This file is missing from the PyPi tarballs, but is required for tests to work # Taken from: https://raw.githubusercontent.com/ivankorobkov/python-inject/%{version}/test/__init__.py # See issue: https://github.com/ivankorobkov/python-inject/issues/70 cat > test/__init__.py < - 4.3.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 4.3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 4.3.1-7 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 4.3.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 4.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 4.3.1-4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 4.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Sep 28 2020 Artur Frenszek-Iwicki - 4.3.1-2 - Use python3dist() for specifying dependencies - Run tests using pytest instead of nosetests * Fri Sep 25 2020 Artur Frenszek-Iwicki - 4.3.1-1 - Initial packaging