%if 0%{?fedora} # XXX - Disabled until python3-kitchen is available in Fedora. %global with_python3 0 %endif %global modname moksha.common Name: python-moksha-common Version: 1.2.3 Release: 2%{?dist} Summary: Common components for Moksha Group: Development/Libraries License: ASL 2.0 or MIT URL: http://pypi.python.org/pypi/moksha.common Source0: http://pypi.python.org/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-mock BuildRequires: python-decorator BuildRequires: python-kitchen BuildRequires: pytz BuildRequires: python-six %if 0%{?rhel} BuildRequires: python-unittest2 %endif %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose BuildRequires: python3-mock BuildRequires: python3-decorator BuildRequires: python3-kitchen BuildRequires: python3-pytz BuildRequires: python3-six %endif Requires: python-decorator Requires: python-kitchen Requires: pytz Requires: python-six # Its a whole different package now Conflicts: moksha < 1.0.0 %description Common components for Moksha. %if 0%{?with_python3} %package -n python3-moksha-common Summary: Common components for Moksha Group: Development/Libraries Requires: python3-decorator Requires: python3-kitchen Requires: python3-pytz Requires: python3-six %description -n python3-moksha-common Common components for Moksha. %endif %prep %setup -q -n %{modname}-%{version} rm -rf *.egg* %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %if 0%{?with_python3} pushd %{py3dir} CFLAGS="%{optflags}" %{__python3} setup.py build popd %endif CFLAGS="%{optflags}" %{__python} setup.py build %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root=%{buildroot} mv %{buildroot}/%{_bindir}/moksha %{buildroot}/%{_bindir}/python3-moksha popd %endif %{__python} setup.py install -O1 --skip-build --root=%{buildroot} %check %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py test popd %endif %{__python} setup.py test %files %doc README COPYING AUTHORS %{python_sitelib}/moksha/ %{python_sitelib}/%{modname}-%{version}* # The CLI tool. :) %{_bindir}/moksha %if 0%{?with_python3} %files -n python3-moksha-common %doc README COPYING AUTHORS %{python3_sitelib}/moksha/ %{python3_sitelib}/%{modname}-%{version}* %{_bindir}/python3-moksha %endif %changelog * Sat Jun 07 2014 Fedora Release Engineering - 1.2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Apr 24 2014 Ralph Bean - 1.2.3-1 - Support older versions of python-six. * Thu Apr 24 2014 Ralph Bean - 1.2.2-1 - Fixed up some python3 support. - Added dep on python-six. * Mon Oct 14 2013 Ralph Bean - 1.2.1-1 - Latest upstream; simply includes a forgotten test config. * Sun Aug 04 2013 Fedora Release Engineering - 1.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Mar 26 2013 Ralph Bean - 1.2.0-1 - Bumped to latest upstream. - Included python3 subpackage but left it disabled by macro. - Reenabled the test suite. * Thu Feb 14 2013 Fedora Release Engineering - 1.0.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Oct 10 2012 Ralph Bean - 1.0.6-1 - Bumped to 1.0.6. - Removed Requires on python-paste which has moved to python-moksha-wsgi. * Wed Sep 19 2012 Ralph Bean - 1.0.1-2 - Added Conflicts tag against old moksha. * Wed Sep 12 2012 Ralph Bean - 1.0.1-1 - Upstream bugfixes. * Wed Sep 05 2012 Ralph Bean - 1.0.0-4 - Use optflags instead of RPM_OPT_FLAGS to be consistent. * Wed Sep 05 2012 Ralph Bean - 1.0.0-3 - Relicensed to ASL 2.0 or MIT for the one included MIT file. - Added RPM_OPT_FLAGS to build section. * Wed Sep 05 2012 Ralph Bean - 1.0.0-2 - Disabled tests since they're behaving strangely in koji. * Tue Sep 04 2012 Ralph Bean - 1.0.0-1 - Initial package for Fedora. Split from old moksha core.