ClimenteA/pyvan

Feature request: Python version and automatic downloading of embedded Python file and get-pip.py files

Closed this issue · 3 comments

@ClimenteA It would probably be nice to be able to specify which version of Python you want to package your app with. This would also allow to automatically download (e.g. requests.get) the proper embedded version (if missing) from the following URL:

https://www.python.org/ftp/python/3.8.7/python-3.8.7-embed-amd64.zip

And also get the get-pip.py file (if missing) from:

https://bootstrap.pypa.io/get-pip.py

Maybe we could extend the interface with two arguments:

"python_version":  "3.8.7",
"download_missing_embedded_files": True

Do you think this sounds like a nice feature?

I had that implemented on a previous release since it was just one download for getpip and python zip I removed it.

It would be nice if we have this feature :)

Maybe instead of adding new parameters:

  • if zip and get pip are not found then try to download,
  • if that fails then throw error.

A check with the latest python version would be nice to have by default.

Pinning a specific version it's good to have: "python_version": "3.8.x",

@ClimenteA Alright I am fine with that logic. We'll just have one new option for the python_version then. If 'x' is specified for a major/minor/patch version we just try to get the highest available version from the https://www.python.org/ftp/python/ index

Now on the problem of picking the "latest" Python version (probably the default option if python_version is not specified python_version=None. This is quite tricky since it generally a good practice to stay one major Python version behind the most recent python release. So it would be something like getting the last release number from the https://www.python.org/ftp/python/ index, decrementing it with one minor number, and maximizing the patch number. E.g.:
for 3.9.1 as the max in the index we would go to 3.8.7. Would you agree with that?

Yes, sounds good