## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # tests need internet connection, see similar case here: # https://bugzilla.redhat.com/show_bug.cgi?id=864464#c15 # To build with tests, run rpmbuild --with tests -ba %bcond_with tests %global shortname sqlparse Name: python-%{shortname} Version: 0.4.4 Release: %autorelease Summary: Non-validating SQL parser for Python License: BSD URL: https://github.com/andialbrecht/%{shortname} Source0: https://github.com/andialbrecht/%{shortname}/archive/%{version}/%{shortname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel %if %{with tests} BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-cov) %endif %global _description\ sqlparse is a tool for parsing SQL strings. It can generate pretty-printed\ renderings of SQL in various formats.\ \ It is a python module, together with a command-line tool. %description %_description %package -n python%{python3_pkgversion}-%{shortname} Summary: Non-validating SQL parser for Python %description -n python%{python3_pkgversion}-%{shortname} sqlparse is a tool for parsing SQL strings. It can generate pretty-printed renderings of SQL in various formats. It is a python module, together with a command-line tool. %prep %autosetup -n %{shortname}-%{version} # Remove shebangs from non-executable files. sed -i '\|/usr/bin/env python|d' sqlparse/{__main__,cli}.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files sqlparse %if %{with tests} %check %pytest %endif %files -n python3-%{shortname} -f %{pyproject_files} %license LICENSE %doc AUTHORS CHANGELOG README.rst %{_bindir}/sqlformat %changelog * Tue May 16 2023 Major Hayden 0.4.4-2 - Migrate to rpmautospec * Tue May 16 2023 Major Hayden 0.4.4-1 - Update to 0.4.4 rhbz#2129484 * Tue May 16 2023 Major Hayden 0.4.2-6 - Migrate to pyproject-rpm-macros * Fri Jan 20 2023 Fedora Release Engineering 0.4.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 0.4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint 0.4.2-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering 0.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Dec 17 2021 Honza Horak 0.4.2-1 - Update to 0.4.2 * Fri Jul 23 2021 Fedora Release Engineering 0.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 03 2021 Python Maint 0.4.1-2 - Rebuilt for Python 3.10 * Fri Jan 29 2021 Joel Capitao 0.4.1-1 - Update to 0.4.1 * Wed Jan 27 2021 Fedora Release Engineering 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jan 12 2021 Honza Horak 0.3.1-1 - Revert "Update to 0.4.1" * Fri Nov 20 2020 Joel Capitao 0.4.1-1 - Update to 0.4.1 * Wed Jul 29 2020 Fedora Release Engineering 0.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sat May 23 2020 Miro Hrončok 0.3.1-2 - Rebuilt for Python 3.9 * Sun Mar 01 2020 Terje Rosten 0.3.1-1 - Update to sqlparse 0.3.1 * Thu Jan 30 2020 Fedora Release Engineering 0.2.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok 0.2.4-10 - Rebuilt for Python 3.8.0rc1 (#1748018) * Fri Aug 16 2019 Miro Hrončok 0.2.4-9 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering 0.2.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Mar 18 2019 Marc Dequènes (Duck) 0.2.4-7 - Adaptations to build Python 3 on EPEL * Sat Feb 02 2019 Fedora Release Engineering 0.2.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Jan 28 2019 Igor Gnatenko 0.2.4-5 - Remove obsolete Group tag * Mon Jan 14 2019 Miro Hrončok 0.2.4-4 - Subpackage python2-sqlparse has been removed * Sat Jul 14 2018 Fedora Release Engineering 0.2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Sat Jun 16 2018 Miro Hrončok 0.2.4-2 - Rebuilt for Python 3.7 * Tue Apr 24 2018 Honza Horak 0.2.4-1 - new version * Mon Feb 12 2018 Iryna Shcherbina 0.2.2-6 - Update Python 2 dependency declarations to new packaging standards * Fri Feb 09 2018 Fedora Release Engineering 0.2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek 0.2.2-4 - Python 2 binary package renamed to python2-sqlparse * Thu Jul 27 2017 Fedora Release Engineering 0.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering 0.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Jan 23 2017 Fabio Alessandro Locati 0.2.2-1 - Update to 0.2.2 * Mon Dec 12 2016 Charalampos Stratakis 0.2.1-2 - Rebuild for Python 3.6 * Sat Aug 27 2016 Fabio Alessandro Locati 0.2.1-1 - Update to 0.2.1 * Sun Jul 31 2016 Honza Horak 0.2.0-1 - Update to 0.2 (rhbx#1360756) * Fri Jul 08 2016 Honza Horak 0.1.19-1 - Update to 0.1.19 (#1315292) * Thu Feb 04 2016 Fedora Release Engineering 0.1.18-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Nov 12 2015 Peter Robinson 0.1.18-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Nov 05 2015 Toshio Kuratomi 0.1.18-3 - Do not include the sqlformat script in the python-sqlparse package, * Tue Nov 03 2015 Robert Kuska 0.1.18-2 - Rebuilt for Python3.5 rebuild * Fri Oct 30 2015 Honza Horak 0.1.18-1 - Update to 0.1.18 (#1275044) * Fri Sep 18 2015 Honza Horak 0.1.16-1 - New upstream release 0.1.16 * Thu Jun 18 2015 Dennis Gilmore 0.1.11-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Dennis Gilmore 0.1.11-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue May 27 2014 Kalev Lember 0.1.11-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Mon May 12 2014 Honza Horak 0.1.11-2 - Add python3 package * Mon May 12 2014 Honza Horak 0.1.11-1 - Rebase to 0.1.11 Change the upstream URL * Sun Aug 04 2013 Dennis Gilmore 0.1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Dennis Gilmore 0.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Dennis Gilmore 0.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Dennis Gilmore 0.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri Jun 03 2011 David Malcolm 0.1.2-1 - 0.1.2 * Wed Feb 09 2011 Dennis Gilmore 0.1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jul 29 2010 Fedora Release Engineering 0.1.1-6 - dist-git conversion * Thu Jul 22 2010 dmalcolm 0.1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Wed Nov 25 2009 Bill Nottingham 0.1.1-4 - Fix typo that causes a failure to update the common directory. (releng #2781) * Sun Jul 26 2009 Jesse Keating 0.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Jun 10 2009 dmalcolm 0.1.1-2 - bump release to enable build * Wed Jun 10 2009 dmalcolm 0.1.1-1 - Initial commit