mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
build: reorganize requirements, mark hidapi as optional
This drops the command line options. `libusb` is now required unconditionally (it's cffi so no harm there). hidapi is an extra. You either need to install it manually, or specify it in your requirements.txt like so: trezor[hidapi] >= 0.9.2
This commit is contained in:
parent
ce7a434f2d
commit
41d99764c6
4
requirements-dev.txt
Normal file
4
requirements-dev.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-r requirements.txt
|
||||||
|
-r requirements-optional.txt
|
||||||
|
pytest>=3.5.0
|
||||||
|
mock>=2.0.0
|
1
requirements-optional.txt
Normal file
1
requirements-optional.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
hidapi >= 0.7.99.post20
|
@ -3,6 +3,5 @@ mnemonic>=0.17
|
|||||||
requests>=2.4.0
|
requests>=2.4.0
|
||||||
click>=6.2
|
click>=6.2
|
||||||
pyblake2>=0.9.3
|
pyblake2>=0.9.3
|
||||||
hidapi>=0.7.99.post20
|
|
||||||
libusb1>=1.6.4
|
libusb1>=1.6.4
|
||||||
rlp>=0.6.0
|
rlp>=0.6.0
|
||||||
|
15
setup.py
15
setup.py
@ -15,19 +15,9 @@ install_requires = [
|
|||||||
'click>=6.2',
|
'click>=6.2',
|
||||||
'pyblake2>=0.9.3',
|
'pyblake2>=0.9.3',
|
||||||
'rlp>=0.6.0',
|
'rlp>=0.6.0',
|
||||||
|
'libusb1>=1.6.4',
|
||||||
]
|
]
|
||||||
|
|
||||||
import sys
|
|
||||||
if '--disable-hidapi' in sys.argv:
|
|
||||||
sys.argv.remove('--disable-hidapi')
|
|
||||||
else:
|
|
||||||
install_requires.append('hidapi>=0.7.99.post20')
|
|
||||||
|
|
||||||
if '--disable-libusb' in sys.argv:
|
|
||||||
sys.argv.remove('--disable-libusb')
|
|
||||||
else:
|
|
||||||
install_requires.append('libusb1>=1.6.4')
|
|
||||||
|
|
||||||
from trezorlib import __version__ as VERSION
|
from trezorlib import __version__ as VERSION
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +87,9 @@ setup(
|
|||||||
},
|
},
|
||||||
scripts=['trezorctl'],
|
scripts=['trezorctl'],
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
|
extras_require={
|
||||||
|
'hidapi': ['hidapi>=0.7.99.post20'],
|
||||||
|
},
|
||||||
python_requires='>=3.3',
|
python_requires='>=3.3',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user