commit 892d4f8d1bcd8a21a6cd2607267c7e8764005f65 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:15:06 2019 -0400 Package init diff --git a/jsonpointer-1.10.tar.gz b/jsonpointer-1.10.tar.gz new file mode 100644 index 0000000..a0dd886 Binary files /dev/null and b/jsonpointer-1.10.tar.gz differ diff --git a/python-jsonpointer.spec b/python-jsonpointer.spec new file mode 100644 index 0000000..416e935 --- /dev/null +++ b/python-jsonpointer.spec @@ -0,0 +1,106 @@ +%global pypi_name jsonpointer +%bcond_without python3 +%bcond_without python2 + +Name: python-%{pypi_name} +Version: 1.10 +Release: 14 +Summary: Resolve JSON Pointers in Python +License: BSD +URL: https://github.com/stefankoegl/python-json-pointer +Source0: https://pypi.io/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +%description +python-json-pointer is a Python library for resolving JSON pointers (RFC 6901). Python 2.7, 3.4+ and PyPy are supported. + +%if %{with python2} +%package -n python2-%{pypi_name} +Summary: Resolve JSON Pointers in Python +BuildRequires: python2-devel python2-setuptools + +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} +python-json-pointer is a Python library for resolving JSON pointers (RFC 6901). +%endif + +%if %{with python3} +%package -n python3-%{pypi_name} +Summary: Resolve JSON Pointers in Python +BuildRequires: python3-devel python3-setuptools + +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +python-json-pointer is a Python library for resolving JSON pointers (RFC 6901). +%endif + +%package_help + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%if %{with python2} +%py2_build +%endif +%if %{with python3} +LC_ALL=en_US.UTF-8 %py3_build +%endif + +%install +%if %{with python2} +%py2_install +mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python2_version} +ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer-2 +%if %{without python3} +ln -s ./jsonpointer-%{python2_version} %{buildroot}%{_bindir}/jsonpointer +%endif +%endif + +%if %{with python3} +LC_ALL=en_US.UTF-8 %py3_install +mv %{buildroot}%{_bindir}/jsonpointer %{buildroot}%{_bindir}/jsonpointer-%{python3_version} +ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer-3 +ln -s ./jsonpointer-%{python3_version} %{buildroot}%{_bindir}/jsonpointer +%endif + + +%check +%if %{with python3} +%{__python3} tests.py +%endif +%if %{with python2} +%{__python2} tests.py +%endif + +%if %{with python2} +%files -n python2-%{pypi_name} +%doc AUTHORS +%license COPYING +%if %{without python3} +%{_bindir}/jsonpointer +%endif +%{_bindir}/jsonpointer-2* +%{python2_sitelib}/%{pypi_name}.py* +%{python2_sitelib}/*.egg-info +%endif + +%if %{with python3} +%files -n python3-%{pypi_name} +%doc AUTHORS +%license COPYING +%{_bindir}/jsonpointer +%{_bindir}/jsonpointer-3* +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py* +%{python3_sitelib}/*.egg-info +%endif + +%files help +%doc README.md + +%changelog +* Sun Sep 15 2019 openEuler Buildteam - 1.10-14 +- Package init