Accepting request 800416 from home:mcalabkova:branches:devel:languages:python:jupyter

- Add patch which-finds-python-executable.patch to fix tests
- Spec-cleaner fixes

OBS-URL: https://build.opensuse.org/request/show/800416
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-packaging?expand=0&rev=5
This commit is contained in:
Tomáš Chvátal 2020-05-23 13:45:27 +00:00 committed by Git OBS Bridge
parent 1337bddcdf
commit 16a9a0078d
3 changed files with 29 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 5 15:04:08 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Add patch which-finds-python-executable.patch to fix tests
- Spec-cleaner fixes
-------------------------------------------------------------------
Mon Nov 18 18:49:56 UTC 2019 - Todd R <toddrme2178@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-jupyter-packaging
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,24 +12,26 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jupyter-packaging
Version: 0.4.0
Release: 0
License: BSD-3-Clause
Summary: Jupyter Packaging Utilities
Url: https://github.com/jupyter/jupyter-packaging
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/jupyter/jupyter-packaging
Source: https://files.pythonhosted.org/packages/source/j/jupyter-packaging/jupyter-packaging-%{version}.tar.gz
BuildRequires: python-rpm-macros
# fix tests https://github.com/jupyter/jupyter-packaging/pull/32
Patch0: which-finds-python-executable.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
@ -40,6 +42,7 @@ with and without accompanying JavaScript packages
%setup -q -n jupyter-packaging-%{version}
sed -i 's/\r$//' README.md
sed -i -e '/^#!\//, 1d' jupyter_packaging/*.py
%patch0 -p1
%build
%python_build

View File

@ -0,0 +1,14 @@
Index: jupyter-packaging-0.4.0/tests/test_which.py
===================================================================
--- jupyter-packaging-0.4.0.orig/tests/test_which.py
+++ jupyter-packaging-0.4.0/tests/test_which.py
@@ -1,6 +1,7 @@
+import sys
from jupyter_packaging.setupbase import which
-def test_which_finds_python():
- assert which('python')
+def test_which_finds_python_executable():
+ assert which(sys.executable)