Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 0d8cc2df5b94096d37021dfe43cbc417 > files > 2

python-jmespath-0.9.4-1.2.mga6.src.rpm

%define upstream_name jmespath

Name: python-%{upstream_name}
Version: 0.9.4
%define subrel 2
Release: %mkrel 1
License: Public Domain
Summary: JMESPath is a query language for JSON
Group: Development/Python
URL: https://github.com/jmespath/jmespath.py
Source: https://files.pythonhosted.org/packages/source/j/jmespath/jmespath-%{version}.tar.gz
Obsoletes: python-jmespath < 0.9.4
Provides: python-jmespath = %{version}-%{release}
BuildRequires:  pkgconfig(python2)
BuildRequires: python-setuptools
BuildArch: noarch

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

For example, given this document:

{"foo": {"bar": "baz"}}

The jmespath expression foo.bar will return "baz".

%package -n python3-%{upstream_name}
License: Public Domain
Summary: JMESPath is a query language for JSON
Group: Development/Python
Conflicts: python-jmespath < 0.9.4
BuildRequires:  pkgconfig(python3)

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

For example, given this document:

{"foo": {"bar": "baz"}}

The jmespath expression foo.bar will return "baz".

%prep
%setup -q -n %{upstream_name}-%{version}
cp -a . %{py3dir}

%build
CFLAGS="%{optflags}" %{__python} setup.py build
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd

%install
%{__python} setup.py install -O2 --skip-build --root=%{buildroot} --prefix=%{_prefix}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd

%files
%{_bindir}/jp.py
%license LICENSE.txt
%{python2_sitelib}/*

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


%changelog
* Sat Aug 24 2019 bcornec <bcornec> 0.9.4-1.2.mga6
+ Revision: 1431765
- remove python2 pkg for python-jmespath
- adds jmespath-0.9.4 to mga6
- Adds python-jmespath package to mga6