Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to fallback for using different Python version #63

Closed
eliasdorneles opened this issue Aug 8, 2017 · 7 comments
Closed

Add option to fallback for using different Python version #63

eliasdorneles opened this issue Aug 8, 2017 · 7 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@eliasdorneles
Copy link
Contributor

Currently, we only use the template and support package for the user's running Python version.
It would be nice to allow users to override this, making it easier for people using the most recent Python versions (and maybe even the release candidates) to try things out.

It would be great to be able to do python setup.py ios --use-python-version=3.6 =)

@dasdachs
Copy link

I'd love to give it a go. I understand how to add the flag, but I have yet to wrap my head around the idea how the Python interpreter is passed. Does it rely on the _python_versionmethod?

@freakboy3742
Copy link
Member

@dasdachs I'm not entirely sure which _python_version method you're referring to; but there are two key problems that need to be solved here. The first is selecting the right template (generate_app_template()) and support package (find_support_package()). The second is to download and install packages from PyPI that are version/platform appropriate (install_app_requirements() and install_platform_requirements()). You need to account for Python version (3.5 or 3.6), platform (mac? iOS? windows?), and Python build type (Python 3.6 or 3.6m) when requesting the package from PyPI.

@eliasdorneles
Copy link
Contributor Author

The _python_version referred to is probably this one that was introduced recently, it's used for selecting the right template.

@dasdachs
Copy link

@eliasdorneles That is it, thank you.

@freakboy3742 Thank you for the clarification. I think I have a better understanding of the process. I'll give it my best, write some tests and return the favour with a decent pull request.

@loganasherjones
Copy link

I'm at the PyCon sprints and will be attempting to solve this problem

@loganasherjones
Copy link

Ok, I happen to be working on Linux, which makes this a little bit odder.

Right now, the linux distribution command (python setup.py linux) will generate a bash script that points to a python3 environment that should just be installed.

So, for me to test this personally, it would be better to first start tackling flatpak distrubtion (#2). Others on apple/Windows might have more success testing this.

@freakboy3742 freakboy3742 added the enhancement New features, or improvements to existing features. label Dec 21, 2019
@freakboy3742
Copy link
Member

On reflection, I'm not convinced this is necessarily a good idea - it has the potential to cause all sorts of problems when installing support packages, as the version of pip used to install dependencies will mis-identify the package versions that are valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

4 participants