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 - apt-get install -y wget python3-pip gnupg unzip automake libtool pkg-config
- pip install tox pytest - pip install tox pytest
- python3 setup.py install - python3 setup.py install
- wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_v0.2.zip - wget -O coincurve-basicswap.zip https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_v0.2.zip
- unzip -d coincurve-anonswap coincurve-anonswap.zip - unzip -d coincurve-basicswap coincurve-basicswap.zip
- mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true - mv ./coincurve-basicswap/*/{.,}* ./coincurve-basicswap || true
- cd coincurve-anonswap - cd coincurve-basicswap
- python3 setup.py install --force - pip install .
bins_cache: bins_cache:
folder: /tmp/cached_bin folder: /tmp/cached_bin
reupload_on_changes: false 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; apt-get install -y wget python3-pip gnupg unzip make g++ autoconf automake libtool pkg-config gosu tzdata;
ARG COINCURVE_VERSION=v0.2 ARG COINCURVE_VERSION=v0.2
RUN wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_$COINCURVE_VERSION.zip && \ RUN wget -O coincurve-basicswap.zip https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_$COINCURVE_VERSION.zip && \
unzip coincurve-anonswap.zip && \ echo "c309deef22c929c9ab5b3adf7adbda940bffcea6c6ec7c66202d6c3d4e3ceb79 coincurve-basicswap.zip" | sha256sum -c && \
mv ./coincurve-anonswap_$COINCURVE_VERSION ./coincurve-anonswap && \ unzip coincurve-basicswap.zip && \
cd coincurve-anonswap && \ mv ./coincurve-basicswap_$COINCURVE_VERSION ./coincurve-basicswap && \
python3 setup.py install --force cd coincurve-basicswap && \
pip install .
# Install requirements first so as to skip in subsequent rebuilds # Install requirements first so as to skip in subsequent rebuilds
COPY ./requirements.txt requirements.txt COPY ./requirements.txt requirements.txt

View file

@ -1,3 +1,3 @@
name = "basicswap" 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" python3 -m venv "$SWAP_DATADIR/venv"
. $SWAP_DATADIR/venv/bin/activate && python -V . $SWAP_DATADIR/venv/bin/activate && python -V
cd $SWAP_DATADIR cd $SWAP_DATADIR
wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_v0.2.zip wget -O coincurve-basicswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/basicswap_v0.2.zip
unzip -d coincurve-anonswap coincurve-anonswap.zip unzip -d coincurve-basicswap coincurve-basicswap.zip
mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true mv ./coincurve-basicswap/*/{.,}* ./coincurve-basicswap || true
cd $SWAP_DATADIR/coincurve-anonswap cd $SWAP_DATADIR/coincurve-basicswap
pip3 install . pip3 install .

View file

@ -92,7 +92,7 @@ Create and activate a venv
Install coincurve 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/ cd coincurve/
pip3 install . pip3 install .

View file

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

View file

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