eee99ce
# Created by pyp2rpm-3.3.2
eee99ce
%global pypi_name injector
eee99ce
eee99ce
Name:           python-%{pypi_name}
4b4c2b9
Version:        0.18.4
4b4c2b9
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
ddf0d83
%global _description %{expand:
ddf0d83
Dependency injection as a formal pattern is less useful in Python than in other
ddf0d83
languages, primarily due to its support for keyword arguments, the ease with
ddf0d83
which objects can be mocked, and its dynamic nature.
ddf0d83
ddf0d83
That said, a framework for assisting in this process can remove a lot of
ddf0d83
boiler-plate from larger applications. That's where Injector can help. It
ddf0d83
automatically and transitively provides keyword arguments with their values. As
ddf0d83
an added benefit, Injector encourages nicely compartmentalised code through the
ddf0d83
use of `Module` s.
ddf0d83
ddf0d83
While being inspired by Guice, it does not slavishly replicate its API.
ddf0d83
Providing a Pythonic API trumps faithfulness.}
eee99ce
eee99ce
%description %{_description}
eee99ce
ddf0d83
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
ddf0d83
eee99ce
%package -n     python3-%{pypi_name}-doc
eee99ce
Summary:        Documentation for Python dependency injection framework
eee99ce
eee99ce
BuildRequires:  python3dist(sphinx)
231fa98
BuildRequires:  python3dist(typing-extensions)
eee99ce
eee99ce
%description -n python3-%{pypi_name}-doc %{_description}
eee99ce
8ab878a
eee99ce
%prep
eee99ce
%autosetup -n %{pypi_name}-%{version}
8ab878a
eee99ce
# Remove bundled egg-info
eee99ce
rm -rf %{pypi_name}.egg-info
eee99ce
8ab878a
eee99ce
%build
eee99ce
%py3_build
eee99ce
eee99ce
# Generate html docs
eee99ce
PYTHONPATH=${PWD} sphinx-build-3 docs html
8ab878a
eee99ce
# Remove the sphinx-build leftovers
eee99ce
rm -rf html/.{doctrees,buildinfo}
eee99ce
8ab878a
eee99ce
%install
eee99ce
%py3_install
eee99ce
8ab878a
eee99ce
%files -n python3-%{pypi_name}
eee99ce
%license COPYING
610dfdf
%doc README.md
8ab878a
%{python3_sitelib}/%{pypi_name}/
8ab878a
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
eee99ce
eee99ce
%files -n python3-%{pypi_name}-doc
eee99ce
%doc html
eee99ce
8ab878a
eee99ce
%changelog
4b4c2b9
* Wed Sep 23 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.18.4-1
4b4c2b9
- Update to 0.18.4
4b4c2b9
ca0c25e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.3-3
ca0c25e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ca0c25e
d110589
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.18.3-2
d110589
- Rebuilt for Python 3.9
d110589
ee9727b
* Tue Feb 04 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.18.3-1
ee9727b
- Update to 0.18.3
ee9727b
4245cbb
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.2-2
4245cbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4245cbb
ddf0d83
* Sat Jan 11 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.18.2-1
ddf0d83
- Update to 0.18.2
ddf0d83
8ab878a
* Wed Dec 11 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.18.1-1
8ab878a
- Update to 0.18.1
8ab878a
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.