forked from pool/python-scikit-build
* python38.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-scikit-build?expand=0&rev=3
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
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']:
|