Accepting request 783298 from devel:languages:python:numeric
py38 fix OBS-URL: https://build.opensuse.org/request/show/783298 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-scikit-build?expand=0&rev=2
This commit is contained in:
commit
4917748801
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 10 10:33:57 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to build with python3.8:
|
||||
* python38.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 27 13:14:57 UTC 2019 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-scikit-build
|
||||
#
|
||||
# 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
|
||||
@ -22,13 +22,14 @@ Version: 0.10.0
|
||||
Release: 0
|
||||
Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/scikit-build/scikit-build
|
||||
Source: https://files.pythonhosted.org/packages/source/s/scikit-build/scikit-build-%{version}.tar.gz
|
||||
Patch0: python38.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools >= 28.0.0}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-distro
|
||||
Requires: python-packaging
|
||||
Requires: python-setuptools >= 28.0.0
|
||||
Requires: python-wheel >= 0.29.0
|
||||
@ -36,6 +37,7 @@ Requires: python-wheel >= 0.29.0
|
||||
BuildRequires: %{python_module Cython >= 0.25.1}
|
||||
BuildRequires: %{python_module codecov >= 2.0.5}
|
||||
BuildRequires: %{python_module coverage >= 4.2}
|
||||
BuildRequires: %{python_module distro}
|
||||
BuildRequires: %{python_module flake8 >= 3.0.4}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module path.py >= 11.5.0}
|
||||
@ -61,6 +63,7 @@ Improved build system generator for Python C/C++/Fortran/Cython extensions
|
||||
|
||||
%prep
|
||||
%setup -q -n scikit-build-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -69,7 +72,6 @@ Improved build system generator for Python C/C++/Fortran/Cython extensions
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
|
||||
%check
|
||||
# setup.py install, develop, etc default to writing to /usr .
|
||||
# Tests need enhancing upstream or patching.
|
||||
|
42
python38.patch
Normal file
42
python38.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From faa7284e5bc4c72bc8744987acdf3297b5d2e7e4 Mon Sep 17 00:00:00 2001
|
||||
From: Ben <code@bnavigator.de>
|
||||
Date: Mon, 25 Nov 2019 02:03:58 +0100
|
||||
Subject: [PATCH] platform.linux_distribution() was removed in Python 3.8. Move
|
||||
to distro package (#458)
|
||||
|
||||
---
|
||||
requirements.txt | 3 ++-
|
||||
skbuild/platform_specifics/linux.py | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index 7111c997..66c7b92f 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
wheel>=0.29.0
|
||||
setuptools>=28.0.0
|
||||
-packaging
|
||||
\ No newline at end of file
|
||||
+packaging
|
||||
+distro
|
||||
diff --git a/skbuild/platform_specifics/linux.py b/skbuild/platform_specifics/linux.py
|
||||
index c13666a7..431017f8 100644
|
||||
--- a/skbuild/platform_specifics/linux.py
|
||||
+++ b/skbuild/platform_specifics/linux.py
|
||||
@@ -1,5 +1,6 @@
|
||||
"""This module defines object specific to Linux platform."""
|
||||
|
||||
+import distro
|
||||
import platform
|
||||
import sys
|
||||
import textwrap
|
||||
@@ -24,7 +25,7 @@ def build_essential_install_cmd():
|
||||
"""
|
||||
# gentoo, slackware: Compiler is available by default.
|
||||
|
||||
- distribution_name = platform.linux_distribution()[0]
|
||||
+ distribution_name = distro.id()
|
||||
cmd = ""
|
||||
if distribution_name in [
|
||||
'debian', 'Ubuntu', 'mandrake', 'mandriva']:
|
Loading…
Reference in New Issue
Block a user