Don't complain if a patch file doesn't exist for a particular version of python
I hope this isn't too controversial: I personally have this
ASDF_PYTHON_PATCHES_DIRECTORY globally set up on my machine, which is
super useful when I install/reinstall random versions of Python, but is
kind of annoying when I try to install versions of python that don't
actually need a patch: I have to create an empty file just to get it to
install.
With this change, I don't have to do that: instead I only have to create
.patch files for the versions of Python that need it.
Bump! How do you feel about this, @danhper?
Hi! I feel like this is slightly hacky for no good reason.
I think that simply prepending the command by env -u ASDF_PYTHON_PATCHES_DIRECTORY should do the job. Or am I missing something?
Thanks for the reply! You are correct that prepending with env -u ASDF_PYTHON_PATCHES_DIRECTORY is one way to work around this issue, and I would understand if you choose to reject this PR.
Let me try to explain my thinking: I'm trying to get my projects into a state where their dependencies are captured in a .tool-versions file that asdf understands, with my end goal being that I can reformat my laptop and get working again with nothing more than a git clone and an asdf install. I'm achieving that goal right now by creating various empty patch files (example), but I'd love to not have to create those in the first place. The env -u approach you suggest doesn't quite achieve my goals because it requires me to sometimes run asdf install and sometimes run env -u ASDF_PYTHON_PATCHES_DIRECTORY asdf install, which seems needlessly annoying.
Sorry for the massive delay. I think that makes sense indeed, thanks for the PR
Thanks, @danhper. I sure appreciate it!