projects/guix·blob python-team · refs

52 lines · 1.5 KiB

1From: Tobias Geerinckx-Rice <[email protected]>
2Date: Wed, 19 Aug 2020 22:58:32 +0200
3Subject: [PATCH] gnu: unknown-horizons: Replace ‘dist’ with ‘distro’.
4
5This fixes builds with Python >= 3.8. Taken verbatim from upstream[0].
6
7[0]: https://github.com/unknown-horizons/unknown-horizons/commit/c40fb866f3f72ac1049d6fa7859b17d8a48fe9e1
8
9From c40fb866f3f72ac1049d6fa7859b17d8a48fe9e1 Mon Sep 17 00:00:00 2001
10From: MarkusHackspacher <[email protected]>
11Date: Thu, 18 Jul 2019 11:46:39 +0200
12Subject: [PATCH] replace deprecated to distro package
13
14---
15 requirements.txt | 1 +
16 setup.py | 4 +++-
17 2 files changed, 4 insertions(+), 1 deletion(-)
18
19diff --git a/requirements.txt b/requirements.txt
20index a5edf794fb..b58179bfa8 100644
21--- a/requirements.txt
22+++ b/requirements.txt
23@@ -1,6 +1,7 @@
24 coverage==4.4.1
25 coveralls==1.1
26 crayons==0.1.2
27+distro
28 future==0.16.0
29 greenlet==0.4.15
30 isort==4.3.4
31diff --git a/setup.py b/setup.py
32index 6d63a5ce15..6a237a8749 100755
33--- a/setup.py
34+++ b/setup.py
35@@ -32,6 +32,8 @@
36 from distutils.spawn import find_executable
37 from shutil import copytree, rmtree
38
39+import distro
40+
41 import horizons
42 from horizons.constants import VERSION
43 from horizons.ext import polib
44@@ -39,7 +41,7 @@
45 # Ensure we are in the correct directory
46 os.chdir(os.path.realpath(os.path.dirname(__file__)))
47
48-if platform.dist()[0].lower() in ('debian', 'ubuntu'):
49+if distro.linux_distribution(full_distribution_name=False)[0] in ('debian', 'mint', 'ubuntu'):
50 executable_path = 'games'
51 else:
52 executable_path = 'bin'