1
0
Commit Graph

191 Commits

Author SHA1 Message Date
SomberNight
a15ed939b7 setup.py: use relative paths in data_files
fixes https://github.com/spesmilo/electrum/issues/7787
fixes https://github.com/spesmilo/electrum/issues/5227
closes https://github.com/spesmilo/electrum/pull/5553
2022-05-06 16:32:06 +02:00
SomberNight
dbc695ba4a follow-up prev
The Windows build was failing due to the trailing slash in the path:
```
💬 INFO:  Pip installing Electrum. This might take a long time if the project folder is large.
Processing c:\electrum
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  python setup.py egg_info did not run successfully.
  exit code: 1

  [10 lines of output]
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\electrum\setup.py", line 75, in <module>
      find_packages('electrum/', exclude=["tests", "gui.kivy", "gui.kivy.*"])]),
    File "C:\python3\lib\site-packages\setuptools\discovery.py", line 103, in find
      convert_path(str(where)),
    File "C:\python3\lib\site-packages\setuptools\_distutils\util.py", line 130, in convert_path
      raise ValueError("path '%s' cannot end with '/'" % pathname)
  ValueError: path 'electrum/' cannot end with '/'
```
This is weird because I tested the setuptools.find_packages invocation on Linux, where it
has no issues with the trailing slash, but indeed it looks like on Windows it does.
Not sure why it behaves differently depending on the platform. Anyway, removing.
2022-05-04 19:58:16 +02:00
SomberNight
92ff7de756 setup.py: use find_packages more heavily
No change in behaviour as-is.
In the future, if we add a new folder with an __init__.py file, it will get included by default,
whereas in the past it would not.
i.e. this is changing what we manually have to specify from a whitelist to a blacklist.
2022-05-04 19:27:05 +02:00
SomberNight
dd2f8541b7 bump min required Python version to 3.8 2022-02-15 18:22:32 +01:00
SomberNight
013cf869f1 qt: qrreader: keep both old and new toolchain; try to abstract it away 2021-06-25 16:52:02 +02:00
SomberNight
c1dbcab9bb qt: new qrreader using QtMultimedia; drop CalinsQRReader(mac)
This commit ports the work of EchterAgo and cculianu from Electron-Cash,
to implement a new toolchain to scan qr codes.

Previously, on Linux and Win, we have been using zbar to access the camera
and read qrcodes; and on macOS we used CalinsQRReader (an objective-C
project by cculianu).

The new toolchain added here can use QtMultimedia to access the camera,
and then feed that image into zbar. When used this way, zbar needs
fewer dependencies and is easier to compile, in particular it can be
compiled for macOS.

The new toolchain works on all three platforms, with some caveats
(see code comments in related commits) -- so we also keep the end-to-end
zbar toolchain; but at least we can drop CalinsQRReader.

The related changes in Electron-Cash are spread over 50+ commits (several PRs and direct
pushes to master), but see in particular:
https://github.com/Electron-Cash/Electron-Cash/pull/1376

some other interesting links:
b2b737001c
163224cf1f
3b31e0fcb1
eda015908e
https://github.com/Electron-Cash/Electron-Cash/pull/1545
052aa06c23
2021-06-25 16:51:58 +02:00
SomberNight
2cb4e56be3 sdist build: let pip install put ~everything from tar.gz to site-packages
(well, not everything, only files in electrum/ (so e.g. not contrib))
See comment in setup.py.

E.g. we have been including the www/ folder in the tar.gz but have not been installing it
to site-packages. Now we do.
Or we have been including the kivy GUI files in the tar.gz but not installing them.
Now we do.

I like this because it simplifies setup.py and should be easier to reason about too.

should fix #7089 (at least when using the tar.gz)
2021-03-27 03:44:00 +01:00
SomberNight
14372e0a94 dependencies: support and require dnspython 2.0, rm monkey patches
- dnspython 2.0 requires cryptography 2.6 so we now always require that
  (no longer a choice between cryptography and pycryptodomex)
- test_dnssec.py is deleted as it was testing the monkey-patch

related: #6538
2020-12-08 16:35:29 +01:00
SomberNight
7e534f4865 dependencies: rm pyaes from requirements
Since #6014, pyaes is not really needed anymore.

As we currently require either one of pycryptodomex or cryptography,
even if pyaes is available, it will not be used.
We could strip it out completely from crypto.py...

In any case, pyaes is still pulled in by some hw wallet dependencies indirectly;
but the core library no longer depends on it.
2020-09-08 16:44:20 +02:00
SomberNight
1cc8c2c055 binaries: bundle 'cryptography' instead of 'pycryptodomex' in binaries
related: #6538

(this allows testing the binaries; to consider whether we can drop pycryptodomex)
2020-09-08 16:43:46 +02:00
SomberNight
0b6ce657b1 setup.py: fix 'full' extra
got broken in adc97af58c
2020-06-11 04:52:56 +02:00
SomberNight
756c7db888 setup.py: specify lnwire as package_data
fixes #6078
2020-04-09 10:59:22 +02:00
SomberNight
f412420892 include lnwire csv files in binaries (follow-up #6050) 2020-04-04 01:40:05 +02:00
SomberNight
adc97af58c clear up requirements re pycryptodomex 2020-03-04 20:33:02 +01:00
ThomasV
d493dd1953 add pycryptodomex to requirements 2019-08-20 09:03:11 +02:00
SomberNight
0de954546a test python version in main script
for better error text on old python

related: #5008, #5129
2019-02-15 22:06:10 +01:00
SomberNight
2c71b9da0c icons: instead of symlinks, just mv "icons" dir
symlinks are really inconvenient on Windows
(when running from cloned source)

follow-up #5055
2019-02-07 20:01:52 +01:00
SomberNight
4fa87d8595 fix: qt icons not available when installed as python package
follow-up #5053
2019-02-01 23:32:24 +01:00
SomberNight
16bac5fd73 rm qt icons file
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons

based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
SomberNight
d77e4d8f5d exception formatting: use repr(e) instead of str(e) in messages
repr(e) is more useful
2019-01-17 17:16:19 +01:00
SomberNight
160bc93e26 implement oneserver option for kivy
closes #4826
2018-11-03 17:21:38 +01:00
SomberNight
071bc27016 setup.py: rm deprecated 'imp'. dedupe min py version 2018-09-28 02:47:36 +02:00
SomberNight
bed35a65c7 bump min python to 3.6 2018-09-11 21:04:36 +02:00
ghost43
c99007bda7 setup.py: add 'gui' extra. potentially build Qt icons files (#4647) 2018-08-30 16:16:14 +02:00
SomberNight
61aa19539c some packaging clean-up 2018-07-24 17:32:18 +02:00
SomberNight
281805a0a4 linux sdist: 'typing' was not included, which is needed on py3.4
not making typing conditioned on py version as then freeze_packages would not pick it up.
2018-07-20 16:38:18 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00
SomberNight
65d5be13b6 fix #4475 2018-06-30 19:56:52 +02:00
SomberNight
849f64a010 python3.4: typing module is not part of stdlib 2018-06-16 17:38:30 +02:00
SomberNight
56a399e1da fix revealer for linux distributables; and small clean-up 2018-06-10 22:12:23 +02:00
SomberNight
16e4827e8c use libsecp256k1 if available. abstract away ecc stuff. move symmetric crypto and hash functions to crypto.py 2018-05-25 15:43:06 +02:00
fivepiece
b4d71e651b add regtest support (#4242)
* add regtest support

* set default regtest ssl and tcp ports to 51002 and 51002

* regtest inherits parameters from testnet
2018-04-11 19:10:14 +02:00
ThomasV
104ea477de fix #4136: revert to extras_require 2018-03-28 10:52:58 +02:00
Filip Gospodinov
1735978088 setup.py: fix icon path for user installation
Before, the user installation used the wrong directory
to store the application's icon resulting in the desktop
environment falling back to an ugly default icon. Now,
the correct icon is displayed in the menu.

"By default, apps should look in $HOME/.icons (for backwards
compatibility), in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps
(in that order)."
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
2018-03-20 12:25:04 +01:00
ThomasV
f38ca73dae setup.py: install optional modules. fixes #3927 2018-03-08 11:52:01 +01:00
Marcel O'Neil
e72947c8fd prevent requirements.txt from being installed to /usr 2018-03-07 15:15:54 -05:00
Johann Bauer
afa0168e14 Add new requirements file for binaries in contrib 2018-02-11 16:59:07 +01:00
Johann Bauer
f9a3edc2a2 Merge remote-tracking branch 'lillypad/master' 2018-02-11 16:21:32 +01:00
SomberNight
0693837538 freeze hw wallet dependencies into separate file. update versions using freeze_packages.sh. introduce "hardware" setuptools extra. 2018-01-30 22:10:03 +01:00
SomberNight
d83d927781 include servers_testnet.json and checkpoints_testnet.json in every binary 2017-12-27 14:21:05 +01:00
lillypad
c44427d33e requirements.txt support for user only pip requirements 2017-12-17 15:22:10 -04:00
ThomasV
44a83c2401 read checkpoints file in NetworkConstants, add it to setup.py 2017-12-12 11:10:50 +01:00
ThomasV
51718501fd add server list to setup.py 2017-09-14 10:25:04 +02:00
ThomasV
c3388d9677 misc python3 updates:
- use jsonrpclib-pelix
 - update the kivy gui
 - update plugins
2017-08-26 08:28:24 +02:00
Dmitry Sorokin
c86140a608 py3 in setup.py and tox config 2017-08-26 08:28:24 +02:00
Johann Bauer
74af19705d Use PySocks from pypi instead of SocksiPy 2017-02-25 13:44:15 +01:00
ThomasV
e1515743cd replace slowaes with pyaes 2017-02-10 17:22:52 +01:00
djb
6b6f0be7d4 add Digital Bitbox hardware wallet 2017-01-31 14:21:11 +01:00
ThomasV
2948a06833 prepare version 2.7.18 2017-01-24 11:37:01 +01:00
ThomasV
b6a29b7bc2 fix; update setup.py 2017-01-03 17:17:15 +01:00