PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Thursday the 26th of March, 2015

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[00:09:33] <dstufft> ionelmc: dunno
[01:43:05] <lifeless> dstufft: some figures up on the PR
[01:43:21] <lifeless> dstufft: you seem to be getting torn both ways quite a lot :) - I've been getting whiplash reading your updates
[01:43:37] <dstufft> lifeless: heh, I tend I brain dump a lot
[01:44:10] <dstufft> my comments tend to more or less be a lot of raw "wahtever my thoughts are at this exact moment"
[01:46:07] <lifeless> thats fine :)
[01:46:21] <lifeless> I'm glad you're not decided on b!
[01:51:46] <lifeless> dstufft: I am fairly sure now though, that lots and lots of setup_requires are install_requires
[01:51:56] <lifeless> but I need to take a break and grab good and stuff
[01:53:53] <lifeless> dstufft: any work from jason on this stuff?
[01:55:34] <dstufft> lifeless: not yet no
[01:55:51] <lifeless> k
[01:59:48] <dstufft> lifeless: hopefully this hasn't be too terribly painful, there's a lot of postel's tarpit going on so changes tend to get a lot of "on the fence"-ness as people try to decide whether the potential breakages are worth the change
[02:00:37] <lifeless> dstufft: its ok so far
[02:00:48] <lifeless> dstufft: I really really really don't like b/c/d though :)
[02:01:26] <lifeless> dstufft: I'd like the assessment to be 1) 'is (a) reasonable from first principles' and 2) 'will it harm the ecosystem if we do it' :)
[02:01:48] <lifeless> at the moment I'm focused on assessing 2)
[02:01:55] <lifeless> because the concerns raised are good ones
[03:10:34] <dstufft> lifeless: ping
[03:11:48] <lifeless> dstufft: pong
[03:12:42] <dstufft> lifeless: nevermind, I realized your branch has test packages in it I can use
[03:12:48] <lifeless> :)
[03:12:58] <lifeless> patches-with-tests, howabout that
[03:22:54] <dstufft> lifeless: I think I just killed (a) :/
[03:23:33] <lifeless> oh?
[03:24:07] <dstufft> pip wheel doesn't install dependencies
[03:24:32] <dstufft> so things that appear first in the dependency list won't be installed before the setup.py gets executed
[03:24:39] <dstufft> they'll just have the wheel built first
[03:25:12] <lifeless> but thats because pip wheel doesn't understand setup_requires at all.
[03:25:19] <lifeless> we have no implementation for it whatsoever
[03:25:31] <dstufft> pip wheel reuses RequirementSet
[03:25:47] <dstufft> iirc
[03:25:57] <lifeless> ish
[03:26:07] <lifeless> it does
[03:27:42] <dstufft> ah right, it just called prepare_files, but not the other one
[03:28:31] <dstufft> but I don't think that (a) is reasonable for pip wheel, which means you'd need to implement (b) for pip wheel anyways, either inside of WheelBuilder or as part of RequirementSet
[03:28:52] <dstufft> right?
[03:28:55] <dstufft> Or am I missing something
[03:33:34] <lifeless> I think some of the nuance in the discussion has been lost
[03:33:36] <lifeless> have commented
[03:33:40] <lifeless> but for clarity
[03:34:16] <lifeless> well, updated there. read it and lets cat
[03:45:51] <dstufft> lifeless: ah yea, I forget what all the letters were being stand ins for ;) (Or rather Iw as mentally associating multiple things together)
[03:47:02] <lifeless> yeah
[20:04:23] <lifeless> dstufft: hi, so
[20:57:53] <dstufft> lifeless: heya, I'm not going be here much longer. Have a ballet thing for Alyssa in a bit
[20:58:06] <dstufft> just waiting on them to get ready
[20:59:06] <lifeless> dstufft: ok
[20:59:18] <lifeless> dstufft: I wanted to check out design for the iteration needed to align with your post
[20:59:52] <lifeless> dstufft: e.g. I have no idea how to sanely do the thing you asked for vis-a-vis *not* using a venv but still having isolated installs
[21:03:13] <dstufft> lifeless: I would do something like, make a temporary directory, install into that temporary directory using the same mechacnisms we use to implement ``pip install -t $TMPDIR/whatever``, then just do subprocess.Popen(..., env={"PYTHONPATH": "$TMPDIR/whatever"})
[21:11:29] <lifeless> dstufft: it seems like it would be a lot easier to just use venvs ;)
[21:13:27] <lifeless> dstufft: would it be reasonable to just whole-hogg it and build wheels for this case
[21:14:20] <dstufft> easier to implement? Yes probably, but it's going to break in strange situations and do unexpected things (we used to have a mode that pip would install "into" a virtual environment instead of being invoked inside of an environment, it didn't work very well) and it'll put a dependency of virtualenv on pip which is something i'd rather avoid (especially since we're starting to get Linux distros use us as part of their build chain)
[21:14:46] <dstufft> lifeless: you mean instead of invoking ``setup.py install`` invoke ``setup.py bdist_wheel`` and then install that wheel?
[21:15:38] <lifeless> yes
[21:15:53] <lifeless> I -really- don't like the performance headache that anything else implies
[21:17:41] <ionelmc> lifeless: so the setup_requires deps are getting installed in the current env or not?
[21:18:28] <lifeless> ionelmc: dstufft has decided against that, we're now discussing impl of the alternative
[21:18:44] <ionelmc> in case you haven't considered it, you could just dump em in a tmp dir, and site.addsitedir(the_tmp_dir) to get pth loading and all the stuff
[21:18:53] <ionelmc> but you'd have to do that in a subprocess to be safe
[21:19:04] <lifeless> we run all setup.pys in subprocesses
[21:19:10] <ionelmc> oh
[21:19:15] <ionelmc> well perfect then
[21:19:16] <ionelmc> :)
[21:20:32] <ionelmc> lifeless: now i get it, you were talking about how to install the stuff in the tmpdir, right?
[21:20:56] <lifeless> and relatedly how many tmpdirs are needed
[21:22:06] <dstufft> lifeless: well anything else would have roughly equivalent performance to what we have today right? So it wouldn't be a regression in performance it just wouldn't get all of the possibly benefit of the change? I'm totally on board with building wheels and installing them, I'm just trying to determine if it can be done reasonably in a successive PR or if you'd end up needing to throw a bunch of code out.
[21:22:49] <dstufft> building a wheel first is going to break some things, I'm happy to tell those things they are doing it wrong, but we might need to phase it in
[21:22:55] <lifeless> dstufft: I might do some explorative stuff, since you're about to pop out
[21:23:03] <lifeless> I have some other code to review first
[21:23:12] <lifeless> so may not get to it today
[21:23:26] <dstufft> I know it'll break old versions of Django, and anything that copied Django's setup.py because they did some monkeypatching in the setup.py
[21:23:46] <lifeless> wow, 3.5 is unhappy with setuptools right now
[21:24:05] <lifeless> dstufft: so django can't build wheels?
[21:24:09] <dstufft> lifeless: old versions can't
[21:24:20] <lifeless> ok so fallback needed
[21:24:21] <dstufft> gotta go!
[21:24:28] <dstufft> see ya
[21:24:34] <lifeless> ciao
[21:24:56] <ionelmc> lifeless: what's wrong with --single-version-externally-managed (instead of wheels) ?
[21:25:06] <lifeless> ionelmc: recompiling numpy
[21:25:26] <lifeless> ionelmc: my analysis of setup_requires showed that most of them are also install_requires
[21:25:44] <ionelmc> lifeless: but that's more or less exactly what we have now
[21:25:47] <lifeless> which sucks
[21:26:06] <lifeless> if what we have now didn't suck, noone would complain or be wanting to change it :)
[21:26:35] <ionelmc> lifeless: you can't solve everything at once
[21:26:51] <ionelmc> i thought you wanted to solve the runtime dependency issue first
[21:27:20] <lifeless> well this is part and parcel of the setup_requires issue
[21:27:31] <lifeless> I want to make setup_requires not suck
[21:29:17] <ionelmc> correct first, fast later :-)
[21:29:32] <lifeless> that aphorism is a bit misleading
[21:29:38] <lifeless> correct first, optimise later
[21:29:46] <lifeless> but fast is an attribute of correct design
[21:30:00] <ionelmc> it's not
[21:30:12] <ionelmc> "correct" is just an enabler
[21:30:22] <lifeless> I beg to differ, but have no interest in a long debate
[21:30:23] <ionelmc> you can have "fast" but "very wrong"
[21:30:43] <ionelmc> therefore `fast` is not an attribute of `correct`
[21:31:47] <lifeless> let me rephrase. The limits to which you can optimise a particular thing are constrained by the design.
[21:32:14] <ionelmc> well put
[21:32:40] <xafer> I'm all for the wheel building solution :) and if some projects do not support it, they'll not put their setup_requires inside setup.cfg
[21:32:58] <xafer> and continue to rely on legacy setup_requires
[21:33:10] <ionelmc> but `correct` doesn't automatically make it fast, it just sets the speed limit
[21:33:56] <lifeless> ionelmc: there can be many correct designs for a given problem; picking the design to use needs to be done with performance in mind, otherwise you may well end up constrained to poor performance.
[21:34:44] <lifeless> xafer: dstufft has mentioned having pip build-wheels-and-install-wheels always, I was speculating on whether doing that now would make the overall work easier
[21:34:45] <ionelmc> on the other hand, can't you just use pip's install thingy to install those deps?
[21:34:58] <ionelmc> it would use whatever is available, wheel or sdist
[21:35:11] <lifeless> ionelmc: that thingy is rather complex
[21:35:29] <lifeless> ionelmc: and has constraints - you can't install anything other than a wheel without the necessary dependencies
[21:35:49] <lifeless> lots of setup.py's are written badly (e.g. they have undeclared setup_requires and fail if you don't install their install_requires first)
[21:36:27] <lifeless> most/all of which can be tracked back to /everyone/ hating how setup_requires works
[21:36:59] <lifeless> a better implementation needs to address all the issues to get past that
[21:39:59] <xafer> lifeless, well if pip starts to take the setup_requires responsability it seems logical to directly build wheels
[21:41:52] <xafer> cf https://github.com/pypa/pip/pull/2603#issuecomment-86121640
[21:43:12] <lifeless> yah
[21:43:15] <xafer> with ideally the recursive possibility to deal with setup_requires of a package present in a setup_requires
[21:43:30] <lifeless> not ideal, its a must do
[21:43:38] <lifeless> its covered by my current patch
[21:43:53] <lifeless> the only issue with my current patch is that it does the pragmatic thing and installs into the target env
[21:44:20] <xafer> yes, which most people (including me) do not like :)
[21:44:32] <lifeless> I know
[21:44:49] <lifeless> thus the discussion about the details of implementing the temp thing
[21:48:34] <xafer> dstufft's plan of pip install -t in a temp dir seems simple enough ?
[22:08:03] <lifeless> we'll see
[22:08:13] <lifeless> given that this is the implementation of 'pip install' we're talking about
[22:08:21] <lifeless> its not anywhere near as simple as 'use pip install'
[22:40:41] <xafer> well via subprocess it seems like it would stay simple, an issue could be the detection of dependency loops among setup_requires
[22:47:31] <lifeless> perhaps
[22:47:36] <lifeless> give it a go :)
[22:50:20] <xafer> I would love to :) but I don't that happening before at least next month
[22:50:38] <xafer> don't *see* that