Browse Source

add COINCURVE_UPSTREAM_REF env var (#85)

* add COINCURVE_UPSTREAM_REF env var

* Update build-windows-wheels.sh

* .

* Update build-windows-wheels.sh

* .

* Update build.sh
master
Ofek Lev 3 years ago
committed by GitHub
parent
commit
871fbbdf82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .github/scripts/build-windows-wheels.sh
  2. 1
      .github/workflows/build.yml
  3. 1
      HISTORY.rst
  4. 8
      setup.py

7
.github/scripts/build-windows-wheels.sh

@ -5,12 +5,15 @@ set -e -x
build_dll() {
./autogen.sh
echo "LDFLAGS = -no-undefined" >> Makefile.am
./configure --host=$1 --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-endomorphism --disable-jni
./configure --host=$1 --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-benchmark=no --enable-tests=no --enable-openssl-tests=no --enable-exhaustive-tests=no --enable-static --disable-dependency-tracking --with-pic
make
}
cd ..
git clone https://github.com/bitcoin-core/secp256k1.git
curl -sLO "https://github.com/bitcoin-core/secp256k1/archive/$COINCURVE_UPSTREAM_REF.tar.gz"
tar -xzf "$COINCURVE_UPSTREAM_REF.tar.gz"
mv "secp256k1-$COINCURVE_UPSTREAM_REF" secp256k1
mv secp256k1 64bit
cp 64bit 32bit -R

1
.github/workflows/build.yml

@ -11,6 +11,7 @@ on:
- master
env:
COINCURVE_UPSTREAM_REF: f2d9aeae6d5a7c7fbbba8bbb38b1849b784beef7
LD_LIBRARY_PATH: ./libsecp256k1_ext/.libs
DYLD_FALLBACK_LIBRARY_PATH: ./libsecp256k1_ext/.libs
LIB_DIR: ./libsecp256k1_ext/.libs

1
HISTORY.rst

@ -12,6 +12,7 @@ master
- Build binary wheels for PyPy3.6 7.3.3 & PyPy3.7 7.3.3 on Linux
- Upgrade libsecp256k1 to the latest available version
- Upgrade libgmp to the latest available version
- Introduce ``COINCURVE_UPSTREAM_REF`` environment variable to select an alternative libsecp256k1 version when building from source
14.0.0
^^^^^^

8
setup.py

@ -33,7 +33,9 @@ BUILDING_FOR_WINDOWS = detect_dll()
MAKE = 'gmake' if platform.system() in ['FreeBSD', 'OpenBSD'] else 'make'
# Version of libsecp256k1 to download if none exists in the `libsecp256k1` directory
LIB_TARBALL_URL = 'https://github.com/bitcoin-core/secp256k1/archive/f2d9aeae6d5a7c7fbbba8bbb38b1849b784beef7.tar.gz'
UPSTREAM_REF = os.getenv('COINCURVE_UPSTREAM_REF') or 'f2d9aeae6d5a7c7fbbba8bbb38b1849b784beef7'
LIB_TARBALL_URL = f'https://github.com/bitcoin-core/secp256k1/archive/{UPSTREAM_REF}.tar.gz'
# We require setuptools >= 3.3
@ -175,12 +177,14 @@ class build_clib(_build_clib):
'--disable-dependency-tracking',
'--with-pic',
'--enable-module-recovery',
'--disable-jni',
'--prefix',
os.path.abspath(self.build_clib),
'--enable-experimental',
'--enable-module-ecdh',
'--enable-benchmark=no',
'--enable-tests=no',
'--enable-openssl-tests=no',
'--enable-exhaustive-tests=no',
]
log.debug('Running configure: {}'.format(' '.join(cmd)))

Loading…
Cancel
Save