PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Monday the 11th of June, 2018

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[21:15:31] <elibrokeit> How can I use environment markers to specify sys.platform.startswith() ?
[21:16:22] <elibrokeit> I'm given to understand that detecting freebsd requires matching freebsdX with some digit at the end
[21:56:06] <techalchemy> elibrokeit: if you want to compare against freebsd you should use 'somekpkgname; platform_system=="FreeBSD"'
[21:56:29] <elibrokeit> ah, thanks.
[21:56:35] <techalchemy> pretty sure that's supported
[21:56:43] <elibrokeit> I couldn't figure out where these keys are listed
[21:57:02] <techalchemy> haha, I don't think it's obvious
[21:58:50] <techalchemy> elibrokeit: https://github.com/pypa/packaging/blob/master/packaging/markers.py#L78
[22:00:56] <elibrokeit> I'm trying to fix borgbackup, since it seems like every single release it changes how it does its versioned depends on msgpack, because they're using one set of markers to cover python==3.4 (needs <=0.4) and python>3.5 (should use the latest)
[22:02:00] <elibrokeit> While I'm at it I figured I'd fix their "if sys.sys.version_info > (3, 6): extras_require['foo'][0] = ....."
[22:02:32] <techalchemy> hm yeah that's a bit legacy, they could be maintaining it for people who are using pip...uh
[22:02:33] <elibrokeit> this link lists the markers, but it doesn't tell me the permissible values :(
[22:02:35] <techalchemy> less than 6?
[22:02:54] <elibrokeit> or they don't realize standards exist
[22:03:09] <techalchemy> plausible
[22:03:24] <techalchemy> it doesn't list their values because the values come from the vaerious modules
[22:04:16] <elibrokeit> It lists the marker in https://www.python.org/dev/peps/pep-0508/
[22:04:29] <elibrokeit> I get that it comes from modules
[22:05:18] <elibrokeit> Thing is, I see in https://docs.python.org/3/library/sys.html#sys.platform some things are mentioned
[22:06:18] <techalchemy> it can't mention it in the first place because the markers handle updates to the python platform module
[22:06:19] <elibrokeit> but it's a bit difficult to check this up on OSes I don't use, of course. And I've got no clue where one might be expected to look to find this documentation, which I guess helps explain why there isn't any
[22:06:39] <techalchemy> the pep also can't be strict about it because again, the platform module receives updates
[22:07:08] <elibrokeit> Sure, but it looks like the sys.platform docs just give you helpful tips about some known platforms
[22:07:17] <techalchemy> well this isn't related to sys.platform
[22:07:20] <techalchemy> that is the sys module
[22:07:34] <techalchemy> the platform module is much more useful
[22:07:39] <techalchemy> https://github.com/python/cpython/blob/8b94b41ab7b12f745dea744e8940631318816935/Lib/platform.py
[22:08:09] <techalchemy> when you need to do very specific things, I have no idea where documentation is on this because I don't really look at documentation for this stuff
[22:08:18] <techalchemy> but I interact with the code somewhat regularly so I can point you at that
[22:09:58] <techalchemy> even the code itself doesn't really say what it will return for platform_system in all cases though
[22:10:03] <techalchemy> it just does an os call to uname -p
[22:10:08] <elibrokeit> Oh, so this is just uname -s
[22:10:26] <techalchemy> -s? sure
[22:11:12] <techalchemy> it only actually defines the known edge cases