1 Star 0 Fork 9

phanddy/python-jsonpatch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-jsonpatch.spec 2.57 KB
一键复制 编辑 原始数据 按行查看 历史
yeah_wang 提交于 2020-07-23 19:18 . update to 1.26
%global pypi_name jsonpatch
%bcond_without python3
%bcond_without python2
Name: python-%{pypi_name}
Version: 1.26
Release: 1
Summary: Applying JSON Patches in Python
License: BSD
URL: https://github.com/stefankoegl/python-json-patch
Source0: https://pypi.io/packages/source/j/jsonpatch/%{pypi_name}-%{version}.tar.gz
Patch0: 0001-Skip-unit-test-in-packaging.patch
BuildArch: noarch
%description
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
%if %{with python2}
%package -n python2-jsonpatch
Summary: Applying JSON Patches in Python 2
BuildRequires: python2-devel python2-setuptools python2-jsonpointer
Requires: python2-jsonpointer
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
Library to apply JSON Patches according to RFC 6902 - Python 2 build.
%endif
%package -n python3-jsonpatch
Summary: Applying JSON Patches in Python 3
BuildRequires: python3-devel python3-setuptools python3-jsonpointer
Requires: python3-jsonpointer
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-jsonpatch
Library to apply JSON Patches according to RFC 6902 - Python 3 build.
%package_help
%prep
%autosetup -n %{pypi_name}-%{version} -p1
%build
%if %{with python2}
%py2_build
%endif
LANG=en_US.utf8
%py3_build
%install
%if %{with python2}
%py2_install
for bin in jsondiff jsonpatch; do
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python2_version}
ln -s ./$bin-%{python2_version} %{buildroot}%{_bindir}/$bin-2
done;
%endif
LANG=en_US.utf8 %py3_install
for bin in jsondiff jsonpatch; do
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/$bin-%{python3_version}
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin-3
ln -s ./$bin-%{python3_version} %{buildroot}%{_bindir}/$bin
done;
%check
%if %{with python2}
%{__python2} tests.py
%endif
%{__python3} tests.py
%if %{with python2}
%files -n python2-%{pypi_name}
%license COPYING
%{_bindir}/jsondiff-2*
%{_bindir}/jsonpatch-2*
%{python2_sitelib}/%{pypi_name}.py*
%{python2_sitelib}/*.egg-info
%endif
%files -n python3-%{pypi_name}
%license COPYING
%{_bindir}/jsondiff
%{_bindir}/jsonpatch
%{_bindir}/jsondiff-3*
%{_bindir}/jsonpatch-3*
%{python3_sitelib}/%{pypi_name}.py*
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/*.egg-info
%files help
%defattr(-,root,root)
%doc README.md
%changelog
* Thu Jul 23 2020 dingyue <dingyue5@huawei.com> - 1.26-1
- Package update to 1.26
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.21-5
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phanddy/python-jsonpatch.git
git@gitee.com:phanddy/python-jsonpatch.git
phanddy
python-jsonpatch
python-jsonpatch
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385