From 517329d495d0f2b9fb9b628457f67625efd4174e85599ca513d1d235f0377ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 7 Oct 2022 07:47:52 +0000 Subject: [PATCH] Accepting request 1008682 from home:mcalabkova:branches:devel:languages:python - Add patch dont-check-builddir.patch * The check whether the tests run in builddir is broken, turn it off and assume everything is fine (we would see it if not). OBS-URL: https://build.opensuse.org/request/show/1008682 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-prctl?expand=0&rev=12 --- dont-check-builddir.patch | 20 ++++++++++++++++++++ python-python-prctl.changes | 7 +++++++ python-python-prctl.spec | 3 ++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 dont-check-builddir.patch diff --git a/dont-check-builddir.patch b/dont-check-builddir.patch new file mode 100644 index 0000000..6ccc524 --- /dev/null +++ b/dont-check-builddir.patch @@ -0,0 +1,20 @@ +Index: python-prctl-1.8.1/test_prctl.py +=================================================================== +--- python-prctl-1.8.1.orig/test_prctl.py ++++ python-prctl-1.8.1/test_prctl.py +@@ -22,15 +22,6 @@ except ImportError: + curdir = os.path.dirname(__file__) + builddir = os.path.join(curdir, 'build', 'lib.%s-%s' % (distutils.util.get_platform(), '.'.join([str(x) for x in sys.version_info[:2]]))) + +-# Always run from the builddir +-if not os.path.exists(builddir) or \ +- not os.path.exists(os.path.join(builddir, 'prctl.py')) or \ +- not os.path.exists(os.path.join(builddir, '_prctl' + so)) or \ +- int(os.path.getmtime(os.path.join(curdir, 'prctl.py'))) > int(os.path.getmtime(os.path.join(builddir, 'prctl.py'))) or \ +- os.path.getmtime(os.path.join(curdir, '_prctlmodule.c')) > os.path.getmtime(os.path.join(builddir, '_prctl' + so)): +- sys.stderr.write("Please build the extension first, using ./setup.py build\n") +- sys.exit(1) +-sys.path.insert(0, builddir) + + import prctl + import _prctl diff --git a/python-python-prctl.changes b/python-python-prctl.changes index 0d8cfc0..1799455 100644 --- a/python-python-prctl.changes +++ b/python-python-prctl.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 7 07:39:38 UTC 2022 - Markéta Machová + +- Add patch dont-check-builddir.patch + * The check whether the tests run in builddir is broken, turn it off + and assume everything is fine (we would see it if not). + ------------------------------------------------------------------- Thu Feb 17 05:33:37 UTC 2022 - Steve Kowalik diff --git a/python-python-prctl.spec b/python-python-prctl.spec index ee5f9b3..b7671b1 100644 --- a/python-python-prctl.spec +++ b/python-python-prctl.spec @@ -33,6 +33,7 @@ Patch4: disable_no_new_privs.patch Patch5: correct-uname-comparsion.patch Patch6: check-for-python310-correctly.patch Patch7: skip-speculation.patch +Patch8: dont-check-builddir.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -64,7 +65,7 @@ cp %{SOURCE99} . %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m unittest discover -v +%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python test_prctl.py %files %{python_files} %license COPYING