Giter VIP home page Giter VIP logo

Comments (9)

LudovicRousseau avatar LudovicRousseau commented on June 19, 2024

How did you install pyscard? from source code?

from pyscard.

sjenning avatar sjenning commented on June 19, 2024

Gah. I was building from source (rpmbuild), but some compiler flags in the build env were messing it up. Nevermind!

from pyscard.

cluck avatar cluck commented on June 19, 2024

I just bumped into this error on OSX 10.10 using pip install --user pyscard.

This is related to swig/swig#250. In other words, different versions of Swig produce smartcard/scard/_scard.so that need different versions of smartcard/scard/scard.py that is not compatible among versions. Thus, smartcard/scard/scard.py should be re-generated together with _scard.so during installation, instead of being distributed as source file.

A quick comparison among the various smartcard/scard/scard.py produced here, it looks to me as if the version distributed with pip does not match the definition in smartcard/scard/scard.i anymore anyway.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 19, 2024

@cluck do you have a patch to propose? I am not a setuptools expert.

from pyscard.

 avatar commented on June 19, 2024

The same behavior can be seen on Windows with Python 2.7.10. I tried to manually run latest swig and regenerate the files as suggested with no result.

from pyscard.

sebastianarena avatar sebastianarena commented on June 19, 2024

+1 for me
Working on OSX 10.10.5 and python 2.7.10
Doing pip install pyscard will install 1.9.0 and can't run not even the examples with error AttributeError: 'module' object has no attribute 'SCARD_SCOPE_USER'
Installing using pip install <url to master.zip> makes a different error saying scard module does not exist

Any help? Does python 3 fix this issue?
Any workarounds?
I couldn't understand what other user this as workaround with swig and such.

Anything I can help, let me know.

from pyscard.

cluck avatar cluck commented on June 19, 2024

I think the problem happens in the process of creating the source archives that are uploaded to sourceforce and pypi: they differ from the output of python setup.py sdist on a clean checkout and in particular they contain the file smartcard/scard/scard.py.

If this file wasn't present in the source, it would be created in the build_ext step, in a format that is suitable to the generated wrapper.

from pyscard.

LudovicRousseau avatar LudovicRousseau commented on June 19, 2024

@cluck I think you are right.
Can someone propose a patch so that python setup.py sdist does the correct thing?

from pyscard.

cluck avatar cluck commented on June 19, 2024

I think that starting with a clean checkout and running python setup.py sdist as the sole command is the only option for now.

I suspect it to be a bug in the realm of Distutils/Setuptools that python setup.py sdist picks up files excluded in in the MANIFEST.in and not being idempotent before/after running python setup.py build or other commands.

from pyscard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.