%global pypi_name jmespath Name: python-%{pypi_name} Version: 1.0.1 Release: %autorelease Summary: JSON Matching Expressions License: MIT URL: https://github.com/jmespath/jmespath.py Source0: %{url}/archive/%{version}/jmespath.py-%{version}.tar.gz BuildArch: noarch %description JMESPath allows you to declaratively specify how to extract elements from a JSON document. %package -n python3-%{pypi_name} Summary: JSON Matching Expressions %{?python_provide:%python_provide python3-%{pypi_name}} %{?python_provide:%python_provide python-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest %if %{undefined rhel} BuildRequires: python3-hypothesis %endif Obsoletes: python2-jmespath < 0.9.4-2 %description -n python3-%{pypi_name} JMESPath allows you to declaratively specify how to extract elements from a JSON document. %prep %setup -q -n jmespath.py-%{version} rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %check # RHEL does not have python3-hypothesis. Only one file in the upstream repo # depends on hypothesis, so we can omit this dependency for RHEL. %pytest %{?rhel:--ignore=extra/test_hypothesis.py} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE.txt %{_bindir}/jp.py %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog %autochangelog