| |
@@ -1,6 +1,9 @@
|
| |
- %if 0%{?fedora}
|
| |
- %global with_python3 1
|
| |
+ %if 0%{?fedora} || 0%{?rhel} > 7
|
| |
+ %bcond_without python3
|
| |
+ %else
|
| |
+ %bcond_with python3
|
| |
%endif
|
| |
+ %bcond_without python2
|
| |
|
| |
%{!?_licensedir: %global license %%doc}
|
| |
|
| |
@@ -14,7 +17,7 @@
|
| |
|
| |
Name: python-munch
|
| |
Version: 2.3.2
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: A dot-accessible dictionary (a la JavaScript objects)
|
| |
|
| |
Group: Development/Libraries
|
| |
@@ -27,7 +30,7 @@
|
| |
BuildRequires: python2-devel
|
| |
BuildRequires: python2-setuptools
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3-setuptools
|
| |
%endif
|
| |
@@ -49,7 +52,7 @@
|
| |
|
| |
%description -n python2-munch %_description
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
%package -n python3-munch
|
| |
Summary: A dot-accessible dictionary (a la JavaScript objects)
|
| |
Group: Development/Libraries
|
| |
@@ -72,35 +75,45 @@
|
| |
|
| |
# Remove bundled egg-info in case it exists
|
| |
rm -rf %{modname}.egg-info
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
rm -rf %{py3dir}
|
| |
cp -a . %{py3dir}
|
| |
%endif
|
| |
|
| |
+
|
| |
%build
|
| |
+ %if %{with python2}
|
| |
%{__python2} setup.py build
|
| |
- %if 0%{?with_python3}
|
| |
+ %endif
|
| |
+
|
| |
+ %if %{with python3}
|
| |
pushd %{py3dir}
|
| |
%{__python3} setup.py build
|
| |
popd
|
| |
%endif
|
| |
|
| |
%install
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
pushd %{py3dir}
|
| |
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
| |
popd
|
| |
%endif
|
| |
+ %if %{with python2}
|
| |
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
|
| |
+ %endif
|
| |
+
|
| |
|
| |
+ %if %{with python2}
|
| |
%files -n python2-munch
|
| |
%doc README.md
|
| |
%{!?_licensedir:%global license %doc}
|
| |
%license LICENSE.txt
|
| |
%{python2_sitelib}/%{modname}/
|
| |
%{python2_sitelib}/%{modname}-%{version}*
|
| |
+ %endif
|
| |
+
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
+ %if %{with python3}
|
| |
%files -n python3-munch
|
| |
%doc README.md
|
| |
%{!?_licensedir:%global license %doc}
|
| |
@@ -109,7 +122,11 @@
|
| |
%{python3_sitelib}/%{modname}-%{version}*
|
| |
%endif
|
| |
|
| |
+
|
| |
%changelog
|
| |
+ * Wed Nov 14 2018 Pavel Raiskup <praiskup@redhat.com> - 2.3.2-2
|
| |
+ - add --without=python{2,3} rpmbuild options
|
| |
+
|
| |
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.3.2-1
|
| |
- Update to 2.3.2
|
| |
|
| |
Version: 2.3.2-2