Browse Source

setup.py: add workaround for MSYS2 UCRT64 env path bug

MMGen now uses UCRT64 as the default MSYS2 configuration (see
doc/wiki/install-mswin/Install-MMGen-on-Microsoft-Windows.md).
The MMGen Project 1 year ago
parent
commit
ebb77548
2 changed files with 6 additions and 1 deletions
  1. 1 1
      mmgen/data/version
  2. 5 0
      setup.py

+ 1 - 1
mmgen/data/version

@@ -1 +1 @@
-13.3.dev57
+13.3.dev58

+ 5 - 0
setup.py

@@ -20,9 +20,14 @@ def build_libsecp256k1():
 			print(f'Fixing broken library filename: {old.name!r} -> {new.name!r}')
 			shutil.copy2(old,new)
 
+	def fix_broken_aclocal_path():
+		os.environ['ACLOCAL_PATH'] = '/ucrt64/share/aclocal:/usr/share/aclocal'
+
 	import platform
 	if platform.system() == 'Windows':
 		fix_broken_libpython_fn()
+		if os.getenv('MSYSTEM') == 'UCRT64':
+			fix_broken_aclocal_path()
 
 	if not os.path.exists(cache_path):
 		os.makedirs(cache_path)