diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 000000000..c2b9f5a64 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,4 @@ +-r requirements.txt +-r requirements-optional.txt +pytest>=3.5.0 +mock>=2.0.0 diff --git a/requirements-optional.txt b/requirements-optional.txt new file mode 100644 index 000000000..94276761f --- /dev/null +++ b/requirements-optional.txt @@ -0,0 +1 @@ +hidapi >= 0.7.99.post20 diff --git a/requirements.txt b/requirements.txt index be94d06d9..7f09fe18c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,5 @@ mnemonic>=0.17 requests>=2.4.0 click>=6.2 pyblake2>=0.9.3 -hidapi>=0.7.99.post20 libusb1>=1.6.4 rlp>=0.6.0 diff --git a/setup.py b/setup.py index bb186dca1..41bc92375 100755 --- a/setup.py +++ b/setup.py @@ -15,19 +15,9 @@ install_requires = [ 'click>=6.2', 'pyblake2>=0.9.3', '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 @@ -97,6 +87,9 @@ setup( }, scripts=['trezorctl'], install_requires=install_requires, + extras_require={ + 'hidapi': ['hidapi>=0.7.99.post20'], + }, python_requires='>=3.3', include_package_data=True, zip_safe=False,