Windows/MSYS2 build and testing fixes

This commit is contained in:
The MMGen Project 2025-09-15 09:28:41 +00:00
commit a3eef0128a
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 5 additions and 4 deletions

View file

@ -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 =

View file

@ -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 [],
)]

View file

@ -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} "
}