1 Star 0 Fork 4

jhon-hsu/python-pyxs

forked from src-openEuler/python-pyxs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-pyxs.spec 4.65 KB
一键复制 编辑 原始数据 按行查看 历史
jhon-hsu 提交于 2021-07-06 14:20 . commit source package and SPEC file
# what it's called on pypi
%global srcname pyxs
# what it's imported as
%global libname pyxs
# name of egg info directory
%global eggname pyxs
# package name fragment
%global pkgname pyxs
%global common_description %{expand:
It's a pure Python XenStore client implementation, which covers all of the
libxs features and adds some nice Pythonic sugar on top.}
%if (%{defined fedora} && 0%{?fedora} < 30) || (%{defined rhel} && 0%{?rhel} < 8)
%bcond_without python2
%endif
%bcond_without python3
%bcond_without tests
Name: python-%{pkgname}
Version: 0.4.1
Release: 16
Summary: Pure Python bindings to XenStore
License: GPLv3
URL: https://github.com/selectel/pyxs
# PyPI tarball doesn't have tests
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
Patch0: remove-pytest-runner-requirement.patch
BuildArch: noarch
%description %{common_description}
%if %{with python2}
%package -n python2-%{pkgname}
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%if %{with tests}
# Test use pytest's yield_fixture decorator, which was first added in 2.4.
# https://github.com/pytest-dev/pytest/blob/2.4.0/CHANGELOG#L26-L33
BuildRequires: python2-pytest >= 2.4
%endif
%{?python_provide:%python_provide python2-%{pkgname}}
%description -n python2-%{pkgname} %{common_description}
%endif
%if %{with python3}
%package -n python%{python3_pkgversion}-%{pkgname}
Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%if %{with tests}
# Test use pytest's yield_fixture decorator, which was first added in 2.4.
# https://github.com/pytest-dev/pytest/blob/2.4.0/CHANGELOG#L26-L33
BuildRequires: python%{python3_pkgversion}-pytest >= 2.4
%endif
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
%description -n python%{python3_pkgversion}-%{pkgname} %{common_description}
%endif
%prep
%autosetup -n %{srcname}-%{version} -p 1
%build
%{?with_python2:%py2_build}
%{?with_python3:%py3_build}
%install
%{?with_python2:%py2_install}
%{?with_python3:%py3_install}
%if %{with tests}
%check
%{?with_python2:PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} --verbose}
%{?with_python3:PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose}
%endif
%if %{with python2}
%files -n python2-%{pkgname}
%license LICENSE
%doc README
%{python2_sitelib}/%{libname}
%{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info
%endif
%if %{with python3}
%files -n python%{python3_pkgversion}-%{pkgname}
%license LICENSE
%doc README
%{python3_sitelib}/%{libname}
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
%endif
%changelog
* Tue Jul 06 2021 jhon-hsu <[email protected]> - 0.4.1-16
- Package init for openeuler
* Fri Jun 04 2021 Python Maint <[email protected]> - 0.4.1-15
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <[email protected]> - 0.4.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <[email protected]> - 0.4.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <[email protected]> - 0.4.1-12
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <[email protected]> - 0.4.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <[email protected]> - 0.4.1-10
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Tue Oct 01 2019 Carl George <[email protected]> - 0.4.1-9
- Run tests on el6
- Disable python2 subpackage on el8
* Mon Aug 19 2019 Miro Hrončok <[email protected]> - 0.4.1-8
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <[email protected]> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <[email protected]> - 0.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Sep 18 2018 Carl George <[email protected]> - 0.4.1-5
- Disable python2 subpackage on F30+ rhbz#1630329
* Sat Jul 14 2018 Fedora Release Engineering <[email protected]> - 0.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <[email protected]> - 0.4.1-3
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <[email protected]> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Jul 25 2017 Carl George <[email protected]> - 0.4.1-1
- Initial package
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jhon-hsu/python-pyxs.git
[email protected]:jhon-hsu/python-pyxs.git
jhon-hsu
python-pyxs
python-pyxs
master

搜索帮助