]> git.pld-linux.org Git - packages/python3-sqlparse.git/blame - python3-sqlparse.spec
rebuild with tests and docs
[packages/python3-sqlparse.git] / python3-sqlparse.spec
CommitLineData
174bd39f
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
174bd39f
JB
5
6Summary: Non-validating SQL parser
7Summary(pl.UTF-8): Parser SQL bez kontroli poprawności
9ef95864
JB
8Name: python3-sqlparse
9Version: 0.4.1
9819b163 10Release: 4
174bd39f
JB
11License: BSD
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/sqlparse/
14Source0: https://files.pythonhosted.org/packages/source/s/sqlparse/sqlparse-%{version}.tar.gz
9ef95864 15# Source0-md5: eebbc6b5f1033054873033e54b0c1266
174bd39f 16URL: https://pypi.org/project/sqlparse/
9ef95864 17BuildRequires: python3-modules >= 1:3.5
174bd39f
JB
18BuildRequires: python3-setuptools
19%if %{with tests}
20BuildRequires: python3-pytest
21%endif
174bd39f
JB
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.714
24%if %{with doc}
25BuildRequires: sphinx-pdg
26%endif
9ef95864 27Requires: python3-modules >= 1:3.5
174bd39f
JB
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32sqlparse is a non-validating SQL parser for Python. It provides
33support for parsing, splitting and formatting SQL statements.
34
35%description -l pl.UTF-8
36sqlparse to parser SQL dla Pythona nie sprawdzający poprawnosci.
37Obsługuje analizę, podział i formatowanie zapytań SQL.
38
174bd39f
JB
39%package apidocs
40Summary: API documentation for Python sqlparse module
41Summary(pl.UTF-8): Dokumentacja API modułu Pythona sqlparse
42Group: Documentation
43
44%description apidocs
45API documentation for Python sqlparse module.
46
47%description apidocs -l pl.UTF-8
48Dokumentacja API modułu Pythona sqlparse.
49
50%prep
51%setup -q -n sqlparse-%{version}
52
53%build
174bd39f
JB
54%py3_build
55
56%if %{with tests}
57PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
58%{__python3} -m pytest tests
59%endif
174bd39f
JB
60
61%if %{with doc}
62%{__make} -C docs html
63%endif
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
174bd39f
JB
68%py3_install
69
70%{__mv} $RPM_BUILD_ROOT%{_bindir}/{sqlformat,sqlformat-3}
71ln -s sqlformat-3 $RPM_BUILD_ROOT%{_bindir}/sqlformat
72install -Dp docs/sqlformat.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlformat-3.1
73echo '.so sqlformat-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/sqlformat.1
174bd39f
JB
74
75%clean
76rm -rf $RPM_BUILD_ROOT
77
174bd39f
JB
78%files
79%defattr(644,root,root,755)
80%doc AUTHORS CHANGELOG LICENSE README.rst TODO
174bd39f
JB
81%attr(755,root,root) %{_bindir}/sqlformat
82%attr(755,root,root) %{_bindir}/sqlformat-3
83%{py3_sitescriptdir}/sqlparse
84%{py3_sitescriptdir}/sqlparse-%{version}-py*.egg-info
85%{_mandir}/man1/sqlformat.1*
86%{_mandir}/man1/sqlformat-3.1*
174bd39f
JB
87
88%if %{with doc}
89%files apidocs
90%defattr(644,root,root,755)
91%doc docs/build/html/{_static,*.html,*.js}
92%endif
This page took 0.242284 seconds and 4 git commands to generate.