From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- ...ove-the-setup_requires-for-setuptools-scm.patch | 32 ++++++++++++++ .../python/python-pytest/pytest_version_fix.patch | 51 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch create mode 100644 external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch (limited to 'external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest') diff --git a/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch b/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch new file mode 100644 index 00000000..06dfcdfc --- /dev/null +++ b/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch @@ -0,0 +1,32 @@ +From 24a901fd17926e8e05be4ed2e01b0113a2e3a852 Mon Sep 17 00:00:00 2001 +From: Derek Straka +Date: Tue, 19 Dec 2017 11:36:39 -0500 +Subject: [PATCH] [PATCH 1/1] setup.py: remove the setup_requires for + setuptools-scm + +The setup_requires argument forces the download of the egg file for setuptools-scm +during the do_compile phase. This download is incompatible with the typical fetch +and mirror structure. The only usage of scm is the generation of the _version.py +file and in the release tarball it is already correctly created + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Derek Straka +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 3eb38ef..1163202 100644 +--- a/setup.py ++++ b/setup.py +@@ -82,7 +82,6 @@ def main(): + keywords="test unittest", + cmdclass={'test': PyTest}, + # the following should be enabled for release +- setup_requires=['setuptools-scm'], + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', + install_requires=install_requires, + extras_require=extras_require, +-- +2.7.4 diff --git a/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch b/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch new file mode 100644 index 00000000..b373d93e --- /dev/null +++ b/external/meta-openembedded/meta-python/recipes-devtools/python/python-pytest/pytest_version_fix.patch @@ -0,0 +1,51 @@ +Upstream-Status: Inappropriate (OE specific) + +python-pytest: remove fetch during do_compile phase +commit: c974fbf9ebf185552ab65301e07af44f36517abf + +introduced an issue by making the version 0.0.0 +this fixes that + +Signed-off-by: Armin Kuster + +Index: pytest-3.2.2/setup.py +=================================================================== +--- pytest-3.2.2.orig/setup.py ++++ pytest-3.2.2/setup.py +@@ -1,5 +1,6 @@ + import os + import sys ++import re + import setuptools + import pkg_resources + from setuptools import setup, Command +@@ -22,6 +23,18 @@ classifiers = [ + with open('README.rst') as fd: + long_description = fd.read() + ++def read(*names, **kwargs): ++ with open(os.path.join( *names), 'r') as fp: ++ return fp.read() ++ ++def find_version(*file_paths): ++ version_file = read(*file_paths) ++ version_match = re.search(r"^version = ['\']([^'\"]*)['\']", ++ version_file, re.M) ++ ++ if version_match: ++ return version_match.group(1) ++ raise RuntimeError("Unable to find version string.") + + def get_environment_marker_support_level(): + """ +@@ -59,9 +72,7 @@ def main(): + name='pytest', + description='pytest: simple powerful testing with Python', + long_description=long_description, +- use_scm_version={ +- 'write_to': '_pytest/_version.py', +- }, ++ version=find_version("_pytest", "_version.py"), + url='http://pytest.org', + license='MIT license', + platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], -- cgit 1.2.3-korg