[14:45] <OvenWerk1> Eickmeyer: more on the path to module use...
[14:47] <OvenWerk1> studio-controls might be installed in /usr/local/
[14:48] <OvenWerk1> but the path to modules does not include that
[14:50] <OvenWerk1> The only thing I can think of that would deal with this is to put the import statement in main() after we figure out the install path and add the directory our module sits in to sys.path
[16:33] <Eickmeyer> OvenWerk1: /usr/local = BAD. That's completely against Debian packaging rules.
[16:34] <Eickmeyer> We simply can't do that.
[16:34] <OvenWerk1> Eickmeyer: I am not packaging... for any directory :)  but if someone chooses to make install they can install in local
[16:35] <Eickmeyer> Sure, that's fine.
[16:35] <OvenWerk1> (or opt)
[16:35] <Eickmeyer> Again, ew. :)
[16:37] <OvenWerk1> The problem becomes that a module would be installed in that directory space and python would not normally look there for it.
[16:38] <OvenWerk1> (this may not be totally true, python may detect being run in local and change it's sys.path)
[16:40] <OvenWerk1> It would also be nice to be able to test my code "in place" in my development directory tree
[16:46] <Eickmeyer> Python has paths much like bash, so you can install a python module in the usual spot and it should get picked-up.
[16:47] <OvenWerk1> Yes, in /usr/lib but sys.path does not include /usr/local/lib
[16:48] <OvenWerk1> I could put the module in {prefix}/bin
[16:48] <OvenWerk1> but that is not nice either
[16:48] <OvenWerk1> (but it is how I am testing)
[16:49] <Eickmeyer> Makes sense, but I"m just worried about reproducibility.
[16:50] <OvenWerk1> I already detect where we are run from to get install_directory
[16:51] <OvenWerk1>  I use that to findout where */share is
[16:52] <OvenWerk1> So I can add install_directory/lib/python3/packages (or whatever) to sys.path
[16:53] <OvenWerk1> but that would mean:
[16:53] <OvenWerk1> import sys
[16:54] <OvenWerk1> add runpath/etc to sys.path then import auto_jack
[16:54] <Eickmeyer> I've seen that line a lot in Python, so I think that'd be safe.
[16:54] <OvenWerk1> Eickmeyer: can you show me an example?
[16:54] <Eickmeyer> I wish I could, but I don't even know where to look, and I have to take my son to school now.
[16:55] <OvenWerk1> I would like to use "best practice"
[16:55] <OvenWerk1> ok
[16:55] <OvenWerk1> (we have no school today)
[16:55] <OvenWerk1> it being good friday
[17:02] <OvenWerk1> hmm, stackoverflow is working again with no login.
[18:03] <OvenWerk1> Eickmeyer: when you get back... I am using:
[18:04] <OvenWerk1> install_path = os.path.abspath(f"{sys.path[0]}/..")
[18:04] <OvenWerk1> sys.path.insert(1,f"{install_path}/lib/python3/dist-packages")
[18:04] <OvenWerk1> import auto_jack
[18:06] <OvenWerk1> This works fine in my development directory tree and of course effectively does nothing when packaged  ;) but will also work for someone doing make install into local
[18:08] <OvenWerk1> Googling and searching basically shows that no one agrees on a "right" way to do this. But most of the people who don't like this particular method are people who expect packages (in which case I wouldn't need any of this)
[18:19] <Eickmeyer> OvenWerk1: Yeah, Debian has basically taken the stance of "stay the **** out of /usr/local when packaging".
[18:20] <OvenWerk1> I agree. There are still people who like to build/install local stuff in local
[18:21] <OvenWerk1> controls is an application outside of packaging too and so has to take these tings into account
[18:24] <OvenWerk1>  Then /opt/ is really the old flatpack/snap and as such I can ignore it... so you ew for opt applies equally well to snap and flatpack :P
[18:25] <Eickmeyer> Yeah. /opt/ is a "stay out of" as well.
[18:27] <OvenWerk1> I am pretty happy so far as I have a module with one def in it that just prints some text and works as it should so I can move on to populating it something real. I think the first thing is to move the whole of convert into it so convert does not need a system call.
[18:30] <OvenWerk1> This has been a theme in the past few updates of controls...