Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On non-FreeBSD systems, installing fido2 fails due to platform_system check for requirement #293

Closed
1 task done
LouisStAmour opened this issue Mar 9, 2021 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@LouisStAmour
Copy link

LouisStAmour commented Mar 9, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

pdm init
pdm add fido2==0.9.1

Actual behavior

On non-FreeBSD (such as Mac or Linux):

% pdm add fido2==0.9.1 -v
Adding packages to default dependencies: fido2
======== Start resolving requirements ========
	fido2==0.9.1
	Adding requirement fido2==0.9.1
	Adding requirement six(from fido2 0.9.1)
	Adding requirement cryptography>=1.5(from fido2 0.9.1)
	Adding requirement uhid-freebsd>=1.2.1; platform_system == "FreeBSD"(from fido2 0.9.1)
Resolving: fido2 0.9.1
	New pin: fido2 0.9.1
======== Ending round 0 ========
Preparing isolated env for PEP 517 build...
Requirement already satisfied: setuptools>=40.8.0 in /usr/local/lib/python3.9/site-packages (from -r /var/folders/tj/wz8q0jmx7_92n64zpvh4kh5h0000gn/T/pdm-build-reqs-a54n8u9g.txt (line 1)) (53.0.0)
Requirement already satisfied: wheel in /usr/local/lib/python3.9/site-packages (from -r /var/folders/tj/wz8q0jmx7_92n64zpvh4kh5h0000gn/T/pdm-build-reqs-a54n8u9g.txt (line 2)) (0.36.2)
running egg_info
writing uhid_freebsd.egg-info/PKG-INFO
writing dependency_links to uhid_freebsd.egg-info/dependency_links.txt
writing top-level names to uhid_freebsd.egg-info/top_level.txt
reading manifest file 'uhid_freebsd.egg-info/SOURCES.txt'
writing manifest file 'uhid_freebsd.egg-info/SOURCES.txt'
Requirement already satisfied: wheel in /usr/local/lib/python3.9/site-packages (from -r /var/folders/tj/wz8q0jmx7_92n64zpvh4kh5h0000gn/T/pdm-build-reqs-qywj_t8e.txt (line 1)) (0.36.2)
running bdist_wheel
running build
running build_ext
building 'uhid_freebsd' extension
creating build
creating build/temp.macosx-11-x86_64-3.9
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c uhid_freebsd.cpp -o build/temp.macosx-11-x86_64-3.9/uhid_freebsd.o
uhid_freebsd.cpp:15:10: fatal error: 'dev/usb/usb_ioctl.h' file not found
#include <dev/usb/usb_ioctl.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

Expected behavior

% pdm add kombu==4.6.11 -v
Adding packages to default dependencies: kombu
======== Start resolving requirements ========
	fido2==0.9.1
	Adding requirement fido2==0.9.1
	Adding requirement six(from fido2 0.9.1)
	Adding requirement cryptography>=1.5(from fido2 0.9.1)
Resolving: fido2 0.9.1
	New pin: fido2 0.9.1
======== Ending round 0 ========
...
======== Ending round 2 ========
Finish resolving
======== Resolution Result ========
Stable pins:
  fido2 0.9.1
   six x.x.x
   cryptography x.x.x
Extracting package metadata
🔒 Lock successful
Changes are written to pdm.lock.
Changes are written to pyproject.toml.
Synchronizing working set with lock file: 3 to add, 0 to update, 0 to remove

  Install cryptography x.x.x successful
  Install six x.x.x successful
  Install fido2 0.9.1 successful

🎉 All complete!

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.4.0                              
Python Interpreter: /usr/local/bin/python3.9 (3.9.2)   
Project Root:       /tmp/...
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.2",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "20.4.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 20.4.0: ...",
  "python_full_version": "3.9.2",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "darwin"
}

PDM is ignoring FreeBSD requirement at https://github.com/Yubico/python-fido2/blob/bd72e7aaab08c4e0ebed72fe7cb5f9edd8a32a36/setup.py#L59

@LouisStAmour LouisStAmour added the 🐛 bug Something isn't working label Mar 9, 2021
@LouisStAmour LouisStAmour changed the title On non-FreeBSD systems, installing On non-FreeBSD systems, installing fido2 fails due to platform_system check for requirement Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant