]> git.pld-linux.org Git - packages/python-PyMySQL.git/blame - python-PyMySQL.spec
rebuild with tests and docs
[packages/python-PyMySQL.git] / python-PyMySQL.spec
CommitLineData
84ff5ff0
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module PyMySQL
8457718a 8Summary: Pure Python MySQL Client
84ff5ff0
ER
9Name: python-%{module}
10Version: 0.7.4
2e17a808 11Release: 8
8457718a
AM
12License: MIT
13Group: Libraries/Python
84ff5ff0
ER
14Source0: https://github.com/PyMySQL/PyMySQL/archive/%{version}/%{module}-%{version}.tar.gz
15# Source0-md5: e5d21154a71e5f6e73bcb3fd7659c642
16URL: https://github.com/PyMySQL/PyMySQL
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.714
19%if %{with python2}
8457718a
AM
20BuildRequires: python-modules
21BuildRequires: python-setuptools
84ff5ff0
ER
22%endif
23%if %{with python3}
24BuildRequires: python3-modules
25BuildRequires: python3-setuptools
26%endif
27Requires: python-modules
8457718a
AM
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32This package contains a pure-Python MySQL client library.
33
84ff5ff0
ER
34The goal of PyMySQL is to be a drop-in replacement for MySQLdb and
35work on CPython, PyPy and IronPython.
36
37%package -n python3-%{module}
38Summary: Pure Python MySQL Client
39Group: Libraries/Python
40Requires: python3-modules
41
42%description -n python3-%{module}
43This package contains a pure-Python MySQL client library.
44
45The goal of PyMySQL is to be a drop-in replacement for MySQLdb and
46work on CPython, PyPy and IronPython.
8457718a
AM
47
48%prep
49%setup -q -n PyMySQL-%{version}
50
51%build
84ff5ff0
ER
52%if %{with python2}
53%py_build %{?with_tests:test}
54%endif
55
56%if %{with python3}
57%py3_build %{?with_tests:test}
58%endif
8457718a
AM
59
60%install
61rm -rf $RPM_BUILD_ROOT
84ff5ff0 62%if %{with python2}
88141fab 63%py_install
44715f5b 64%py_postclean
84ff5ff0
ER
65%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pymysql/tests
66%endif
67
68%if %{with python3}
69%py3_install
70%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pymysql/tests
71%endif
8457718a
AM
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
84ff5ff0 76%if %{with python2}
8457718a
AM
77%files
78%defattr(644,root,root,755)
84ff5ff0 79%doc README.rst CHANGELOG LICENSE
8457718a 80%{py_sitescriptdir}/pymysql
84ff5ff0
ER
81%{py_sitescriptdir}/PyMySQL-%{version}-py*.egg-info
82%endif
83
84%if %{with python3}
85%files -n python3-%{module}
86%defattr(644,root,root,755)
87%doc README.rst CHANGELOG LICENSE
88%{py3_sitescriptdir}/pymysql
89%{py3_sitescriptdir}/PyMySQL-%{version}-py*.egg-info
90%endif
This page took 0.174349 seconds and 4 git commands to generate.