diff --git a/.cirrus.yml b/.cirrus.yml index 8c7eb2dae..3475f0fd6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -46,8 +46,6 @@ task: - ./contrib/make_libsecp256k1.sh - mkdir contrib/_saved_secp256k1_build - cp electrum/libsecp256k1.so.* contrib/_saved_secp256k1_build/ - libsecp_install_script: - - cp contrib/_saved_secp256k1_build/* electrum/ tox_script: - export PYTHONASYNCIODEBUG - export PYTHONDEVMODE @@ -55,6 +53,7 @@ task: coveralls_script: - if [ ! -z "$COVERALLS_REPO_TOKEN" ] ; then coveralls ; fi env: + LD_LIBRARY_PATH: contrib/_saved_secp256k1_build/ ELECTRUM_REQUIREMENTS_CI: contrib/requirements/requirements-ci.txt ELECTRUM_REQUIREMENTS: contrib/requirements/requirements.txt # following CI_* env vars are set up for coveralls @@ -127,8 +126,6 @@ task: - ./contrib/make_libsecp256k1.sh - mkdir contrib/_saved_secp256k1_build - cp electrum/libsecp256k1.so.* contrib/_saved_secp256k1_build/ - libsecp_install_script: - - cp contrib/_saved_secp256k1_build/* electrum/ bitcoind_service_background_script: - tests/regtest/run_bitcoind.sh electrumx_service_background_script: @@ -137,6 +134,7 @@ task: - sleep 10s - python3 -m unittest tests/regtest.py env: + LD_LIBRARY_PATH: contrib/_saved_secp256k1_build/ ELECTRUM_REQUIREMENTS: contrib/requirements/requirements.txt # ElectrumX exits with an error without this: ALLOW_ROOT: 1 diff --git a/contrib/build-wine/build-electrum-git.sh b/contrib/build-wine/build-electrum-git.sh index 39b78b40f..a1913ca3c 100755 --- a/contrib/build-wine/build-electrum-git.sh +++ b/contrib/build-wine/build-electrum-git.sh @@ -50,9 +50,9 @@ pushd $WINEPREFIX/drive_c/electrum # see https://github.com/pypa/pip/issues/2195 -- pip makes a copy of the entire directory info "Pip installing Electrum. This might take a long time if the project folder is large." $WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location . -# pyinstaller needs to be able to "import electrum", for which we need libsecp256k1: +# pyinstaller needs to be able to "import electrum_ecc", for which we need libsecp256k1: # (or could try "pip install -e" instead) -cp electrum/libsecp256k1-*.dll "$WINEPREFIX/drive_c/python3/Lib/site-packages/electrum/" +cp electrum/libsecp256k1-*.dll "$WINEPREFIX/drive_c/python3/Lib/site-packages/electrum_ecc/" popd diff --git a/contrib/make_libsecp256k1.sh b/contrib/make_libsecp256k1.sh index 1bcfd913b..8887eb814 100755 --- a/contrib/make_libsecp256k1.sh +++ b/contrib/make_libsecp256k1.sh @@ -66,9 +66,10 @@ info "Building $pkgname..." make install || fail "Could not install $pkgname" . "$here/$pkgname/dist/lib/libsecp256k1.la" host_strip "$here/$pkgname/dist/lib/$dlname" - cp -fpv "$here/$pkgname/dist/lib/$dlname" "$PROJECT_ROOT/electrum" || fail "Could not copy the $pkgname binary to its destination" - info "$dlname has been placed in the inner 'electrum' folder." if [ -n "$DLL_TARGET_DIR" ] ; then cp -fpv "$here/$pkgname/dist/lib/$dlname" "$DLL_TARGET_DIR/" || fail "Could not copy the $pkgname binary to DLL_TARGET_DIR" + else + cp -fpv "$here/$pkgname/dist/lib/$dlname" "$PROJECT_ROOT/electrum" || fail "Could not copy the $pkgname binary to its destination" + info "$dlname has been placed in the 'electrum' folder." fi ) diff --git a/contrib/osx/make_osx.sh b/contrib/osx/make_osx.sh index 5621d5d55..6d7c3b838 100755 --- a/contrib/osx/make_osx.sh +++ b/contrib/osx/make_osx.sh @@ -149,7 +149,7 @@ if [ ! -f "$DLL_TARGET_DIR/libsecp256k1.2.dylib" ]; then else info "Skipping libsecp256k1 build: reusing already built dylib." fi -cp -f "$DLL_TARGET_DIR"/libsecp256k1.*.dylib "$PROJECT_ROOT/electrum/" || fail "Could not copy libsecp256k1 dylib" +#cp -f "$DLL_TARGET_DIR"/libsecp256k1.*.dylib "$PROJECT_ROOT/electrum" || fail "Could not copy libsecp256k1 dylib" if [ ! -f "$DLL_TARGET_DIR/libzbar.0.dylib" ]; then info "Building ZBar dylib..." @@ -189,9 +189,9 @@ python3 -m pip install --no-build-isolation --no-dependencies --no-binary :all: info "Building $PACKAGE..." python3 -m pip install --no-build-isolation --no-dependencies \ --no-warn-script-location . > /dev/null || fail "Could not build $PACKAGE" -# pyinstaller needs to be able to "import electrum", for which we need libsecp256k1: +# pyinstaller needs to be able to "import electrum_ecc", for which we need libsecp256k1: # (or could try "pip install -e" instead) -cp "$PROJECT_ROOT/electrum"/libsecp256k1.*.dylib "$VENV_DIR/lib/python$PY_VER_MAJOR/site-packages/electrum/" +cp "$DLL_TARGET_DIR"/libsecp256k1.*.dylib "$VENV_DIR/lib/python$PY_VER_MAJOR/site-packages/electrum_ecc/" # strip debug symbols of some compiled libs # - hidapi (hid.cpython-39-darwin.so) in particular is not reproducible without this