parent
b1099e579f
commit
df536bf725
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
configobj-4.7.2.zip
|
configobj-4.7.2.zip
|
||||||
|
/configobj-5.0.5.tar.gz
|
||||||
|
/configobj-5.0.5-tests.tar.gz
|
||||||
|
|||||||
@ -2,20 +2,33 @@
|
|||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%global with_python3 1
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-configobj
|
Name: python-configobj
|
||||||
Version: 4.7.2
|
Version: 5.0.5
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Config file reading, writing, and validation
|
Summary: Config file reading, writing, and validation
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://www.voidspace.org.uk/python/configobj.html
|
URL: http://configobj.readthedocs.org/
|
||||||
Source0: http://www.voidspace.org.uk/downloads/configobj-%{version}.zip
|
Source0: https://pypi.python.org/packages/source/c/configobj/configobj-%{version}.tar.gz
|
||||||
|
# to get tests
|
||||||
|
# git clone https://github.com/DiffSK/configobj.git && cd configobj
|
||||||
|
# git checkout v5.0.5
|
||||||
|
# tar -czf configobj-5.0.5-tests.tar.gz tests/ test_configobj.py
|
||||||
|
Source1: configobj-%{version}-tests.tar.gz
|
||||||
Patch0: configobj-import-all-fix.patch
|
Patch0: configobj-import-all-fix.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python-six
|
||||||
|
BuildRequires: pytest
|
||||||
|
|
||||||
|
Requires: python-six
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ConfigObj is a simple but powerful config file reader and writer: an ini file
|
ConfigObj is a simple but powerful config file reader and writer: an ini file
|
||||||
@ -36,32 +49,105 @@ It has lots of other features though:
|
|||||||
* Full Unicode support
|
* Full Unicode support
|
||||||
* A powerful unrepr mode for storing basic datatypes
|
* A powerful unrepr mode for storing basic datatypes
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-configobj
|
||||||
|
Summary: Config file reading, writing, and validation for Python 3
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-six
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
|
||||||
|
Requires: python3-six
|
||||||
|
|
||||||
|
%description -n python3-configobj
|
||||||
|
ConfigObj is a simple but powerful config file reader and writer: an ini file
|
||||||
|
round tripper. Its main feature is that it is very easy to use, with a
|
||||||
|
straightforward programmer's interface and a simple syntax for config files.
|
||||||
|
It has lots of other features though:
|
||||||
|
* Nested sections (subsections), to any level
|
||||||
|
* List values
|
||||||
|
* Multiple line values
|
||||||
|
* String interpolation (substitution)
|
||||||
|
* Integrated with a powerful validation system
|
||||||
|
o including automatic type checking/conversion
|
||||||
|
o repeated sections
|
||||||
|
o and allowing default values
|
||||||
|
* All comments in the file are preserved
|
||||||
|
* The order of keys/sections is preserved
|
||||||
|
* No external dependencies
|
||||||
|
* Full Unicode support
|
||||||
|
* A powerful unrepr mode for storing basic datatypes
|
||||||
|
|
||||||
|
This package ships Python 3 build of configobj.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n configobj-%{version}
|
%setup -q -n configobj-%{version}
|
||||||
%patch0 -p1 -b .all
|
%patch0 -p1 -b .all
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
|
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PYTHONPATH="%{buildroot}/%{python_sitelib}"
|
# this needs to be set for tests.test_configobj.test_options_deprecation
|
||||||
%{__python} tests/test_configobj.py
|
export PYTHONWARNINGS=always
|
||||||
|
|
||||||
|
tar -xzf %{SOURCE1}
|
||||||
|
%{__python} test_configobj.py
|
||||||
|
py.test tests
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
tar -xzf %{SOURCE1}
|
||||||
|
%{__python3} test_configobj.py
|
||||||
|
py.test-%{python3_version} tests
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
# no docs untile upstream puts them in sdist again:
|
||||||
|
# https://github.com/DiffSK/configobj/issues/63
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc docs/*
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-configobj
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 26 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 5.0.5-1
|
||||||
|
- Updated to 5.0.5 (new upstream "with the blessing of original creator")
|
||||||
|
- Introduced python3-configobj subpackage
|
||||||
|
- Changed upstream url to documentation written by new upstream
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-8
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.7.2-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user