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