Convert to pyproject macros
This commit is contained in:
parent
14bf56624c
commit
368b4843b3
@ -1,14 +1,11 @@
|
|||||||
%global pypi_name PyMySQL
|
Name: python-PyMySQL
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Pure-Python MySQL client library
|
Summary: Pure-Python MySQL client library
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/%{pypi_name}/
|
URL: https://pypi.org/project/pymysql/
|
||||||
Source0: %pypi_source
|
Source: %{pypi_source PyMySQL}
|
||||||
Source1: setup.py
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -18,54 +15,50 @@ to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
|
|||||||
and Jython.
|
and Jython.
|
||||||
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{pypi_name}
|
%package -n python3-PyMySQL
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
||||||
# rsa extra
|
|
||||||
BuildRequires: python%{python3_pkgversion}-cryptography
|
|
||||||
%if ! 0%{?rhel}
|
|
||||||
# ed25519 extra
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pynacl
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{pypi_name}
|
|
||||||
|
%description -n python3-PyMySQL
|
||||||
This package contains a pure-Python MySQL client library. The goal of PyMySQL is
|
This package contains a pure-Python MySQL client library. The goal of PyMySQL is
|
||||||
to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
|
to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython
|
||||||
and Jython.
|
and Jython.
|
||||||
|
|
||||||
|
|
||||||
%{?python_extras_subpkg:%python_extras_subpkg -n python%{python3_pkgversion}-%{pypi_name} -i %{python3_sitelib}/*.egg-info rsa %{?!rhel:ed25519}}
|
%pyproject_extras_subpkg -n python3-PyMySQL rsa %{!?rhel:ed25519}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{pypi_name}-%{version}
|
%autosetup -n PyMySQL-%{version}
|
||||||
rm -rf %{pypi_name}.egg-info
|
|
||||||
# Remove tests files so they are not installed globally.
|
|
||||||
rm -rf tests
|
%generate_buildrequires
|
||||||
cp %{SOURCE1} .
|
%pyproject_buildrequires -x rsa %{!?rhel:-x ed25519}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files pymysql
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Tests cannot be launch on koji, they require a mysqldb running.
|
# Tests cannot be launch on koji, they require a mysqldb running.
|
||||||
%py3_check_import pymysql
|
%pyproject_check_import
|
||||||
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
%files -n python3-PyMySQL -f %{pyproject_files}
|
||||||
%license LICENSE
|
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
|
|
||||||
%{python3_sitelib}/pymysql/
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 16 2024 Carl George <carlwgeorge@fedoraproject.org> - 1.1.0-4
|
||||||
|
- Convert to pyproject macros
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user