electrum: fix dependencies

closes #7282
This commit is contained in:
Christian Buschau 2019-01-17 03:26:36 +01:00 committed by maxice8
parent 26330c27c3
commit 5deb340502
No known key found for this signature in database
GPG Key ID: 543B9D4F4299F06B
2 changed files with 118 additions and 8 deletions

View File

@ -0,0 +1,110 @@
Upstream: No
Reason: Avoid certifi dependency
diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt
index 7249a40d..7dde766c 100644
--- contrib/requirements/requirements.txt
+++ contrib/requirements/requirements.txt
@@ -8,4 +8,3 @@ qdarkstyle<2.6
aiorpcx>=0.9,<0.11
aiohttp
aiohttp_socks
-certifi
diff --git electrum/interface.py electrum/interface.py
index 53ce4fde..1d8ef999 100644
--- electrum/interface.py
+++ electrum/interface.py
@@ -33,7 +33,6 @@ from collections import defaultdict
import aiorpcx
from aiorpcx import RPCSession, Notification
-import certifi
from .util import PrintError, ignore_exceptions, log_exceptions, bfh, SilentTaskGroup
from . import util
@@ -49,7 +48,7 @@ if TYPE_CHECKING:
from .network import Network
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
class NetworkTimeout:
diff --git electrum/paymentrequest.py electrum/paymentrequest.py
index f94920a4..88ded436 100644
--- electrum/paymentrequest.py
+++ electrum/paymentrequest.py
@@ -28,7 +28,6 @@ import time
import traceback
import json
-import certifi
import urllib.parse
import aiohttp
@@ -49,7 +48,7 @@ from .network import Network
REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'}
ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'}
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
ca_list = None
ca_keyID = None
diff --git electrum/util.py electrum/util.py
index ac41d9e3..85f0a538 100644
--- electrum/util.py
+++ electrum/util.py
@@ -44,7 +44,6 @@ import ssl
import aiohttp
from aiohttp_socks import SocksConnector, SocksVer
from aiorpcx import TaskGroup
-import certifi
from .i18n import _
@@ -58,7 +57,7 @@ def inv_dict(d):
return {v: k for k, v in d.items()}
-ca_path = certifi.where()
+ca_path = '/etc/ssl/certs/ca-certificates.crt'
base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0}
diff --git electrum/x509.py electrum/x509.py
index 6e519cad..bf3aafb2 100644
--- electrum/x509.py
+++ electrum/x509.py
@@ -337,8 +337,6 @@ def load_certificates(ca_path):
if __name__ == "__main__":
- import certifi
-
util.set_verbosity(True)
- ca_path = certifi.where()
+ ca_path = '/etc/ssl/certs/ca-certificates.crt'
ca_list, ca_keyID = load_certificates(ca_path)
diff --git run_electrum run_electrum
index 68040693..a4eb02cc 100755
--- run_electrum
+++ run_electrum
@@ -44,7 +44,6 @@ def check_imports():
import dns
import pyaes
import ecdsa
- import certifi
import qrcode
import google.protobuf
import jsonrpclib
@@ -58,7 +57,7 @@ def check_imports():
from google.protobuf import descriptor_pb2
from jsonrpclib import SimpleJSONRPCServer
# make sure that certificates are here
- assert os.path.exists(certifi.where())
+ assert os.path.exists('/etc/ssl/certs/ca-certificates.crt')
if not is_android:

View File

@ -1,15 +1,14 @@
# Template file for 'electrum'
pkgname=electrum
version=3.3.2
revision=1
revision=2
noarch=yes
wrksrc="Electrum-${version}"
build_style=python3-module
pycompile_module="electrum electrum_gui electrum_plugins"
hostmakedepends="python3-setuptools"
depends="python3-PyQt5 python3-dnspython python3-ecdsa python3-jsonrpclib
python3-pbkdf2 python3-protobuf python3-pyaes python3-pycryptodome python3-pysocks
python3-qrcode python3-requests"
hostmakedepends="python3-PyQt5-devel-tools python3-setuptools"
depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx
python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf
python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode"
# Missing optional dependencies:
# btchip - BTChip hardware wallet support
# trezor - TREZOR hardware wallet support
@ -18,8 +17,9 @@ short_desc="Lightweight Bitcoin wallet"
maintainer="Charles E. Lehner <cel@celehner.com>"
license="MIT"
homepage="https://electrum.org/"
distfiles="https://download.electrum.org/${version}/Electrum-${version}.tar.gz"
checksum=51b2a5dd3b0e924a9525dc1da801a87d113050ee109296496e86e6bc396cee6d
# patch doesn't apply for PyPI tarball
distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz"
checksum=303688ed42d5eeda75e6fd37fb81291628d6b0aa23046b44f8eb1485cb79dec5
post_install() {
sed -i -e 's|electrum %u|electrum|' \