Browse Source

Windows/MSYS2 build and testing fixes

The MMGen Project 2 months ago
parent
commit
a3eef0128a
3 changed files with 5 additions and 4 deletions
  1. 1 1
      setup.cfg
  2. 3 2
      setup.py
  3. 1 1
      test/test-release.d/cfg.sh

+ 1 - 1
setup.cfg

@@ -66,7 +66,7 @@ install_requires =
 	requests
 	pexpect
 	lxml
-	scrypt; platform_system != "Windows" # must be installed by hand on MSYS2
+	scrypt
 	semantic-version; platform_system != "Windows" # scripts/create-token.py
 
 packages =

+ 3 - 2
setup.py

@@ -38,7 +38,8 @@ def build_libsecp256k1():
 		print(f'\nBuilding libsecp256k1 (cwd={str(src_path)})')
 		cmds = (
 			['sh', './autogen.sh'],
-			['sh', './configure', 'CFLAGS=-g -O2 -fPIC', '--disable-dependency-tracking'],
+			['sh', './configure', 'CFLAGS=-g -O2 -fPIC', '--disable-dependency-tracking',
+				'--enable-module-recovery', 'MAKE=mingw32-make'],
 			['mingw32-make', 'MAKE=mingw32-make'])
 		for cmd in cmds:
 			print('Executing {}'.format(' '.join(cmd)))
@@ -59,7 +60,7 @@ setup(
 		name      = 'mmgen.proto.secp256k1.secp256k1',
 		sources   = ['extmod/secp256k1mod.c'],
 		depends   = ['extmod/random.h'],
-		libraries = ['gmp', 'secp256k1'] if sys.platform == 'win32' else ['secp256k1'],
+		libraries = ['gmp', 'secp256k1', 'bcrypt'] if sys.platform == 'win32' else ['secp256k1'],
 		include_dirs = ['/usr/local/include'] if sys.platform == 'darwin' else [],
 		library_dirs = ['/usr/local/lib'] if sys.platform == 'darwin' else [],
 	)]

+ 1 - 1
test/test-release.d/cfg.sh

@@ -257,7 +257,7 @@ init_tests() {
 	d_ltc_rt="overall operations using the regtest network (Litecoin)"
 	t_ltc_rt="- $cmdtest_py --coin=ltc regtest"
 
-	[ "$SOC" ] && {
+	[ "$SOC" -o "$MSYS2" ] && {
 		eth_env="MMGEN_TEST_SUITE_DEVNET_BLOCK_PERIOD=${MMGEN_TEST_SUITE_DEVNET_BLOCK_PERIOD:-22} "
 	}