diff --git a/python-sqlparse.spec b/python-sqlparse.spec index bc8cd5954e72db96805a2adf753ae62b66827110..8f7e974a17f3fbb8a3b859e6f9907a7711c93e2f 100644 --- a/python-sqlparse.spec +++ b/python-sqlparse.spec @@ -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 - 0.4.3-1 - Update package to version 0.4.3 diff --git a/sqlparse-0.4.3.tar.gz b/sqlparse-0.4.3.tar.gz deleted file mode 100644 index d1b8e43dcc06d37520dce895db72f01cf864a667..0000000000000000000000000000000000000000 Binary files a/sqlparse-0.4.3.tar.gz and /dev/null differ diff --git a/sqlparse-0.4.4.tar.gz b/sqlparse-0.4.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..03e1c3f053c3425dc5d4f54bfa0a661b1076f08c Binary files /dev/null and b/sqlparse-0.4.4.tar.gz differ