15
0

Accepting request 305462 from home:benoit_monin:branches:devel:languages:python

- update to version 1.3.0
- add fdupes as BuildRequires and call it after install
- fix end of line of README.rst
- remove chmod of msgfmt.py: file deleted upstream
- install html documentation in the docdir of the main package
- do not install PKG-INFO in the documentation: already provided by the egg-info

OBS-URL: https://build.opensuse.org/request/show/305462
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=11
This commit is contained in:
Jan Matejek
2015-05-07 11:54:26 +00:00
committed by Git OBS Bridge
parent fadea04616
commit 74cef21394
4 changed files with 40 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-FormEncode
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-FormEncode
Version: 1.2.6
Version: 1.3.0
Release: 0
Url: http://formencode.org
Summary: HTML form validation, generation, and conversion package
@@ -26,6 +26,7 @@ Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/F/FormEncode/FormEncode-%{version}.zip
Source1: FormEncode-doc-infrastructure.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: unzip
@@ -56,7 +57,7 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n FormEncode-%{version} -a1
find . -name \*.txt -exec sed -i 's/\r$//g' {} \;
sed -i 's/\r$//g' PKG-INFO formencode/i18n/msgfmt.py
sed -i 's/\r$//g' PKG-INFO README.rst
%build
python setup.py build
@@ -64,15 +65,24 @@ python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod 755 %{buildroot}%{python_sitelib}/formencode/i18n/msgfmt.py
# install documentation
rm -r %{buildroot}/%{python_sitelib}/docs # remove misplaced documentation
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -r README.rst build/sphinx/html %{buildroot}%{_docdir}/%{name}/
%fdupes %{buildroot}/%{_prefix}
%files
%defattr(-,root,root,-)
%doc PKG-INFO README.txt
%exclude %{_docdir}/%{name}/html
%doc %dir %{_docdir}/%{name}/
%doc %{_docdir}/%{name}/README.rst
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc build/sphinx/html/
%doc %dir %{_docdir}/%{name}/html
%doc %{_docdir}/%{name}/html/*
%changelog