autopkg/recipes

FR: Make GenerateRelocatablePython a Shared Processor

Closed this issue · 9 comments

apizz commented

Describe the problem
Recently needed to create our own Python framework utilizing https://github.com/gregneagle/relocatable-python with some custom requirements and discovered that within this repo there exists a custom GenerateRelocatablePython.py script used in conjunction with a recipe for packaging autopkg.

Preferences contents
N/A

AutoPkg output
N/A

Expected behavior
In a perfect world, I'd like to see GenerateRelocatablePython become a Shared Processor. This change would allow a single RelocatablePython recipe to be made which admins could customize with their desired install path, python version, and requirements for their own deployments.

Version (please complete the following information):

  • OS version: any
  • AutoPkg Version: latest
apizz commented

I have the recipe currently in a priv repo only. That said, and maybe I'm just not fully clear, but the point of making something like GenerateRelocatablePythong a shared processor is so that others can use in their own recipes without needing to make / maintain a separate copy of the python script in their own repo

apizz commented

The only requirement then is cloning the repo the shared processor lives in

apizz commented

So I see 2 scenarios at the moment:

  1. Admin wants to deploy a particular version of Python w/ specified dependencies in their environment. This is where my proposed recipe would come in, and where the admin could specify as part of Input variables where this is installed in order to more efficiently package this up and pull it into however they deploy packages.
  2. An admin who likr autopkg needs a relocatable Python within their project and wants to build the resulting PKG in the same way that the autopkg project itself does.

Am I incorrect that in both cases an admin would have to make a copy of the GenerateRelocatablePython processor to address this? I'm taking this directly from: https://github.com/autopkg/autopkg/wiki/Processor-Locations#shared-recipe-processors

I think this sounds like a house of cards.
I'm not terribly comfortable with people building increasingly complex toolsets on top of my relocatable-python project. I make zero promises that I'll keep it compatible with things that use it. I make zero promises that it will continue to work the same way as it does today and output the same artifacts. Heck, I don't even promise to maintain it.

All this said, I don't understand why you cannot use GenerateRelocatablePython as a shared processor right now. You'd have to repo-add the recipes repo, but that's not a tough ask. You'd then use "com.github.autopkg.AutoPkgGitMaster/GenerateRelocatablePython" as the processor name, ala https://github.com/autopkg/autopkg/wiki/Processor-Locations#shared-recipe-processors

apizz commented

Hmm, I didn't realize you could use it that way without having a stub recipe. I'll give that a go.

apizz commented

Confirmed that worked as expected. Thanks!