[18:48:34] <nickoe> I am trykng to use it and it seem to work fine for me use case, except it requires distutils to be installed on the macine where it should run. And I can't seem to package distutils in the package.
[19:08:26] <tos9> nickoe: this is really more about specific pypa tools (which pex isn't)
[19:08:33] <tos9> they have a slack IIRC or a discord or something
[19:08:43] <tos9> nickoe: but distutils is part of the stdlib -- it should be present everywhere a normal Python install is
[19:09:04] <tos9> if you don't have a "normal" one thouhg, it'll be specific to how unnormal yours is as to what the best thing to do is
[20:14:28] <scottfurry> toad_polo - thanks. the formatter project appears dead. The pypi page is there but clicking home page takes me to a github 404 page.
[20:16:18] <toad_polo> Ah, yeah, that's nothing that anyone can do on the PyPI side.
[20:34:04] <nickoe> tos9: Thus is just an ubuntu machine
[20:47:39] <tos9> nickoe: then presumably it should have distutils just fine AFAIK?
[21:39:57] <nickoe> tos9: Not it clearly does not. In other pytords python3-distutils on ubuntu is not installed by default when python3 is installed.
[22:36:25] <tos9> nickoe: oh ok yeah that fits in the "unusual setup" category yeah
[22:36:38] <tos9> I have to agree with toad_polo (not that he needed it)
[22:37:08] <tos9> nickoe: Installing a normal Python on a debian-OS isn't generally difficult, I don't think that should discourage you really.
[22:37:52] <nickoe> It is just that I wanted to bundle a python app for a test system at work and the test system guys were not really hooked on installing "random" dependencies on all the test heads
[22:38:23] <nickoe> But I also mentioned that distutils sorta is a "standard library" thing in python, given it was documented in the standard library python doc.
[22:50:59] <toad_polo> nickoe: It's not "sorta" a standard library thing.
[22:51:14] <toad_polo> It is unequivocally part of the standard library.
[22:52:07] <nickoe> Ok, thanks. Do we have a place that specifically says this or should I just point to the distutils documentation page?
[22:52:41] <nickoe> (I am just trying to ensure that claiming that we must use python3-distutils to be happy is not wrong)
[22:52:47] <toad_polo> I mean, the distutils documentation is just a page on the standard library's documentation. 😛
[22:53:46] <toad_polo> I think that debian's philosophy on this is that distutils is not usually (ever?) useful at runtime, so it's more properly thought of as a build-time dev tool.
[22:54:08] <toad_polo> And so they separate it out.
[22:55:51] <toad_polo> I don't know the details of pex, if it has a runtime dependency on distutils, you'll need to include it, and that should be fine. If it is just a build-time dependency then you only need it on the system that prepares the package.
[22:57:50] <nickoe> well, my testing shows that it works when I install the python3-distutils pacakge, because it tried to import distutils at runtime.
[23:04:40] <andr_> nickoe: I've never used pex but it most likely vendors setuptools that heavily relies on distutils
[23:06:17] <nickoe> mmm, yeah, that could aslo be the reason.
[23:06:27] <nickoe> I mean it is a custom python module with a setup.py
[23:14:02] <tos9> it's amazing how common this misconception is -- and I am by no means directing that specifically at you, it's just interesting to me
[23:14:26] <nickoe> But does tools exist to package that easily. I could not seem to find anything. I could not get zipapp to work
[23:14:33] <tos9> but there's a huge area in between "collection of app, dependencies, *and* python" and "*single binary* collection of app, dependencies and python"
[23:14:43] <tos9> nickoe: you don't need one! that's why it doesn't exist
[23:14:49] <tos9> the tools exist for the *second* problem
[23:15:17] <nickoe> I would like a tool that I can point at my app and it will package all in an executable zip or whatever
[23:15:40] <tos9> for the first one you literally just download a python off python.org, perhaps compile it, but probably for ubuntu not, and then run `your/downloaded/python/bin/python -m pip install -r requirements.txt` and sent that wherever you want
[23:16:28] <tos9> nickoe: there is no good tool that does that unfortunately -- so if you want to be pragmatic, I'd give up now personally :) having used all these tools before.
[23:16:48] <tos9> if you *insist* though that you have a real need for the *single binary* part of that equation, then even then I'd probably consider shiv before you consider pex
[23:17:00] <tos9> but it will not solve debian shipping a broken python, so you still need to address that.
[23:25:40] <nickoe> mm, I will have a look at it tomorrow agian. It is getting way too late here. Good night from here.