9fb549a
%if 0%{?fedora} || 0%{?rhel} > 7
9fb549a
%bcond_without python3
9fb549a
%else
9fb549a
%bcond_with    python3
ece3571
%endif
9fb549a
%bcond_without python2
ece3571
ece3571
%{!?_licensedir: %global license %%doc}
ece3571
ece3571
%if 0%{?rhel} && 0%{?rhel} <= 6
ece3571
%{!?__python2:        %global __python2 /usr/bin/python2}
ece3571
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
ece3571
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
ece3571
%endif
ece3571
ece3571
%global modname munch
ece3571
ece3571
Name:               python-munch
91f16b8
Version:            2.3.2
18fb7c7
Release:            5%{?dist}
ece3571
Summary:            A dot-accessible dictionary (a la JavaScript objects)
ece3571
ece3571
License:            MIT
7e121f8
URL:                https://pypi.io/project/munch
91f16b8
Source0:            %pypi_source %{modname}
ece3571
ece3571
BuildArch:          noarch
ece3571
ece3571
BuildRequires:      python2-devel
66102f4
BuildRequires:      python2-setuptools
ece3571
9fb549a
%if %{with python3}
ece3571
BuildRequires:      python3-devel
ece3571
BuildRequires:      python3-setuptools
ece3571
%endif
ece3571
7d8ddbf
%global _description\
7d8ddbf
munch is a fork of David Schoonover's **Bunch** package, providing similar\
7d8ddbf
functionality. 99% of the work was done by him, and the fork was made\
7d8ddbf
mainly for lack of responsiveness for fixes and maintenance on the original\
7d8ddbf
code.\
7d8ddbf
\
7d8ddbf
Munch is a dictionary that supports attribute-style access, a la\
ece3571
JavaScript.
ece3571
7d8ddbf
%description %_description
7d8ddbf
7d8ddbf
%package -n python2-munch
7d8ddbf
Summary: %summary
7d8ddbf
%{?python_provide:%python_provide python2-munch}
7d8ddbf
7d8ddbf
%description -n python2-munch %_description
7d8ddbf
9fb549a
%if %{with python3}
ece3571
%package -n python3-munch
ece3571
Summary:            A dot-accessible dictionary (a la JavaScript objects)
ece3571
ece3571
%description -n python3-munch
ece3571
munch is a fork of David Schoonover's **Bunch** package, providing similar
ece3571
functionality. 99% of the work was done by him, and the fork was made
ece3571
mainly for lack of responsiveness for fixes and maintenance on the original
ece3571
code.
ece3571
ece3571
Munch is a dictionary that supports attribute-style access, a la
ece3571
JavaScript.
ece3571
%endif
ece3571
ece3571
%prep
ece3571
%setup -q -n %{modname}-%{version}
ece3571
ece3571
# Remove shebang to make rpmlint happy.
ece3571
sed -i '/\/usr\/bin\/python/d' munch/__init__.py
ece3571
ece3571
# Remove bundled egg-info in case it exists
ece3571
rm -rf %{modname}.egg-info
9fb549a
%if %{with python3}
ece3571
rm -rf %{py3dir}
ece3571
cp -a . %{py3dir}
ece3571
%endif
ece3571
9fb549a
ece3571
%build
9fb549a
%if %{with python2}
ece3571
%{__python2} setup.py build
9fb549a
%endif
9fb549a
9fb549a
%if %{with python3}
ece3571
pushd %{py3dir}
ece3571
%{__python3} setup.py build
ece3571
popd
ece3571
%endif
ece3571
ece3571
%install
9fb549a
%if %{with python3}
ece3571
pushd %{py3dir}
ece3571
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
ece3571
popd
ece3571
%endif
9fb549a
%if %{with python2}
ece3571
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
9fb549a
%endif
9fb549a
ece3571
9fb549a
%if %{with python2}
7d8ddbf
%files -n python2-munch
ece3571
%doc README.md
0e73718
%{!?_licensedir:%global license %doc}
ece3571
%license LICENSE.txt
ece3571
%{python2_sitelib}/%{modname}/
ece3571
%{python2_sitelib}/%{modname}-%{version}*
9fb549a
%endif
9fb549a
ece3571
9fb549a
%if %{with python3}
ece3571
%files -n python3-munch
ece3571
%doc README.md
0e73718
%{!?_licensedir:%global license %doc}
ece3571
%license LICENSE.txt
ece3571
%{python3_sitelib}/%{modname}/
ece3571
%{python3_sitelib}/%{modname}-%{version}*
ece3571
%endif
ece3571
9fb549a
ece3571
%changelog
18fb7c7
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.2-5
18fb7c7
- Rebuilt for Python 3.8
18fb7c7
4f38de3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-4
4f38de3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4f38de3
1753dba
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-3
1753dba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1753dba
9fb549a
* Wed Nov 14 2018 Pavel Raiskup <praiskup@redhat.com> - 2.3.2-2
9fb549a
- add --without=python{2,3} rpmbuild options
9fb549a
91f16b8
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.3.2-1
91f16b8
- Update to 2.3.2
91f16b8
eec8147
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-6
eec8147
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
eec8147
2b15cd3
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.0-5
2b15cd3
- Rebuilt for Python 3.7
2b15cd3
66102f4
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.2.0-4
66102f4
- Update Python 2 dependency declarations to new packaging standards
66102f4
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
66102f4
70e0d5a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
70e0d5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
70e0d5a
7d8ddbf
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-2
7d8ddbf
- Python 2 binary package renamed to python2-munch
7d8ddbf
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
7d8ddbf
a5c0389
* Mon Jul 31 2017 Kevin Fenzi <kevin@scrye.com> - 2.2.0-1
a5c0389
- Update to 2.2.0. Fixes bug #1475808
a5c0389
46f3ac3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
46f3ac3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
46f3ac3
953373a
* Tue Mar 21 2017 Ralph Bean <rbean@redhat.com> - 2.1.1-1
953373a
- new version
953373a
95b6fdd
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
95b6fdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
95b6fdd
7e121f8
* Wed Jan 11 2017 Ralph Bean <rbean@redhat.com> - 2.1.0-1
7e121f8
- new version
7e121f8
ac7f42c
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.4-4
ac7f42c
- Rebuild for Python 3.6
ac7f42c
77f58dd
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-3
77f58dd
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
77f58dd
8f30ee4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-2
8f30ee4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8f30ee4
a35b830
* Fri Dec 11 2015 Ralph Bean <rbean@redhat.com> - 2.0.4-1
a35b830
- new version
a35b830
49d6d16
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
49d6d16
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
49d6d16
a55c212
* Wed Nov 04 2015 Ralph Bean <rbean@redhat.com> - 2.0.4-1
a55c212
- new version
a55c212
3042e27
* Sat Oct 03 2015 Ralph Bean <rbean@redhat.com> - 2.0.3-1
3042e27
- new version
3042e27
0e73718
* Mon Aug 17 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-4
0e73718
- Define license macro for el6.
0e73718
567e2d9
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-3
567e2d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
567e2d9
ece3571
* Sun Apr 12 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-2
ece3571
- Remove shebang to make rpmlint happy.
ece3571
ece3571
* Sat Apr 11 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-1
ece3571
- Initial package for Fedora