From 075565a01dc2aaa1666beb4fafeadf8eb6ab0f33a09d12f36010807e75b22883 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 24 Mar 2022 12:36:27 +0000 Subject: [PATCH] Accepting request 964645 from home:pgajdos:python - do not require pytest-mock for build - added patches fix https://github.com/ekalinin/nodeenv/issues/302 + python-nodeenv-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/964645 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nodeenv?expand=0&rev=14 --- python-nodeenv-no-mock.patch | 26 ++++++++++++++++++++++++++ python-nodeenv.changes | 8 ++++++++ python-nodeenv.spec | 6 ++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 python-nodeenv-no-mock.patch diff --git a/python-nodeenv-no-mock.patch b/python-nodeenv-no-mock.patch new file mode 100644 index 0000000..30d4674 --- /dev/null +++ b/python-nodeenv-no-mock.patch @@ -0,0 +1,26 @@ +Index: nodeenv-1.6.0/tests/nodeenv_test.py +=================================================================== +--- nodeenv-1.6.0.orig/tests/nodeenv_test.py 2021-04-09 10:10:31.000000000 +0200 ++++ nodeenv-1.6.0/tests/nodeenv_test.py 2022-03-24 12:24:46.558624770 +0100 +@@ -7,7 +7,7 @@ import subprocess + import sys + import sysconfig + +-import mock ++import unittest.mock as mock + import pytest + + import nodeenv +Index: nodeenv-1.6.0/tests/test_install_activate.py +=================================================================== +--- nodeenv-1.6.0.orig/tests/test_install_activate.py 2021-04-09 10:10:31.000000000 +0200 ++++ nodeenv-1.6.0/tests/test_install_activate.py 2022-03-24 12:26:03.387083907 +0100 +@@ -1,7 +1,7 @@ + import sys + import os + +-import mock ++import unittest.mock as mock + import pytest + + import nodeenv diff --git a/python-nodeenv.changes b/python-nodeenv.changes index a7d13a8..16d3e63 100644 --- a/python-nodeenv.changes +++ b/python-nodeenv.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 24 11:47:05 UTC 2022 - pgajdos@suse.com + +- do not require pytest-mock for build +- added patches + fix https://github.com/ekalinin/nodeenv/issues/302 + + python-nodeenv-no-mock.patch + ------------------------------------------------------------------- Thu Jun 17 21:09:12 UTC 2021 - Dirk Müller diff --git a/python-nodeenv.spec b/python-nodeenv.spec index a716ae0..e103318 100644 --- a/python-nodeenv.spec +++ b/python-nodeenv.spec @@ -1,7 +1,7 @@ # # spec file for package python-nodeenv # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,8 @@ Summary: Nodejs virtual environment builder License: BSD-2-Clause URL: https://github.com/ekalinin/nodeenv Source: https://github.com/ekalinin/nodeenv/archive/%{version}.tar.gz#/nodeenv-%{version}.tar.gz -BuildRequires: %{python_module mock} +# https://github.com/ekalinin/nodeenv/issues/302 +Patch0: python-nodeenv-no-mock.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -40,6 +41,7 @@ Node.js virtual environment builder. %prep %setup -q -n nodeenv-%{version} +%patch0 -p1 %build %python_build