Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
6e92bd59af
!8 【轻量级 PR】:Rebuild for next release
From: @zhangruifang2020 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-10-25 08:11:13 +00:00
张瑞方
93d6d3956c
Rebuild for next release
Signed-off-by: 张瑞方 <xdzhangruifang@163.com>
2022-10-25 07:12:20 +00:00
openeuler-ci-bot
57ffbd8e80
!6 add pytest 6.2+ support
Merge pull request !6 from 桐小哥/openEuler-22.03-LTS-Next
2022-01-10 06:27:08 +00:00
shixuantong
da685e62da add pytest 6.2+ support 2022-01-10 14:03:50 +08:00
openeuler-ci-bot
4cf1c8a682 !3 delete python2.
From: @weiwei_150212
Reviewed-by: @hanxinke
Signed-off-by: @hanxinke
2020-10-29 10:00:30 +08:00
s17723959267
0044cfc2c0 delete python2 2020-10-24 08:49:58 +08:00
openeuler-ci-bot
a5416e4730 !2 add yaml
Merge pull request !2 from cuibb1/master
2020-05-19 08:54:09 +08:00
cuibb1
96dfc7f7a9 yaml upload 2020-05-09 14:29:16 +08:00
openeuler-ci-bot
6d63d5a94f !1 添加源代码
Merge pull request !1 from sherlock2010/master
2020-01-10 10:28:24 +08:00
sherlock2010
430ea810bd first commit 2020-01-10 10:16:50 +08:00
4 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From 8e06097d68b3f2fb9f44324119de5cefb7a42506 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 7 Jun 2021 00:52:25 +0200
Subject: [PATCH] pytest: Use Node.from_parent(...)
Fixes https://github.com/docopt/docopt/issues/483
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
---
conftest.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/conftest.py b/conftest.py
index f5e8c7b..c4c0bb5 100644
--- a/conftest.py
+++ b/conftest.py
@@ -11,7 +11,10 @@
def pytest_collect_file(path, parent):
if path.ext == ".docopt" and path.basename.startswith("test"):
- return DocoptTestFile(path, parent)
+ if hasattr(DocoptTestFile, "from_parent"):
+ return DocoptTestFile.from_parent(parent, fspath=path)
+ else:
+ return DocoptTestFile(path, parent)
def parse_test(raw):
@@ -41,7 +44,13 @@ def collect(self):
for name, doc, cases in parse_test(raw):
name = self.fspath.purebasename
for case in cases:
- yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
+ if hasattr(DocoptTestItem, "from_parent"):
+ yield DocoptTestItem.from_parent(parent=self,
+ name="%s(%d)" % (name, index),
+ doc=doc,
+ case=case)
+ else:
+ yield DocoptTestItem("%s(%d)" % (name, index), self, doc, case)
index += 1

BIN
docopt-0.6.2.tar.gz Normal file

Binary file not shown.

58
python-docopt.spec Normal file
View File

@ -0,0 +1,58 @@
Name: python-docopt
Version: 0.6.2
Release: 14
Summary: Command-line interface description language
License: MIT
URL: http://docopt.org/
Source0: https://github.com/docopt/docopt/archive/%{version}.tar.gz#/docopt-%{version}.tar.gz
Patch6000: backport-pytest-Use-Node.from_parent.patch
BuildArch: noarch
%global _description \
docopt helps you define the interface for your command-line app, and automatically generate a \
parser for it.\
docopt is based on conventions that have been used for decades in help messages and man pages for \
describing a program interface. An interface description in docopt is such a help message, but \
formalized.
%description %_description
%package -n python3-docopt
Summary: Command-line interface description language
%{?python_provide:%python_provide python3-docopt}
BuildRequires: python3-devel python3-pytest python3-setuptools
%description -n python3-docopt %_description
%prep
%autosetup -n docopt-%{version} -p1
%build
%py3_build
%install
%py3_install
%check
py.test-3 -v
%files -n python3-docopt
%license LICENSE-MIT
%doc README.rst
%{python3_sitelib}/docopt*
%{python3_sitelib}/__pycache__/*
%changelog
* Tue Oct 25 2022 zhangruifang <zhangruifang1@h-partners.com> - 0.6.2-14
- Rebuild for next release
* Mon Jan 10 2022 shixuantong <shixuantong@huawei.com> - 0.6.2-13
- add pytest 6.2+ support
* Sat Oct 24 2020 tianwei <tianwei12@huawei.com> - 0.6.2-12
- delete python2
* Wed Jan 08 2020 zhouyihang <zhouyihang1@huawei.com> - 0.6.2-11
- Package init

4
python-docopt.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: docopt/docopt
tag_prefix: ^v
seperator: .