Update coincurve version.

This commit is contained in:
tecnovert 2024-09-19 12:15:50 +02:00
parent 4b18ddfe79
commit 25b479fdb6
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
7 changed files with 54 additions and 52 deletions

View file

@ -24,11 +24,11 @@ test_task:
- apt-get install -y wget python3-pip gnupg unzip automake libtool pkg-config
- pip install tox pytest
- python3 setup.py install
- wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_v0.2.zip
- unzip -d coincurve-anonswap coincurve-anonswap.zip
- mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true
- cd coincurve-anonswap
- python3 setup.py install --force
- wget -O coincurve-basicswap.zip https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_v0.2.zip
- unzip -d coincurve-basicswap coincurve-basicswap.zip
- mv ./coincurve-basicswap/*/{.,}* ./coincurve-basicswap || true
- cd coincurve-basicswap
- pip install .
bins_cache:
folder: /tmp/cached_bin
reupload_on_changes: false

View file

@ -8,11 +8,12 @@ RUN apt-get update; \
apt-get install -y wget python3-pip gnupg unzip make g++ autoconf automake libtool pkg-config gosu tzdata;
ARG COINCURVE_VERSION=v0.2
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_$COINCURVE_VERSION.zip && \
unzip coincurve-anonswap.zip && \
mv ./coincurve-anonswap_$COINCURVE_VERSION ./coincurve-anonswap && \
cd coincurve-anonswap && \
python3 setup.py install --force
RUN wget -O coincurve-basicswap.zip https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_$COINCURVE_VERSION.zip && \
echo "c309deef22c929c9ab5b3adf7adbda940bffcea6c6ec7c66202d6c3d4e3ceb79 coincurve-basicswap.zip" | sha256sum -c && \
unzip coincurve-basicswap.zip && \
mv ./coincurve-basicswap_$COINCURVE_VERSION ./coincurve-basicswap && \
cd coincurve-basicswap && \
pip install .
# Install requirements first so as to skip in subsequent rebuilds
COPY ./requirements.txt requirements.txt

View file

@ -1,3 +1,3 @@
name = "basicswap"
__version__ = "0.13.4"
__version__ = "0.13.5"

View file

@ -162,10 +162,10 @@ Close the terminal and open a new one to update the python symlinks.
python3 -m venv "$SWAP_DATADIR/venv"
. $SWAP_DATADIR/venv/bin/activate && python -V
cd $SWAP_DATADIR
wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_v0.2.zip
unzip -d coincurve-anonswap coincurve-anonswap.zip
mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true
cd $SWAP_DATADIR/coincurve-anonswap
wget -O coincurve-basicswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/basicswap_v0.2.zip
unzip -d coincurve-basicswap coincurve-basicswap.zip
mv ./coincurve-basicswap/*/{.,}* ./coincurve-basicswap || true
cd $SWAP_DATADIR/coincurve-basicswap
pip3 install .

View file

@ -92,7 +92,7 @@ Create and activate a venv
Install coincurve
git clone https://github.com/tecnovert/coincurve.git -b bsx_windows
git clone https://github.com/basicswap/coincurve.git -b basicswap
cd coincurve/
pip3 install .

View file

@ -2,6 +2,7 @@
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix download)
@ -11,29 +12,32 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages certs)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages databases)
#:use-module (gnu packages finance)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages libffi)
#:use-module (gnu packages license))
(define libsecp256k1-anonswap
(define libsecp256k1-basicswap
(package
(name "libsecp256k1-anonswap")
(version "anonswap_v0.2")
(name "libsecp256k1-basicswap")
(version "basicswap_v0.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/tecnovert/secp256k1")
(url "https://github.com/basicswap/secp256k1")
(commit version)))
(sha256
(base32
"1r07rkrw5qsnc5v1q7cb0zfs1cr62fqwq7kd2v8650g6ha4k5r8i"))
"0zvqgswmy1q46nmpjn388pljvl65x3y2k4caw742m3j121jqmfgx"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
@ -62,47 +66,49 @@
(license license:unlicense)))
(define python-coincurve-anonswap
(define python-coincurve-basicswap
(package
(name "python-coincurve-anonswap")
(version "anonswap_v0.2")
(name "python-coincurve-basicswap")
(version "basicswap_v0.2")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/tecnovert/coincurve")
(url "https://github.com/basicswap/coincurve")
(commit version)))
(file-name
(git-file-name name version))
(sha256
(base32 "08fz02afh88m83axfm8jsgq1c65mw1f3g07x9hz361vblvqjwzqh"))))
(build-system python-build-system)
(base32 "1vm9cvwr0z02zc0mp7l8qj9vhg8kmfrzysiwzg91zkgmccza9ryc"))))
(build-system pyproject-build-system)
(arguments
'(#:tests? #f ;XXX fails to load "libsecp256k1.dll"
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-libsec256k1-path
(lambda _
(substitute* "setup.py"
(("if has_system_lib\\(\\)")
"if True")
((", 'requests'")
"")
(("download_library\\(self\\)")
"")))))))
`(#:phases
(modify-phases %standard-phases
(add-before 'build 'set-version
(lambda _
(setenv "COINCURVE_IGNORE_SYSTEM_LIB" "OFF")
;; ZIP does not support timestamps before 1980.
(setenv "SOURCE_DATE_EPOCH" "315532800")))
)))
(propagated-inputs
(list
libsecp256k1-anonswap
libsecp256k1-basicswap
python-asn1crypto
python-cffi))
(native-inputs
(list
python-setuptools
cmake-3.30
python-hatchling
python-scikit-build
python-scikit-build-core
pkg-config
python-pytest
python-pytest-benchmark
))
(synopsis "Python libsecp256k1 wrapper")
(description "Python libsecp256k1 wrapper.")
(home-page "https://github.com/tecnovert/coincurve")
(home-page "https://github.com/basicswap/coincurve")
(license license:bsd-3)))
(define python-sqlalchemy-1.4.39
@ -139,30 +145,25 @@
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "bin/basicswap_prepare.py"
(("GUIX_SSL_CERT_DIR = None")
(string-append "GUIX_SSL_CERT_DIR = \"" (search-input-directory inputs "etc/ssl/certs") "\"")))
)
))))
(string-append "GUIX_SSL_CERT_DIR = \"" (search-input-directory inputs "etc/ssl/certs") "\""))))))))
(propagated-inputs
(list
gnupg
nss-certs
python-coincurve-anonswap
python-coincurve-basicswap
python-pycryptodome
python-pytest
python-sqlalchemy-1.4.39
python-pyzmq
python-gnupg
python-jinja2
python-pysocks
))
python-pysocks))
(native-inputs
(list
python-setuptools
python-wheel
python-pylint
python-pyflakes
))
python-pyflakes))
(synopsis "Simple Atomic Swap Network - Proof of Concept")
(description #f)
(description "Facilitates cross-chain atomic swaps")
(home-page "https://github.com/basicswap/basicswap")
(license license:bsd-3)))

View file

@ -17,7 +17,7 @@ passenv =
deps =
pytest
-rrequirements.txt
git+https://github.com/tecnovert/coincurve.git@anonswap#egg=coincurve
git+https://github.com/basicswap/coincurve.git@basicswap#egg=coincurve
commands =
pytest