%global pypi_name pymaven-patch %global pypi_name_with_underscore %(echo "%{pypi_name}" | sed "s/-/_/g") %global github_name pymaven Name: python-%{pypi_name} Version: 0.3.0 Release: %autorelease Summary: Library for working with Maven repositories via Python License: Apache-2.0 URL: https://github.com/nexB/pymaven Source: %URL/archive/%{version}/%{github_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(py) %global common_description %{expand: Pymaven is a Python library for interfacing with the Maven build system. There are two major interfaces: - pymaven.client provides a basic Maven repository client - pymaven.pom provides a Pom object that can provide progromatic access to a maven pom file} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %prep %autosetup -p1 -n %{github_name}-%{version} %generate_buildrequires export PBR_VERSION=%{version} %pyproject_buildrequires -t %build export PBR_VERSION=%{version} %pyproject_wheel %install %pyproject_install %pyproject_save_files pymaven %check %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %doc CHANGELOG.rst README.rst %license LICENSE %changelog %autochangelog