This repository has been archived on 2025-06-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
python-munch/python-munch.spec
2017-08-19 09:41:38 -04:00

163 lines
4.9 KiB
RPMSpec

%if 0%{?fedora}
%global with_python3 1
%endif
%{!?_licensedir: %global license %%doc}
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%global modname munch
Name: python-munch
Version: 2.2.0
Release: 2%{?dist}
Summary: A dot-accessible dictionary (a la JavaScript objects)
Group: Development/Libraries
License: MIT
URL: https://pypi.io/project/munch
Source0: https://pypi.io/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
%global _description\
munch is a fork of David Schoonover's **Bunch** package, providing similar\
functionality. 99% of the work was done by him, and the fork was made\
mainly for lack of responsiveness for fixes and maintenance on the original\
code.\
\
Munch is a dictionary that supports attribute-style access, a la\
JavaScript.
%description %_description
%package -n python2-munch
Summary: %summary
%{?python_provide:%python_provide python2-munch}
%description -n python2-munch %_description
%if 0%{?with_python3}
%package -n python3-munch
Summary: A dot-accessible dictionary (a la JavaScript objects)
Group: Development/Libraries
%description -n python3-munch
munch is a fork of David Schoonover's **Bunch** package, providing similar
functionality. 99% of the work was done by him, and the fork was made
mainly for lack of responsiveness for fixes and maintenance on the original
code.
Munch is a dictionary that supports attribute-style access, a la
JavaScript.
%endif
%prep
%setup -q -n %{modname}-%{version}
# Remove shebang to make rpmlint happy.
sed -i '/\/usr\/bin\/python/d' munch/__init__.py
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%files -n python2-munch
%doc README.md
%{!?_licensedir:%global license %doc}
%license LICENSE.txt
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*
%if 0%{?with_python3}
%files -n python3-munch
%doc README.md
%{!?_licensedir:%global license %doc}
%license LICENSE.txt
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}*
%endif
%changelog
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.0-2
- Python 2 binary package renamed to python2-munch
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Mon Jul 31 2017 Kevin Fenzi <kevin@scrye.com> - 2.2.0-1
- Update to 2.2.0. Fixes bug #1475808
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Mar 21 2017 Ralph Bean <rbean@redhat.com> - 2.1.1-1
- new version
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Jan 11 2017 Ralph Bean <rbean@redhat.com> - 2.1.0-1
- new version
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.4-4
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Dec 11 2015 Ralph Bean <rbean@redhat.com> - 2.0.4-1
- new version
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Nov 04 2015 Ralph Bean <rbean@redhat.com> - 2.0.4-1
- new version
* Sat Oct 03 2015 Ralph Bean <rbean@redhat.com> - 2.0.3-1
- new version
* Mon Aug 17 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-4
- Define license macro for el6.
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Apr 12 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-2
- Remove shebang to make rpmlint happy.
* Sat Apr 11 2015 Ralph Bean <rbean@redhat.com> - 2.0.2-1
- Initial package for Fedora