PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 2nd of April, 2020

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[12:56:06] <toad_polo> scottfurry: I don't think there's an official one.
[12:56:14] <toad_polo> Like, in the UI.
[12:56:45] <toad_polo> There's this: https://github.com/pypa/pypi-support
[12:57:03] <toad_polo> scottfurry: What do you mean by "project dead links", though?
[12:57:22] <toad_polo> If you mean a dead link on a project's description page, that's not a PyPI thing, that's all user-generated content.
[18:47:02] <nickoe> Hello. Is this a place to discuss pex packaging?
[18:47:10] <nickoe> the pantsbuild thing?
[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.
[21:40:07] <nickoe> *in other words
[21:40:25] <nickoe> that is why I am wondering. I would have expected it to be default as well.
[21:42:48] <nickoe> tos9: if you check, http://releases.ubuntu.com/bionic/ubuntu-18.04.4-desktop-amd64.manifest distutils is not installed
[21:48:52] <nickoe> by default
[21:59:00] <toad_polo> Yeah, Debian fucks with the Python package they distribute.
[22:00:36] <toad_polo> Best to avoid using Debian's Python if you must use a Debian-based distro.
[22:26:12] <nickoe> :/
[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:06:32] <nickoe> that imports distutils
[23:06:43] <nickoe> is there a way to not make it require that at runtime?
[23:06:44] <nickoe> maybe?
[23:07:01] <nickoe> I don't remember the backtrace right now
[23:07:26] <nickoe> But it may have been from that module. I not really that well versed in writing proper python modules
[23:12:25] <tos9> nickoe: honestly though is it not just easier to download a full normal python and put that alongside whatever you're running
[23:12:38] <tos9> why does it need to use either pex or the system python even if you want to ship it to random machines
[23:12:43] <tos9> just send them a folder with everything they want
[23:12:53] <nickoe> to include the dependencies
[23:13:06] <tos9> that doesn't require either of those
[23:13:17] <nickoe> but it aslo has external dependencies
[23:13:26] <tos9> you can ship a full python, your app, and all its dependencies either installed or uninstalled, all in a normal folder
[23:13:34] <tos9> sure
[23:13:37] <nickoe> like pyusb and libusb1 IIRC
[23:13:42] <tos9> sure
[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:38] <nickoe> including dependencies
[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.