eee99ce
# Created by pyp2rpm-3.3.2
eee99ce
%global pypi_name injector
eee99ce
eee99ce
Name:           python-%{pypi_name}
610dfdf
Version:        0.17.0
610dfdf
Release:        1%{?dist}
eee99ce
Summary:        Python dependency injection framework inspired by Guice
eee99ce
eee99ce
License:        BSD
eee99ce
URL:            https://github.com/alecthomas/injector
eee99ce
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
eee99ce
BuildArch:      noarch
06ad3a0
eee99ce
BuildRequires:  python3-devel
eee99ce
BuildRequires:  python3dist(setuptools)
eee99ce
eee99ce
%global _description \
eee99ce
Dependency injection as a formal pattern is less useful in Python than in other \
eee99ce
languages, primarily due to its support for keyword arguments, the ease with \
eee99ce
which objects can be mocked, and its dynamic nature. \
eee99ce
\
eee99ce
That said, a framework for assisting in this process can remove a lot of \
eee99ce
boiler-plate from larger applications. That's where Injector can help. \
eee99ce
It automatically and transitively provides keyword arguments with their values. \
eee99ce
As an added benefit, Injector encourages nicely compartmentalised code through \
eee99ce
the use of `Module` s. \
eee99ce
\
eee99ce
While being inspired by Guice, it does not slavishly replicate its API. \
eee99ce
Providing a Pythonic API trumps faithfulness.
eee99ce
eee99ce
%description %{_description}
eee99ce
eee99ce
%package -n     python3-%{pypi_name}
eee99ce
Summary:        %{summary}
eee99ce
%{?python_provide:%python_provide python3-%{pypi_name}}
06ad3a0
eee99ce
%description -n python3-%{pypi_name} %{_description}
eee99ce
eee99ce
%package -n     python3-%{pypi_name}-doc
eee99ce
Summary:        Documentation for Python dependency injection framework
eee99ce
eee99ce
BuildRequires:  python3dist(sphinx)
eee99ce
eee99ce
%description -n python3-%{pypi_name}-doc %{_description}
eee99ce
eee99ce
%prep
eee99ce
%autosetup -n %{pypi_name}-%{version}
eee99ce
# Remove bundled egg-info
eee99ce
rm -rf %{pypi_name}.egg-info
eee99ce
eee99ce
%build
eee99ce
%py3_build
eee99ce
eee99ce
# Generate html docs
eee99ce
PYTHONPATH=${PWD} sphinx-build-3 docs html
eee99ce
# Remove the sphinx-build leftovers
eee99ce
rm -rf html/.{doctrees,buildinfo}
eee99ce
eee99ce
%install
eee99ce
%py3_install
eee99ce
eee99ce
%files -n python3-%{pypi_name}
eee99ce
%license COPYING
610dfdf
%doc README.md
eee99ce
%{python3_sitelib}/%{pypi_name}
eee99ce
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
eee99ce
eee99ce
%files -n python3-%{pypi_name}-doc
eee99ce
%doc html
eee99ce
eee99ce
%changelog
610dfdf
* Sun Sep 01 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.17.0-1
610dfdf
- Update to 0.17.0
610dfdf
4ea95b9
* Mon Aug 19 2019 Miro HronĨok <mhroncok@redhat.com> - 0.16.1-3
4ea95b9
- Rebuilt for Python 3.8
4ea95b9
e7194e1
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-2
e7194e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e7194e1
06ad3a0
* Sat May 11 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.16.1-1
06ad3a0
- Update to 0.16.1
06ad3a0
eee99ce
* Sun Mar 24 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.15.0-2
eee99ce
- Update to 0.15.0
eee99ce
- Added docs and spec file fixes.
eee99ce
eee99ce
* Wed Mar 20 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.14.1-2
06ad3a0
- Initial package.