diff options
author | Yuan Chao <yuanc.fnst@cn.fujitsu.com> | 2019-08-28 16:38:27 +0900 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-08-29 09:06:54 -0700 |
commit | 5d802e6e4d45c9c8c683ef48c6b99f130729ed0e (patch) | |
tree | f00181f4433892c5ec20a91e55f755908554abed /meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch | |
parent | a0c7656058c3b4373fed96a3edda61610ef98b2c (diff) | |
download | meta-openembedded-5d802e6e4d45c9c8c683ef48c6b99f130729ed0e.tar.gz |
python-pytest: upgrade 3.4.2 -> 5.1.1
Refresh patch: 0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch
Remove patch: pytest_version_fix.patch since this is not used.
License update: Copyright year updated to 2019
Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch b/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch deleted file mode 100644 index b373d93e8f..0000000000 --- a/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate (OE specific) | ||
2 | |||
3 | python-pytest: remove fetch during do_compile phase | ||
4 | commit: c974fbf9ebf185552ab65301e07af44f36517abf | ||
5 | |||
6 | introduced an issue by making the version 0.0.0 | ||
7 | this fixes that | ||
8 | |||
9 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
10 | |||
11 | Index: pytest-3.2.2/setup.py | ||
12 | =================================================================== | ||
13 | --- pytest-3.2.2.orig/setup.py | ||
14 | +++ pytest-3.2.2/setup.py | ||
15 | @@ -1,5 +1,6 @@ | ||
16 | import os | ||
17 | import sys | ||
18 | +import re | ||
19 | import setuptools | ||
20 | import pkg_resources | ||
21 | from setuptools import setup, Command | ||
22 | @@ -22,6 +23,18 @@ classifiers = [ | ||
23 | with open('README.rst') as fd: | ||
24 | long_description = fd.read() | ||
25 | |||
26 | +def read(*names, **kwargs): | ||
27 | + with open(os.path.join( *names), 'r') as fp: | ||
28 | + return fp.read() | ||
29 | + | ||
30 | +def find_version(*file_paths): | ||
31 | + version_file = read(*file_paths) | ||
32 | + version_match = re.search(r"^version = ['\']([^'\"]*)['\']", | ||
33 | + version_file, re.M) | ||
34 | + | ||
35 | + if version_match: | ||
36 | + return version_match.group(1) | ||
37 | + raise RuntimeError("Unable to find version string.") | ||
38 | |||
39 | def get_environment_marker_support_level(): | ||
40 | """ | ||
41 | @@ -59,9 +72,7 @@ def main(): | ||
42 | name='pytest', | ||
43 | description='pytest: simple powerful testing with Python', | ||
44 | long_description=long_description, | ||
45 | - use_scm_version={ | ||
46 | - 'write_to': '_pytest/_version.py', | ||
47 | - }, | ||
48 | + version=find_version("_pytest", "_version.py"), | ||
49 | url='http://pytest.org', | ||
50 | license='MIT license', | ||
51 | platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], | ||