Closed mikkelam closed 7 years ago
It is possible to import modules with a dot in the name (http://stackoverflow.com/a/1828249/3169491), but it does not seem as a very good solution. I think it would be better to rename the module :sweat_smile:
This was actually due to an issue with the packing of the module, assuming you were using Python 2.x. There's a new version up on PyPI that should work.
There are a ton of modules out there named apns and using a namespace and keeping the module name descriptive seems clearer than coming up with a random module name :)
Cool, btw could you remove the cryptography library. It is not used anywhere, and it can't be installed with pip3 :) thanks!
Even though its not used directly, PyJWT requires it to generate the auth token (Apple's requirement is an ECDSA algorithm) : https://pyjwt.readthedocs.io/en/latest/installation.html#cryptographic-dependencies-optional
You'll get a NotImplementedError if you try to send a push without cryptography installed.
I remember having issues getting cryptography installed with pip3 on my Mac, but I eventually got it working. (If you happen to be on a Mac- I believe I ended up having to install OpenSSL via homebrew.)
Ah, I see. That's great man. Thanks. So, I had to install build-essential
, libssl-dev
, andlibffi-dev
before it worked. This is also explained in https://cryptography.io/en/latest/installation/#building-cryptography-on-linux .
I believe there is an issue with not being able to import this when pip installed, maybe because the name contains '.'