File python-jmespath_0.10.0-1.spec of Package jmespath-jmespath.py-0.10.0

%global debug_package %{nil}

Name: python-jmespath
Epoch: 100
Version: 0.10.0
Release: 1%{?dist}
BuildArch: noarch
Summary: JMESPath is a query language for JSON
License: MIT
URL: https://github.com/jmespath/jmespath.py/releases
Source0: %{name}_%{version}.orig.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-setuptools

%description
JMESPath (pronounced "james path") allows you to declaratively specify
how to extract elements from a JSON document.

%prep
%autosetup -T -c -n %{name}_%{version}-%{release}
tar -zx -f %{S:0} --strip-components=1 -C .

%build
%py3_build

%install
%py3_install
find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \;
%fdupes -s %{buildroot}%{python3_sitelib}

%check

%if 0%{?suse_version} > 1500
%package -n python%{python3_version_nodots}-jmespath
Summary: JMESPath is a query language for JSON
Requires: python3
Provides: python3-jmespath = %{epoch}:%{version}-%{release}
Provides: python3dist(jmespath) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-jmespath = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(jmespath) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-jmespath = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(jmespath) = %{epoch}:%{version}-%{release}

%description -n python%{python3_version_nodots}-jmespath
JMESPath (pronounced "james path") allows you to declaratively specify
how to extract elements from a JSON document.

%files -n python%{python3_version_nodots}-jmespath
%license LICENSE.txt
%{_bindir}/jp.py
%{python3_sitelib}/jmespath*
%endif

%if !(0%{?suse_version} > 1500)
%package -n python3-jmespath
Summary: JMESPath is a query language for JSON
Requires: python3
Provides: python3-jmespath = %{epoch}:%{version}-%{release}
Provides: python3dist(jmespath) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-jmespath = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(jmespath) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-jmespath = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(jmespath) = %{epoch}:%{version}-%{release}

%description -n python3-jmespath
JMESPath (pronounced "james path") allows you to declaratively specify
how to extract elements from a JSON document.

%files -n python3-jmespath
%license LICENSE.txt
%{_bindir}/jp.py
%{python3_sitelib}/jmespath*
%endif

%changelog
openSUSE Build Service is sponsored by