PYTHON_VERSION = null?
there is some python code in my repo, that doesn't have anything to do with the sveltekit app i'm building. installing python takes a long time and is a waste of resources - how can i override this automatically-detected dependency? can i set the version to null as an env var?
8 Replies
is there a better way to prevent pages from installing python?
I don't think you can prevent it but if you set the
PYTHON_VERSION
environment variable to 3.11.5
(the default) then it shouldn't install a different version.yeah i don't need a different version, i don't nee python at all but i can't override the auto-detect without moving my python code to .gitignore (which i don't want to do because i need to develop the backend in the same repo.)
is there a way i can cache the python install so it doesn't take up so much time with every new build?
Yeah what I suggested should work and not install a different version but use the one already there
oh, got it. so it's already got that installed
lemme try now.
is there some default variable i can use so that i don't need to check forever what the default is? like $DEFAULT_PYTHON?
hardsetting to 3.11.5 worked btw, thank you so much @Cyb3r-Jok3 ! saves me like 2 mins every build.
I don't think there is a enviroment variable for it but I got the version from https://developers.cloudflare.com/pages/configuration/language-support-and-tools/
got it, i just am hoping to avoid having to re-check that every time they change it.
Definitely not ideal. You should make a suggestion in #pages-feature-suggestions