Ponytech / appstoreconnectapi

Python wrapper around Apple App Store Api

Home Page:https://ponytech.net/projects/app-store-connect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage with Python 3.9

kiliankoe opened this issue · comments

Hi, I'm currently hacking on a little project that uses Python 3.9 and I'm having issues trying to use this library. It looks like it depends on the last 2.x version of cryptography, which in turn appears to be incompatible with Python 3.x (if I'm reading the metadata on pypi correctly here). On trying to install appstoreconnectapi using pipenv locally I see the following, which seems to confirm that.

An error occurred while installing cryptography==2.9.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' [...]

I'm a little confused that this project's setup.py contains REQUIRES_PYTHON = '>=3.6.0', so I'm guessing it must be possible somehow? But it's been a few years since I've touched more than a few short lines of Python, so I don't really have the best knowledge around tooling. Any help is much appreciated!

@kiliankoe thanks for reporting this issue.

It should work with python 3.9, this is the version I am using and I have cryptography version 2.9.2 installed in my virtualenv.
What pip version do you have? Can you try to update it?

pip --version
pip install -U pip

pip reports as being the latest version (22.0.3). I think there might be another underlying issue here. On trying to manually install cryptography==2.9.2 inside my virtual environment it's trying to build it from source (apparently there's no prebuilt binary available for M1 Macs?). On doing that it fails to find OpenSSL headers, which is installed and available.

This definitely isn't an issue with this library. Thanks for looking into it in any case! I'll go dig around and see what I can find about successfully installing cryptography on my architecture.

Indeed this is an issue installing the cryptography module and the error message was not helpful in the first place.
I'm not on Mac and can't help here, good luck!

commented

Using python 3.9.16, pyenv installation on an Apple M1 and this is what worked for me:

export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"                                                                                        
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
pip install cryptography~=2.9.0
pip install requests PyJWT~=1.6.0
pip install appstoreconnect