2011-09-01 10:46:49 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-FormEncode
|
|
|
|
#
|
2018-12-04 14:28:22 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-09-01 10:46:49 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2013-06-13 10:56:46 +02:00
|
|
|
|
2018-12-04 14:28:22 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-01 10:46:49 +02:00
|
|
|
#
|
|
|
|
|
2013-06-13 10:56:46 +02:00
|
|
|
|
2017-09-05 13:55:26 +02:00
|
|
|
%define oldpython python
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2011-09-01 10:46:49 +02:00
|
|
|
Name: python-FormEncode
|
2015-05-07 13:54:26 +02:00
|
|
|
Version: 1.3.0
|
2011-09-01 10:46:49 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: HTML form validation, generation, and conversion package
|
2012-03-14 14:44:41 +01:00
|
|
|
License: Python-2.0
|
2011-09-01 10:46:49 +02:00
|
|
|
Group: Development/Languages/Python
|
2017-09-05 13:55:26 +02:00
|
|
|
Url: http://formencode.org
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.zip
|
2013-08-19 13:44:42 +02:00
|
|
|
Source1: FormEncode-doc-infrastructure.tar.gz
|
2017-09-05 13:55:26 +02:00
|
|
|
# Documentation requirements:
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2015-05-07 13:54:26 +02:00
|
|
|
BuildRequires: fdupes
|
2017-09-05 13:55:26 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-09-07 17:45:01 +02:00
|
|
|
BuildRequires: python3-Sphinx
|
2013-06-13 10:56:46 +02:00
|
|
|
BuildRequires: unzip
|
2017-09-05 13:55:26 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-03-14 14:44:41 +01:00
|
|
|
BuildArch: noarch
|
2017-09-05 13:55:26 +02:00
|
|
|
%ifpython2
|
|
|
|
Provides: %{oldpython}-formencode = %{version}
|
|
|
|
Obsoletes: %{oldpython}-formencode < %{version}
|
2012-03-14 14:44:41 +01:00
|
|
|
%endif
|
2017-09-05 13:55:26 +02:00
|
|
|
%python_subpackages
|
2011-09-01 10:46:49 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
FormEncode validates and converts nested structures. It allows for
|
|
|
|
a declarative form of defining the validation, and decoupled processes
|
|
|
|
for filling and generating forms.
|
|
|
|
|
2017-09-07 17:45:01 +02:00
|
|
|
%package -n %{name}-doc
|
2013-08-19 13:44:42 +02:00
|
|
|
Summary: HTML form validation, generation, and conversion package
|
|
|
|
Group: Development/Libraries/Python
|
2017-09-07 17:45:01 +02:00
|
|
|
Provides: %{python_module FormEncode-doc = %{version}}
|
2013-08-19 13:44:42 +02:00
|
|
|
|
2017-09-07 17:45:01 +02:00
|
|
|
%description -n %{name}-doc
|
2013-08-19 13:44:42 +02:00
|
|
|
This package contains documentation files for %{name}.
|
|
|
|
|
2011-09-01 10:46:49 +02:00
|
|
|
%prep
|
2013-08-19 13:44:42 +02:00
|
|
|
%setup -q -n FormEncode-%{version} -a1
|
|
|
|
find . -name \*.txt -exec sed -i 's/\r$//g' {} \;
|
2015-05-07 13:54:26 +02:00
|
|
|
sed -i 's/\r$//g' PKG-INFO README.rst
|
2016-03-09 17:23:07 +01:00
|
|
|
sed -i '/^:date:/d' docs/*.txt # fix build-compare
|
2011-09-01 10:46:49 +02:00
|
|
|
|
|
|
|
%build
|
2017-09-05 13:55:26 +02:00
|
|
|
%python_build
|
2017-09-07 17:45:01 +02:00
|
|
|
%{_python_use_flavor python3}
|
|
|
|
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo && mv build/sphinx/html html
|
2011-09-01 10:46:49 +02:00
|
|
|
|
|
|
|
%install
|
2017-09-05 13:55:26 +02:00
|
|
|
%python_install
|
2015-05-07 13:54:26 +02:00
|
|
|
|
|
|
|
# install documentation
|
2017-09-07 17:45:01 +02:00
|
|
|
rm -r %{buildroot}%{python_sitelib}/docs # remove misplaced documentation
|
2015-05-07 13:54:26 +02:00
|
|
|
|
2017-09-07 17:45:01 +02:00
|
|
|
%fdupes %{buildroot}%{_prefix}
|
2011-09-01 10:46:49 +02:00
|
|
|
|
2017-09-05 13:55:26 +02:00
|
|
|
%files %{python_files}
|
2011-09-01 10:46:49 +02:00
|
|
|
%defattr(-,root,root,-)
|
2017-09-07 17:45:01 +02:00
|
|
|
%doc README.rst
|
2011-09-01 10:46:49 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
2017-09-07 17:45:01 +02:00
|
|
|
%files -n %{name}-doc
|
2013-08-19 13:44:42 +02:00
|
|
|
%defattr(-,root,root,-)
|
2017-09-07 17:45:01 +02:00
|
|
|
%doc html
|
2013-08-19 13:44:42 +02:00
|
|
|
|
2011-09-01 10:46:49 +02:00
|
|
|
%changelog
|