%global srcname pyftpdlib %global desc %{expand: \ Python FTP server library provides a high-level portable interface to easily write very efficient, scalable and asynchronous FTP servers with Python. It is the most complete RFC-959 FTP server implementation available for Python programming language.} Name: python-%{srcname} Version: 1.5.7 Release: %autorelease Summary: Extremely fast and scalable Python FTP server library License: MIT URL: https://github.com/giampaolo/pyftpdlib Source0: %{url}/archive/release-%{version}/%{srcname}-%{version}.tar.gz Source1: keycert.pem BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-psutil BuildRequires: python3-pyOpenSSL Provides: %{srcname} = %{version}-%{release} Obsoletes: %{srcname} < %{version}-%{release} %description %{desc} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{desc} %{desc} %prep %autosetup -n %{srcname}-release-%{version} cp %{SOURCE1} pyftpdlib/test # do not copy the test folder sed -i "s/, 'pyftpdlib.test'//" setup.py # non-executable-script sed -i '/env python/d' pyftpdlib/_compat.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check %pytest -v -k 'not TestCommandLineParser' %files -n python3-%{srcname} -f %{pyproject_files} %doc HISTORY.rst README.rst %{_bindir}/ftpbench %changelog %autochangelog