1 Star 0 Fork 15

phanddy/python-jsonpointer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-jsonpointer.spec 2.80 KB
一键复制 编辑 原始数据 按行查看 历史
yeah_wang 提交于 2020-07-23 19:20 . update to 2.0
%global pypi_name jsonpointer
%bcond_without python3
%bcond_without python2
Name: python-%{pypi_name}
Version: 2.0
Release: 1
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}
%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}
%{_bindir}/jsonpointer
%{_bindir}/jsonpointer-3*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/*.egg-info
%endif
%files help
%doc README.md
%changelog
* Thu Jul 23 dingyue <dingyue5@huawei.com> - 2.0-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:NA
* Fri Oct 11 2019 yefei <yefei25@huawei.com> - 1.10-15
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:move author from doc to license
* Sun Sep 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10-14
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phanddy/python-jsonpointer.git
git@gitee.com:phanddy/python-jsonpointer.git
phanddy
python-jsonpointer
python-jsonpointer
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385