rpms/python-minimock/EL-6 python-minimock.spec,1.1,1.2

tomspur tomspur at fedoraproject.org
Fri Jul 2 08:46:48 UTC 2010


Author: tomspur

Update of /cvs/pkgs/rpms/python-minimock/EL-6
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13150

Modified Files:
	python-minimock.spec 
Log Message:
pull in spec from rawhide+F-13


Index: python-minimock.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-minimock/EL-6/python-minimock.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- python-minimock.spec	23 Dec 2009 20:00:24 -0000	1.1
+++ python-minimock.spec	2 Jul 2010 08:46:48 -0000	1.2
@@ -1,8 +1,12 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+    %global with_python3 1
+%endif
+
 Name:           python-minimock
 Version:        1.2.5
-Release:        1%{?dist}
+Release:        3%{?dist}
 Summary:        The simplest possible mock library
 
 Group:          Development/Tools
@@ -15,22 +19,51 @@ BuildArch:      noarch
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
 
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python-tools
+%endif
+
 %description
 minimock is a simple library for doing Mock objects with doctest.
 
+%if 0%{?with_python3}
+%package -n python3-minimock
+Summary:        The simplest possible mock library
+%description -n python3-minimock
+minimock is a simple library for doing Mock objects with doctest.
+%endif
 
 %prep
 %setup -q -n MiniMock-%{version}
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -ar . %{py3dir}
+2to3 --write --nobackups %{py3dir}
+%endif
 
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+    %{__python3} setup.py build
+popd
+%endif
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+    %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif
+
  
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -39,10 +72,25 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %doc docs/*
-%{python_sitelib}/*
+%{python_sitelib}/MiniMock-%{version}-py?.?.egg-info
+%{python_sitelib}/minimock*
 
+%if 0%{?with_python3}
+%files -n python3-minimock
+%defattr(-,root,root,-)
+%doc docs/*
+%{python3_sitelib}/MiniMock-%{version}-py?.?.egg-info
+%{python3_sitelib}/minimock*
+%endif
 
 %changelog
+* Fri Feb  5 2010 Thomas Spura <tomspur at fedoraproject.org> - 1.2.5-3
+- update python3 subpackage to reflect actuall guidelines
+
+* Thu Jan 14 2010 Thomas Spura <tomspur at fedoraproject.org> - 1.2.5-2
+- also ship python3-minimock
+- be more explicit in %%files
+
 * Thu Dec 22 2009 Thomas Spura <tomspur at fedoraproject.org> - 1.2.5-1
 - correct URL
 - update to new version



More information about the scm-commits mailing list