!23 Update package to version 0.4.4

From: @wk333 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
This commit is contained in:
openeuler-ci-bot 2023-05-04 08:53:24 +00:00 committed by Gitee
commit 12193ba6ad
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 19 additions and 41 deletions

View File

@ -1,11 +1,13 @@
%global _empty_manifest_terminate_build 0
%global shortname sqlparse
Name: python-sqlparse
Version: 0.4.3
Version: 0.4.4
Release: 1
Summary: A non-validating SQL parser.
License: BSD-3-Clause
URL: https://github.com/andialbrecht/sqlparse
Source0: https://files.pythonhosted.org/packages/ba/fa/5b7662b04b69f3a34b8867877e4dbf2a37b7f2a5c0bbb5a9eed64efd1ad1/sqlparse-0.4.3.tar.gz
Source0: https://github.com/andialbrecht/%{shortname}/archive/%{version}/%{shortname}-%{version}.tar.gz
BuildArch: noarch
%description
@ -14,6 +16,7 @@ A non-validating SQL parser.
%package -n python3-sqlparse
Summary: A non-validating SQL parser.
Provides: python-sqlparse
Obsoletes: python-sqlparse-help < 0.4.4
# Base build requires
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -21,61 +24,36 @@ BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-pytest
BuildRequires: python3-flit
%description -n python3-sqlparse
A non-validating SQL parser.
%package help
Summary: A non-validating SQL parser.
Provides: python3-sqlparse-doc
%description help
A non-validating SQL parser.
%prep
%autosetup -n sqlparse-%{version}
%build
%py3_build
%pyproject_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%pyproject_install sqlparse==%{version}
%check
%{__python3} -m pytest
%files -n python3-sqlparse -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%files -n python3-sqlparse
%{python3_sitelib}/*
%doc AUTHORS CHANGELOG README.rst
%license LICENSE
%{_bindir}/sqlformat
%changelog
* Thu May 04 2023 wangkai <13474090681@163.com> - 0.4.4-1
- Update package to version 0.4.4
- Fix CVE-2023-30608
- Compling package with pyproject
- Obsoletes subpackage python-sqlparse-help
* Wed Dec 07 2022 liqiuyu <liqiuyu@kylinos.cn> - 0.4.3-1
- Update package to version 0.4.3

Binary file not shown.

BIN
sqlparse-0.4.4.tar.gz Normal file

Binary file not shown.