## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname openapi-spec-validator %global modname openapi_spec_validator Name: python-%{srcname} Version: 0.4.0 Release: %autorelease Summary: Python library for OpenAPI specs validation License: Apache-2.0 URL: https://github.com/python-openapi/%{srcname} # The GitHub archive has the tests; the PyPI sdist does not. Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz # Add a “network” mark to skip tests that do not work offline. This is present # upstream in later releases. Patch by Martin Wolf: # https://bugzilla.redhat.com/show_bug.cgi?id=2175936#c1 # https://bugzilla-attachments.redhat.com/attachment.cgi?id=1948536 Patch: python-openapi-spec-validator-0.4.0-pytest-not-network.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) %global _description %{expand: OpenAPI Spec Validator is a Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification. The validator aims to check for full compliance with the Specification.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %pyproject_extras_subpkg -n python3-%{srcname} requests %prep %autosetup -p1 -n %{srcname}-%{version} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i '/^--cov[-=]/d' pyproject.toml %generate_buildrequires %pyproject_buildrequires -x requests %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{modname} %check %pytest -m 'not network' %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE %doc README.rst %{_bindir}/%{srcname} %changelog ## START: Generated by rpmautospec * Thu Mar 09 2023 Mattia Verga - 0.4.0-1 - Initial package for EPEL9 (close RHBZ#2175936) ## END: Generated by rpmautospec