266990f
%if 0%{?rhel} && 0%{?rhel} <= 6
266990f
%{!?__python2:        %global __python2 /usr/bin/python2}
266990f
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
266990f
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
266990f
%endif
266990f
266990f
%if 0%{?fedora}
266990f
%global with_python3 1
be3c13d
%endif
ea98903
ea98903
Name:           python-ZConfig
e14eb79
Version:        3.1.0
6ec82df
Release:        4%{?dist}
ea98903
Summary:        Structured Configuration Library
ea98903
Group:          Development/Languages
ea98903
License:        ZPLv2.1
ea98903
URL:            http://www.zope.org/Members/fdrake/zconfig/
4502a93
Source0:        http://pypi.python.org/packages/source/Z/ZConfig/ZConfig-%{version}.tar.gz
ea98903
ea98903
BuildArch:      noarch
266990f
6190e95
BuildRequires:  python2-devel
6190e95
BuildRequires:  python-setuptools
6190e95
# for tests, not available in Fedora
6190e95
#BuildRequires:  python-zope-testrunner
ea98903
266990f
%if 0%{?with_python3}
266990f
BuildRequires:  python3-devel
266990f
BuildRequires:  python3-setuptools
266990f
# for tests, not available in Fedora
266990f
#BuildRequires:  python3-zope-testrunner
266990f
%endif
ea98903
ea98903
%description
ea98903
ZConfig is a configuration library intended for general use. It supports
ea98903
a hierarchical schema-driven configuration model that allows a schema to
ea98903
specify data conversion routines written in Python. ZConfig's model is
ea98903
very different from the model supported by the ConfigParser module found
ea98903
in Python's standard library, and is more suitable to
ea98903
configuration-intensive applications.
ea98903
b4bc9f7
%package -n python2-ZConfig
b4bc9f7
Summary:        Structured Configuration Library
b4bc9f7
%{?python_provide:%python_provide python2-ZConfig}
b4bc9f7
b4bc9f7
%description -n python2-ZConfig
b4bc9f7
ZConfig is a configuration library intended for general use. It supports
b4bc9f7
a hierarchical schema-driven configuration model that allows a schema to
b4bc9f7
specify data conversion routines written in Python. ZConfig's model is
b4bc9f7
very different from the model supported by the ConfigParser module found
b4bc9f7
in Python's standard library, and is more suitable to
b4bc9f7
configuration-intensive applications.
b4bc9f7
266990f
%if 0%{?with_python3}
266990f
%package -n python3-ZConfig
266990f
Summary:        Structured Configuration Library
b4bc9f7
%{?python_provide:%python_provide python3-ZConfig}
266990f
266990f
%description -n python3-ZConfig
266990f
ZConfig is a configuration library intended for general use. It supports
266990f
a hierarchical schema-driven configuration model that allows a schema to
266990f
specify data conversion routines written in Python. ZConfig's model is
266990f
very different from the model supported by the ConfigParser module found
266990f
in Python's standard library, and is more suitable to
266990f
configuration-intensive applications.
266990f
%endif
266990f
ea98903
ea98903
%prep
ea98903
%setup -q -n ZConfig-%{version}
ea98903
266990f
%if 0%{?with_python3}
266990f
rm -rf %{py3dir}
266990f
cp -a . %{py3dir}
266990f
%endif
ea98903
ea98903
%build
266990f
%{__python2} setup.py build
ea98903
266990f
%if 0%{?with_python3}
266990f
pushd %{py3dir}
266990f
%{__python3} setup.py build
266990f
popd
266990f
%endif
ea98903
ea98903
%install
266990f
%if 0%{?with_python3}
266990f
pushd %{py3dir}
266990f
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
266990f
rm -f %{buildroot}%{python3_sitelib}/ZConfig/*.txt
266990f
mv %{buildroot}%{_bindir}/zconfig %{buildroot}%{_bindir}/python3-zconfig
266990f
mv %{buildroot}%{_bindir}/zconfig_schema2html %{buildroot}%{_bindir}/python3-zconfig_schema2html
266990f
popd
266990f
%endif
ea98903
266990f
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
266990f
rm -f %{buildroot}%{python2_sitelib}/ZConfig/*.txt
ea98903
0a253c6
#%%check
6190e95
# Tests require zope.testrunner not yet available in Fedora
266990f
#%{__python2} setup.py test
266990f
#
266990f
#%if 0%{?with_python3}
266990f
#pushd %{py3dir}
266990f
#%{__python3} setup.py test
266990f
#popd
266990f
#%endif
ea98903
b4bc9f7
%files -n python2-ZConfig
b4bc9f7
%doc README.txt doc/zconfig.pdf ZConfig/*.txt
b4bc9f7
%license COPYRIGHT.txt LICENSE.txt
266990f
%{python2_sitelib}/*
266990f
%exclude %{python2_sitelib}/ZConfig/tests/
ea98903
%{_bindir}/zconfig
ea98903
%{_bindir}/zconfig_schema2html
ea98903
266990f
%if 0%{?with_python3}
266990f
%files -n python3-ZConfig
b4bc9f7
%doc README.txt doc/zconfig.pdf ZConfig/*.txt
b4bc9f7
%license COPYRIGHT.txt LICENSE.txt
266990f
%{python3_sitelib}/*
266990f
%exclude %{python3_sitelib}/ZConfig/tests/
266990f
%{_bindir}/python3-zconfig
266990f
%{_bindir}/python3-zconfig_schema2html
266990f
%endif
266990f
ea98903
ea98903
%changelog
6ec82df
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-4
6ec82df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6ec82df
b4bc9f7
* Mon Nov 16 2015 Ralph Bean <rbean@redhat.com> - 3.1.0-3
b4bc9f7
- Modernize python macros.
b4bc9f7
- Provide explicit python2 subpackage.
b4bc9f7
7c0ed1c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
7c0ed1c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
7c0ed1c
e14eb79
* Sun Oct 18 2015 Ralph Bean <rbean@redhat.com> - 3.1.0-1
e14eb79
- new version
e14eb79
02d2760
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-2
02d2760
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
02d2760
266990f
* Tue Jun 10 2014 Ralph Bean <rbean@redhat.com> - 3.0.4-1
266990f
- Latest upstream.
266990f
- Added python3 subpackage.
266990f
- Modernized python2 macros
b874d74
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-5
b874d74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b874d74
19cb6bc
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-4
19cb6bc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
19cb6bc
b0693a8
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-3
b0693a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b0693a8
b9ab018
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-2
b9ab018
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b9ab018
4502a93
* Mon Mar 12 2012 Robin Lee <cheeselee@fedoraproject.org> - 2.9.2-1
4502a93
- Update to 2.9.2
4502a93
701542e
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-2
701542e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
701542e
6190e95
* Wed Mar 30 2011 Robin Lee <cheeselee@fedoraproject.org> - 2.9.0-1
6190e95
- Update to 2.9.0 (#689762)
6190e95
- Exclude the tests
6190e95
1b7732a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.0-5
1b7732a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
1b7732a
8591965
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.8.0-4
8591965
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
8591965
67a7888
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-3
67a7888
- Workaround of installation
67a7888
be3c13d
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-2
be3c13d
- Retag
be3c13d
be3c13d
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-1
be3c13d
- 2.8.0
be3c13d
- BR: python-zope-testing removed
be3c13d
- More docs included
be3c13d
b07fcdd
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
b07fcdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b07fcdd
530f40f
* Thu Jun 18 2009 Conrad Meyer <konrad@tylerc.org> - 2.7.1-1
530f40f
- New version.
530f40f
ea98903
* Sun Dec 14 2008 Conrad Meyer <konrad@tylerc.org> - 2.6.1-1
ea98903
- Initial package.