[python-jmespath] Import python-jmespath-0.4.1-2.fc21.src.rpm
Lubomir Rintel
lkundrak at fedoraproject.org
Wed Jul 30 10:07:13 UTC 2014
commit 947843a08ccdfaa454adbea3672f9b0c56d3f9ba
Author: Lubomir Rintel <lkundrak at v3.sk>
Date: Wed Jul 30 12:07:00 2014 +0200
Import python-jmespath-0.4.1-2.fc21.src.rpm
.gitignore | 1 +
python-jmespath.spec | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..78de669 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/jmespath-0.4.1.tar.gz
diff --git a/python-jmespath.spec b/python-jmespath.spec
new file mode 100644
index 0000000..5e28e11
--- /dev/null
+++ b/python-jmespath.spec
@@ -0,0 +1,107 @@
+%if 0%{?fedora} > 12
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
+Name: python-jmespath
+Version: 0.4.1
+Release: 2%{?dist}
+Summary: JSON Matching Expressions
+Group: System Environment/Libraries
+
+License: ASL 2.0
+URL: https://github.com/boto/jmespath
+Source0: https://pypi.python.org/packages/source/j/jmespath/jmespath-%{version}.tar.gz
+
+BuildArch: noarch
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+%if %with python3
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+
+%description
+JMESPath allows you to declaratively specify how to extract elements from
+a JSON document.
+
+This package contains the library for Python 2.
+
+
+%package -n python3-jmespath
+Summary: JSON Matching Expressions
+Group: System Environment/Libraries
+
+%description -n python3-jmespath
+JMESPath allows you to declaratively specify how to extract elements from
+a JSON document.
+
+This package contains the library for Python 3.
+
+
+%prep
+%setup -q -n jmespath-%{version}
+
+%if %with python3
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' |xargs sed -i 's|^#!.*python|#!%{__python3}|'
+%endif
+
+find -name '*.py' |xargs sed -i 's|^#!.*python|#!%{__python2}|'
+
+
+%build
+%if %with python3
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+%{__python2} setup.py build
+
+
+%install
+%if %with python3
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+mv %{buildroot}%{_bindir}/{,python3-}jp
+popd
+%endif
+
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+
+
+%check
+%if %with python3
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif
+
+%{__python2} setup.py test
+
+
+%files
+%{python2_sitelib}/*
+%{_bindir}/jp
+%doc README.rst
+%doc LICENSE.txt
+
+
+%if %with python3
+%files -n python3-jmespath
+%{python3_sitelib}/*
+%{_bindir}/python3-jp
+%doc README.rst
+%doc LICENSE.txt
+%endif
+
+
+%changelog
+* Fri Jul 25 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.4.1-2
+- Add Python 3 support
+
+* Fri Jul 25 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.4.1-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..2261f8a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a11ae39472672a650dfb55feab7d65eb jmespath-0.4.1.tar.gz
More information about the scm-commits
mailing list