%global srcname platformdirs %global common_description %{expand: A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".} Name: python-%{srcname} Version: 2.3.0 Release: 1 Summary: Python module for determining appropriate platform-specific dirs License: MIT URL: https://github.com/platformdirs/platformdirs Source0: https://files.pythonhosted.org/packages/e2/d4/c6ffe89de09851892b1418dc22f6ab019b7b6f362532ab813c262e1722bb/platformdirs-2.3.0.tar.gz Patch0: fix-pkg-version.patch BuildArch: noarch BuildRequires: python3-pytest python3-pytest-mock python3-coverage python3-appdirs python3-pip %description %{common_description} %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel %{?python_provide:%python_provide python3-platformdirs} %description -n python3-%{srcname} %{common_description} %prep %autosetup -n %{srcname}-%{version} -p1 cp -r src/platformdirs tests/ cp -r src/platformdirs ./ %build %py3_build %install %py3_install %check /usr/bin/pytest %files -n python3-%{srcname} %license LICENSE.txt %doc README.rst CHANGES.rst %{python3_sitelib}/platformdirs-*.egg-info/ %{python3_sitelib}/platformdirs %changelog * Wed Apr 27 2022 caodongxia - 2.3.0-1 - init package