%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 %if 0%{?fedora} %global with_python3 1 %endif Name: python-ZConfig Version: 3.1.0 Release: 7%{?dist} Summary: Structured Configuration Library Group: Development/Languages License: ZPLv2.1 URL: http://www.zope.org/Members/fdrake/zconfig/ Source0: http://pypi.python.org/packages/source/Z/ZConfig/ZConfig-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools # for tests, not available in Fedora #BuildRequires: python-zope-testrunner %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools # for tests, not available in Fedora #BuildRequires: python3-zope-testrunner %endif %description ZConfig is a configuration library intended for general use. It supports a hierarchical schema-driven configuration model that allows a schema to specify data conversion routines written in Python. ZConfig's model is very different from the model supported by the ConfigParser module found in Python's standard library, and is more suitable to configuration-intensive applications. %package -n python2-ZConfig Summary: Structured Configuration Library %{?python_provide:%python_provide python2-ZConfig} %description -n python2-ZConfig ZConfig is a configuration library intended for general use. It supports a hierarchical schema-driven configuration model that allows a schema to specify data conversion routines written in Python. ZConfig's model is very different from the model supported by the ConfigParser module found in Python's standard library, and is more suitable to configuration-intensive applications. %if 0%{?with_python3} %package -n python3-ZConfig Summary: Structured Configuration Library %{?python_provide:%python_provide python3-ZConfig} %description -n python3-ZConfig ZConfig is a configuration library intended for general use. It supports a hierarchical schema-driven configuration model that allows a schema to specify data conversion routines written in Python. ZConfig's model is very different from the model supported by the ConfigParser module found in Python's standard library, and is more suitable to configuration-intensive applications. %endif %prep %setup -q -n ZConfig-%{version} %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} rm -f %{buildroot}%{python3_sitelib}/ZConfig/*.txt mv %{buildroot}%{_bindir}/zconfig %{buildroot}%{_bindir}/python3-zconfig mv %{buildroot}%{_bindir}/zconfig_schema2html %{buildroot}%{_bindir}/python3-zconfig_schema2html popd %endif %{__python2} setup.py install -O1 --skip-build --root %{buildroot} rm -f %{buildroot}%{python2_sitelib}/ZConfig/*.txt #%%check # Tests require zope.testrunner not yet available in Fedora #%{__python2} setup.py test # #%if 0%{?with_python3} #pushd %{py3dir} #%{__python3} setup.py test #popd #%endif %files -n python2-ZConfig %doc README.txt doc/zconfig.pdf ZConfig/*.txt %license COPYRIGHT.txt LICENSE.txt %{python2_sitelib}/* %exclude %{python2_sitelib}/ZConfig/tests/ %{_bindir}/zconfig %{_bindir}/zconfig_schema2html %if 0%{?with_python3} %files -n python3-ZConfig %doc README.txt doc/zconfig.pdf ZConfig/*.txt %license COPYRIGHT.txt LICENSE.txt %{python3_sitelib}/* %exclude %{python3_sitelib}/ZConfig/tests/ %{_bindir}/python3-zconfig %{_bindir}/python3-zconfig_schema2html %endif %changelog * Sat Feb 11 2017 Fedora Release Engineering - 3.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 3.1.0-6 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 3.1.0-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 3.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Nov 16 2015 Ralph Bean - 3.1.0-3 - Modernize python macros. - Provide explicit python2 subpackage. * Tue Nov 10 2015 Fedora Release Engineering - 3.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Sun Oct 18 2015 Ralph Bean - 3.1.0-1 - new version * Thu Jun 18 2015 Fedora Release Engineering - 3.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jun 10 2014 Ralph Bean - 3.0.4-1 - Latest upstream. - Added python3 subpackage. - Modernized python2 macros * Sat Jun 07 2014 Fedora Release Engineering - 2.9.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 2.9.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 2.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 2.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Mar 12 2012 Robin Lee - 2.9.2-1 - Update to 2.9.2 * Sat Jan 14 2012 Fedora Release Engineering - 2.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Mar 30 2011 Robin Lee - 2.9.0-1 - Update to 2.9.0 (#689762) - Exclude the tests * Tue Feb 08 2011 Fedora Release Engineering - 2.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 2.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Wed Jun 16 2010 Robin Lee - 2.8.0-3 - Workaround of installation * Wed Jun 16 2010 Robin Lee - 2.8.0-2 - Retag * Wed Jun 16 2010 Robin Lee - 2.8.0-1 - 2.8.0 - BR: python-zope-testing removed - More docs included * Sun Jul 26 2009 Fedora Release Engineering - 2.7.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jun 18 2009 Conrad Meyer - 2.7.1-1 - New version. * Sun Dec 14 2008 Conrad Meyer - 2.6.1-1 - Initial package.