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

Could not build wheels for pyscard #169

Open
Pvanalitics opened this issue May 1, 2024 · 7 comments
Open

Could not build wheels for pyscard #169

Pvanalitics opened this issue May 1, 2024 · 7 comments
Assignees

Comments

@Pvanalitics
Copy link

MacOS
pyscard==2.0.9
python3.8

Hello, I'm having problems installing pyscard in docker. The error appears when I build Docker. This error does not appear if I try to install the library locally on a Mac.
10.51 Failed to build pyscard
ERROR 10.51: Could not create disks for pyscard, which are required to install projects based on pyproject.toml.
These are my requirements.txt:
pip~=23.2.1
openpyxl~=3.1.2
pyTelegramBotAPI~=4.17.0
smart card~=0.3
requests~=2.31.0
PySmartCard~=1.4.1
USB~=0.0.83.dev0
pyscard==2.0.9

Help me please!

@LudovicRousseau
Copy link
Owner

I have no idea what "disks" are.
I do not use docker myself.

@LudovicRousseau
Copy link
Owner

Why do you use PySmartCard?

@supersat
Copy link

supersat commented Jun 1, 2024

I ran into this issue just now as well. I think "disks" it a translation issue. For me, it says, "ERROR: Could not build wheels for pyscard, which is required to install pyproject.toml-based projects." So, the "disks" are Python wheels.

I'm not sure what is responsible for printing these errors, but I initially missed the problem:

$ pip install pyscard
Collecting pyscard
  Using cached pyscard-2.0.9.tar.gz (153 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyscard
  Building wheel for pyscard (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyscard (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_py
      Install swig and try again
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyscard
Failed to build pyscard
ERROR: Could not build wheels for pyscard, which is required to install pyproject.toml-based projects

After installing swig, installing pyscard worked for me.

@LudovicRousseau
Copy link
Owner

@supersat your error message is explicit: Install swig and try again

I already fixed the problem in 84235c9
I need to make a new release.

@LudovicRousseau
Copy link
Owner

Version 2.0.10 just released
https://blog.apdu.fr/posts/2024/06/new-version-of-pyscard-2010/

Maybe this also solves the issue with docker.

@iMichka
Copy link

iMichka commented Jul 1, 2024

Hello. We hit the following error during a build in homebrew:

Building wheel for swig (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [15 lines of output]
          /private/tmp/pip-build-env-3h83ehep/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:312: UserWarning: git archive did not support describe output
            warnings.warn("git archive did not support describe output")
          /private/tmp/pip-build-env-3h83ehep/overlay/lib/python3.12/site-packages/setuptools_scm/git.py:331: UserWarning: unprocessed git archival found (no export subst applied)
            warnings.warn("unprocessed git archival found (no export subst applied)")
          Traceback (most recent call last):
            File "/private/tmp/pip-build-env-3h83ehep/overlay/lib/python3.12/site-packages/skbuild/setuptools_wrap.py", line 643, in setup
              cmkr = cmaker.CMaker(cmake_executable)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/tmp/pip-build-env-3h83ehep/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 145, in __init__
              self.cmake_version = get_cmake_version(self.cmake_executable)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/private/tmp/pip-build-env-3h83ehep/overlay/lib/python3.12/site-packages/skbuild/cmaker.py", line 102, in get_cmake_version
              raise SKBuildError(msg) from err
  
          Problem with the CMake installation, aborting build. CMake executable is cmake
          [end of output]
  
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for swig
    Failed to build swig
    ERROR: Could not build wheels for swig, which is required to install pyproject.toml-based projects

The odd thing is that we provide our own swig in homebrew. 84235c9 enforces the usage of swig provided by pip, which is not something we would like to do (and that swig build seems to fail for another reason we did not investigate. Maybe there is a way to allow an external swig as build dep?

@LudovicRousseau
Copy link
Owner

@iMichka your issue is different.

I suggest you to patch pyproject.toml and remove swig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants