%global srcname py-deviceid %global tarball_name py_deviceid Name: python-%{srcname} Version: 0.1.1 Release: %autorelease Summary: py-deviceid provides a device ID for a given system License: MIT URL: https://pypi.org/project/%{srcname}/ Source0: %{pypi_source %{tarball_name} %{version}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools %global _description %{expand: py-deviceid provides a device ID for a given system, based on the DevDeviceId specification.} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{tarball_name}-%{version} # Strip CRLF line endings find . -type f -exec sed -i 's/\r$//' "{}" ";" # Fixed in https://github.com/microsoft/py-deviceid/pull/14 # Applying patches is annoying due to line endings echo "build-backend = \"setuptools.build_meta\"" >> pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l deviceid %check %pyproject_check_import %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog %autochangelog