pyrogram / tgcrypto

Fast and Portable Cryptography Extension Library for Pyrogram
https://pyrogram.org
GNU Lesser General Public License v3.0
175 stars 41 forks source link

Arm support inconsistent #1

Closed richard-scott closed 5 years ago

richard-scott commented 5 years ago

Hi,

I'm using a Raspberry Pi 3 Model B with pyenv to manage my Python versions. I can install your package with Python 3.5.4 and get this file installed:

~/.pyenv/versions/3.5.4/lib/python3.5/site-packages/tgcrypto.cpython-35m-arm-linux-gnueabihf.so

However, when I change to using Python 3.6.6 I get this:

~/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tgcrypto.cpython-36m.so

Obviously as the filename is different I can't load the module in Python.

richard-scott commented 5 years ago

Installation on Python 3.7.0 works fine too.

I donwloaded this TgCrypto-1.0.4-cp36-cp36m-linux_armv7l.whl and manually checked the contents, and it has the incorrectly named file in there.

delivrance commented 5 years ago

@richard-scott Hi there!

You are right, it looks indeed like a faulty wheel.

Unfortunately, I'm not able to do any test on this until next week as I'm on vacation. Meanwhile, you can always compile from source with:

pip install tgcrypto --no-binary tgcrypto

On your Pi you should already have gcc and python3-dev packages installed, which are required for the compilation. If not, just install them with apt (assuming you are running raspbian).

Soon there also will be an update; I'll keep this open as a reminder. Thanks for pointing this out!

delivrance commented 5 years ago

Installation on Python 3.7.0 works fine too.

Yeah, the reason being there's no pre-built wheel for 3.7 (yet) and pip automatically builds tgcrypto from source. You can always override this behaviour using the command in my previous comment.

richard-scott commented 5 years ago

I think this can be closed now.

delivrance commented 5 years ago

Yes, thanks. Mostly because I ended up deciding not to upload any wheel for such archs.

The source is always available and error messages hinting about missing compiler/headers are quite self-explanatory.