Closed kloczek closed 3 years ago
Running tests with python setup.py test
is broken. Try pipenv run test
as recommended by the README, or python -m unittest discover -v
which should be equivalent.
The actual package is also failing with pynitrokey
when running nitropy start list
on Debian Buster running in Crostini on ChromeOS complaining about a missing fido2._pyu2f
but downgrading to fido2==0.8.1
works correctly.
nitropy start list
Traceback (most recent call last):
File "/home/dragon788/.local/bin/nitropy", line 6, in <module>
from pynitrokey.cli import nitropy
File "/home/dragon788/.local/lib/python3.7/site-packages/pynitrokey/cli/__init__.py", line 15, in <module>
import pynitrokey.fido2.operations
File "/home/dragon788/.local/lib/python3.7/site-packages/pynitrokey/fido2/__init__.py", line 7, in <module>
import fido2._pyu2f
ModuleNotFoundError: No module named 'fido2._pyu2f'
dragon788@penguin:~$ pip3 install fido2==0.8.1
Collecting fido2==0.8.1
Downloading https://files.pythonhosted.org/packages/97/03/9ce85396423a4b9897cc3295a605b63dffd06940e65c1cccd51c2c016864/fido2-0.8.1.tar.gz (201kB)
100% |████████████████████████████████| 204kB 3.3MB/s
Requirement already satisfied: cryptography>=1.5 in /usr/lib/python3/dist-packages (from fido2==0.8.1) (2.6.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from fido2==0.8.1) (1.12.0)
Building wheels for collected packages: fido2
Running setup.py bdist_wheel for fido2 ... done
Stored in directory: /home/dragon788/.cache/pip/wheels/87/a5/23/d6f5cab4a7484ad9a6940336980144d41f626c79b3ec6dbe05
Successfully built fido2
Installing collected packages: fido2
Found existing installation: fido2 0.9.0
Uninstalling fido2-0.9.0:
Successfully uninstalled fido2-0.9.0
Successfully installed fido2-0.8.1
dragon788@penguin:~$ pip3 install --user pynitrokey
Collecting pynitrokey
Using cached https://files.pythonhosted.org/packages/83/ee/3b832ab95d3ee52ecb7c1bdf385237d2e94e97a1a0bece0a891fac9575da/pynitrokey-0.4.1-py3-none-any.whl
Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from pynitrokey) (2.6.1)
Requirement already satisfied: pygments in ./.local/lib/python3.7/site-packages (from pynitrokey) (2.7.4)
Requirement already satisfied: requests in ./.local/lib/python3.7/site-packages (from pynitrokey) (2.25.1)
Requirement already satisfied: cbor in ./.local/lib/python3.7/site-packages (from pynitrokey) (1.0.0)
Requirement already satisfied: click>=7.0 in ./.local/lib/python3.7/site-packages (from pynitrokey) (7.1.2)
Requirement already satisfied: ecdsa in ./.local/lib/python3.7/site-packages (from pynitrokey) (0.16.1)
Requirement already satisfied: fido2>=0.8.1 in ./.local/lib/python3.7/site-packages (from pynitrokey) (0.8.1)
Requirement already satisfied: cffi in ./.local/lib/python3.7/site-packages (from pynitrokey) (1.14.4)
Requirement already satisfied: intelhex in ./.local/lib/python3.7/site-packages (from pynitrokey) (2.3.0)
Requirement already satisfied: pyserial in ./.local/lib/python3.7/site-packages (from pynitrokey) (3.5)
Requirement already satisfied: pyusb in ./.local/lib/python3.7/site-packages (from pynitrokey) (1.1.1)
Requirement already satisfied: idna<3,>=2.5 in ./.local/lib/python3.7/site-packages (from requests->pynitrokey) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.local/lib/python3.7/site-packages (from requests->pynitrokey) (1.26.2)
Requirement already satisfied: chardet<5,>=3.0.2 in ./.local/lib/python3.7/site-packages (from requests->pynitrokey) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.7/site-packages (from requests->pynitrokey) (2020.12.5)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from ecdsa->pynitrokey) (1.12.0)
Requirement already satisfied: pycparser in ./.local/lib/python3.7/site-packages (from cffi->pynitrokey) (2.20)
Installing collected packages: pynitrokey
Successfully installed pynitrokey-0.4.1
dragon788@penguin:~$ nitropy start list
*** Nitrokey tool for Nitrokey FIDO2 & Nitrokey Start
:: 'Nitrokey Start' keys:
FSIJ-1.2.15-NNNNNNNN: Nitrokey Nitrokey Start (RTM.9)
You'll have to open an issue with pynitrokey about that, they need to update the project to be compatible with 0.9.
@kloczek - Hopefully you had better luck with running the alternative commands I suggested. If not, please re-open this issue (or open a new one, whichever you prefer).
Hopefully you had better luck with running the alternative commands I suggested. If not, please re-open this issue (or open a new one, whichever you prefer).
For now I've gave up because on my build system which is cut of from access to public network pipenv drags so many dependencies that most of the necessarty components I have not packages qnd probably wil not do that because pipenv looks like used only by python-fido2. IMO it would be better to fix setuptool based test suite ..
setup.py test
has been deprecated by setuptools, so I don't think we'll be fixing that. We're currently looking at moving to Poetry and pytest for packaging/testing for 1.0.
On first lookm looks like there is some MOX path hardcoded