2021-05-24 11:46:11 +08:00
|
|
|
%global srcname FormEncode
|
|
|
|
|
Name: python-%{srcname}
|
2022-08-08 19:48:32 +08:00
|
|
|
Version: 2.0.1
|
2021-05-24 11:46:11 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: HTML form validation, generation, and convertion package
|
|
|
|
|
License: MIT and Python
|
|
|
|
|
URL: http://formencode.org/
|
2022-08-08 19:48:32 +08:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/F/%{srcname}/%{srcname}-%{version}.tar.gz
|
2021-05-24 11:46:11 +08:00
|
|
|
BuildArch: noarch
|
2022-08-08 19:48:32 +08:00
|
|
|
BuildRequires: python3-pip
|
2021-05-24 11:46:11 +08: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.
|
|
|
|
|
|
|
|
|
|
%package -n python3-formencode
|
|
|
|
|
Summary: HTML form validation, generation, and convertion package
|
|
|
|
|
BuildRequires: python3-devel python3-setuptools python3-docutils
|
2022-08-08 19:48:32 +08:00
|
|
|
BuildRequires: python3-setuptools_scm
|
2021-05-24 11:46:11 +08:00
|
|
|
Requires: python3-setuptools python-formencode-langpacks
|
|
|
|
|
%{?python_provide:%python_provide python3-formencode}
|
|
|
|
|
%description -n python3-formencode
|
|
|
|
|
FormEncode validates and converts nested structures. It allows for a
|
|
|
|
|
declarative form of defining the validation, and decoupled processes
|
|
|
|
|
for filling and generating forms.
|
|
|
|
|
This package contains the python3 version of the module.
|
|
|
|
|
|
|
|
|
|
%package -n python-formencode-langpacks
|
|
|
|
|
Summary: Locale files for the python-formencode library
|
|
|
|
|
%description -n python-formencode-langpacks
|
|
|
|
|
The FormEncode library validates and converts nested structures. This package
|
|
|
|
|
contains the locale files for localizing the message strings in code within the
|
|
|
|
|
library.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-08-08 19:48:32 +08:00
|
|
|
%autosetup -n %{srcname}-%{version} -p1
|
2021-05-24 11:46:11 +08:00
|
|
|
|
|
|
|
|
%build
|
2022-08-08 19:48:32 +08:00
|
|
|
sed -i "s|'setuptools_scm_git_archive',||" setup.py
|
2021-05-24 11:46:11 +08:00
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{python3_sitelib}/docs/
|
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib}/formencode/i18n
|
|
|
|
|
pushd formencode
|
|
|
|
|
cp -arf i18n/* $RPM_BUILD_ROOT%{python3_sitelib}/formencode/i18n
|
|
|
|
|
popd
|
|
|
|
|
for file in $RPM_BUILD_ROOT%{python3_sitelib}/formencode/i18n/* ; do
|
|
|
|
|
if [ -d $file ] ; then
|
|
|
|
|
if [ -e $file/LC_MESSAGES/%{srcname}.mo ] ; then
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/`basename $file`/LC_MESSAGES/
|
|
|
|
|
mv $file/LC_MESSAGES/%{srcname}.mo $RPM_BUILD_ROOT%{_datadir}/locale/`basename $file`/LC_MESSAGES/
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{python3_sitelib}/formencode/i18n
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/LICENSE.txt
|
|
|
|
|
%find_lang %{srcname}
|
|
|
|
|
|
|
|
|
|
%files -n python3-formencode
|
|
|
|
|
%doc FormEncode.egg-info/PKG-INFO LICENSE.txt docs
|
|
|
|
|
%{python3_sitelib}/formencode/
|
|
|
|
|
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
|
|
|
|
|
|
|
|
|
|
%files -n python-formencode-langpacks -f %{srcname}.lang
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-08-08 19:48:32 +08:00
|
|
|
* Mon Aug 8 2022 caodongxia <caodongxia@h-partners.com> - 2.0.1-1
|
|
|
|
|
- Update to 2.0.1
|
|
|
|
|
|
2021-05-24 11:46:11 +08:00
|
|
|
* Wed May 26 2021 Ge Wang <wangge20@huawei.com> - 2.0.0-1
|
|
|
|
|
- Package init
|