summaryrefslogtreecommitdiff
path: root/games/pysolfc/files/patch-setup.py
blob: 2a0712ba81cb6ef83b4f8d4c02c24484bc995182 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
* Avoid staging issues by skipping directories that only contain
  subdirectories.

* Skip locale files if NLS is disabled (otherwise enable it via
  post-patch target).

* Normalize the bdist wheel name to avoid staging errors.

--- setup.py.orig	2024-12-22 21:32:17 UTC
+++ setup.py
@@ -14,6 +14,8 @@ def get_data_files(source, destination):
     destination using the data_files keyword of setuptools.setup."""
     for path, _, files in os.walk(source):
         files = [os.path.join(path, f) for f in files]
+        if (len(files) == 0):
+            continue
         path = path.replace(source, destination, 1)
         yield (path, files)
 
@@ -44,7 +46,7 @@ for d in ddirs:
     data_files += get_data_files(os.path.join('data', d),
                                  os.path.join(data_dir, d))
 
-data_files += get_data_files('locale', locale_dir)
+#%%NLS%%data_files += get_data_files('locale', locale_dir)
 
 if os.name == 'posix':
     for size in os.listdir('data/images/icons'):
@@ -65,7 +67,7 @@ kw = {
 '''
 
 kw = {
-    'name': 'PySolFC',
+    'name': 'pysolfc',
     'version': VERSION,
     'url': PACKAGE_URL,
     'author': 'Skomoroh',