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

pip installable GAM #1466

Open
janosh opened this issue Jan 6, 2022 · 9 comments
Open

pip installable GAM #1466

janosh opened this issue Jan 6, 2022 · 9 comments
Assignees

Comments

@janosh
Copy link
Contributor

janosh commented Jan 6, 2022

pip install appears to be broken. This used to work after #1417 and #1419:

pip install git+https://github.com/jay0lee/GAM.git#subdirectory=src

It now errors:

Building wheel for pyscard (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/janosh/.venv/py310/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/5m/sb0wx83j0m36xk_zswkfnffh0000gn/T/pip-install-fsew_zvn/pyscard_03a25dcce2b24efdafc5928d6ab7509a/setup.py'"'"'; __file__='"'"'/private/var/folders/5m/sb0wx83j0m36xk_zswkfnffh0000gn/T/pip-install-fsew_zvn/pyscard_03a25dcce2b24efdafc5928d6ab7509a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/5m/sb0wx83j0m36xk_zswkfnffh0000gn/T/pip-wheel-6v8_svy6
       cwd: /private/var/folders/5m/sb0wx83j0m36xk_zswkfnffh0000gn/T/pip-install-fsew_zvn/pyscard_03a25dcce2b24efdafc5928d6ab7509a/
  Complete output (8 lines):
  running bdist_wheel
  running build
  running build_py
  running build_ext
  building 'smartcard.scard._scard' extension
  swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c
  swig -python -outdir smartcard/scard -DPCSCLITE -D__APPLE__ -D__LION__ -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i
  error: command 'swig' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for pyscard

Is a release to PyPI still on the roadmap?

@jay0lee
Copy link
Member

jay0lee commented Jan 6, 2022 via email

@jay0lee jay0lee closed this as completed Oct 3, 2024
@jay0lee jay0lee reopened this Feb 6, 2025
@jay0lee jay0lee changed the title pip install broken pip installable GAM Feb 6, 2025
@jay0lee
Copy link
Member

jay0lee commented Feb 6, 2025

pip install gam7

should be working though it's not automated for new releases just yet. I'd also like to make the yubikey-manager package optional if possible since so few users use it and it requires a bunch of additional OS packages to be installed before the above will work.

@jay0lee jay0lee added enhancement and removed bug labels Feb 6, 2025
@taers232c
Copy link
Contributor

taers232c commented Feb 6, 2025

On MacOS, it installed it here: gam7 in /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages

But it installed the source.

@jay0lee
Copy link
Member

jay0lee commented Feb 6, 2025

We shouldn't need the alias, there's a way to add a command with pip I need to explore and add to pyproject.toml I believe.

The assumption here is that anyone installing the Python package... knows something about working with Python packages and paths. If they don't they should be using the GAM binary.

@taers232c
Copy link
Contributor

taers232c commented Feb 6, 2025 via email

@jay0lee
Copy link
Member

jay0lee commented Feb 6, 2025

I've uploaded 7.3.5. You can try upgrading with:

pip3 install --upgrade gam7

a "gam" executable command should now be added to the Python bin directory which should be in user's PATH.

If this looks pretty good I still need to add the Github action to auto-build each new version on new tags and then upload it to PyPi.

@jay0lee
Copy link
Member

jay0lee commented Feb 8, 2025

Yubikey as optional should now be working also. So:

pip3 install --upgrade gam7

skips Youbikey. To install with yubikey support (assuming you have installed the necessary swig and libpcsclite-dev packages already) run:

pip3 install --upgrade gam7[yubikey]

@taers232c
Copy link
Contributor

taers232c commented Feb 8, 2025 via email

@jay0lee
Copy link
Member

jay0lee commented Feb 8, 2025 via email

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

3 participants