PMXBOT Log file Viewer

Help | Karma | Search:

#pypa-dev logs for Thursday the 8th of January, 2015

(Back to #pypa-dev overview) (Back to channel listing) (Animate logs)
[00:00:04] <buck1> i still say sudo get rid of that thing
[00:00:49] <buck1> ionelmc: it lools like you've run sudo easy-install pip on that machine
[00:01:01] <buck1> that's your local machine, not travis i think
[00:01:09] <buck1> travis python is in /opt/pyenv or something like that
[00:01:13] <ionelmc> buck1: yes, travis machines are setup the same way
[00:01:19] <buck1> ^
[00:01:23] <ionelmc> pip is installed as egg
[00:01:47] <ionelmc> likely a common problem that need some workaround
[00:01:48] <buck1> i dont believe it :)
[00:02:15] <ionelmc> buck1: how much would you bet on it :-)
[00:02:24] <buck1> one lollipop
[00:02:37] <buck1> ionelmc: i dont see that using a pip other than the one installed to a virtualenv would be too common use case
[00:03:14] <ionelmc> naaa, not worth convincing you for one lollipop
[00:03:32] <buck1> ionelmc: the python you're given by travis is a virtualenv, which i've never seen virtualenv install pip as an egg
[00:06:44] <ionelmc> buck1: yeah, but the target is the global python, not the virtualenv one
[00:07:13] <buck1> that should be a debian package, and they don't put eggs
[00:08:20] <buck1> travis peeps may have done, but i dont see why since they use pyenv
[19:19:46] <ionelmc> how does pip determine the dir where it puts the bins (the scripts)?
[19:19:49] <ionelmc> dstufft: ping
[19:22:59] <dstufft> ionelmc: pong
[19:25:01] <ionelmc> dstufft: i must have done something odd, why would pip use "local/bin" for the bin place?
[19:25:01] <qwcode> ionelmc, that's basically delegated to setuptools (for sdists), and for wheels, it's in pip.locations.distutils_scheme
[19:25:05] <ionelmc> in a virtualenv
[19:25:49] <dstufft> ionelmc: debian/ubuntu?
[19:25:52] <ionelmc> dstufft: yes
[19:25:56] <qwcode> ionelmc, local/bin is called the "local scheme" or something. you'll see it in distutils
[19:25:58] <ionelmc> 12.04 it it matters
[19:26:03] <dstufft> because they patch python
[19:26:18] <ionelmc> dstufft: ok, but it's a virtualenv
[19:26:24] <qwcode> they patch distutils
[19:29:20] <qwcode> "posix_local" I think
[19:31:20] <ionelmc> it's a pleasure to read all that :-)
[19:32:26] <ionelmc> qwcode: where is this posix_local
[19:33:07] <qwcode> ionelmc, virtualenv.py refers to that.... "def fix_local_scheme"
[19:34:42] <qwcode> ionelmc, not on ubuntu atm to look in distutils, but it would be in distutils/commands/install.py
[19:34:49] <ionelmc> i see now
[19:36:51] <ionelmc> oh damn, there's a "bin" symlink in "local"
[19:39:22] <ionelmc> can we do a Python 4? throw away all this nonsense
[19:40:57] <ionelmc> wipe it all clean
[19:41:21] <ionelmc> we'd also have to erase memories of anyone who did any packaging
[19:41:29] <ionelmc> :-)
[19:41:42] <qwcode> I'd like to find a single doc that explains the why behind debian's schemes and dist-packages stuff. barryW posted something recently, but it wasn't enough for me to confidently use it for the PyPUG
[19:43:12] <dstufft> the schemes are because they want apt-get installed stuff to go into /usr/lib/pythonX.Y/dist-packages and pip/easy_install/setup.py install-d stuff to go into /usr/local/lib/pythonX.Y/dist-packages
[19:43:56] <ionelmc> pffft... like you'd use those outdated packages from apt ...
[19:44:14] <dstufft> dist-packages vs site-packages is because they want to make it so that you can have an apt-get installed python installed alongside a custom compiled Python
[19:44:20] <qwcode> dstufft, I though it was more than that though... I'd need to go find what he wrote again
[19:45:15] <dstufft> if you installed Python 2.7 that you compiled yourself alongside 2.7 that comes with ubuntu, you'd install your python 2.7 into /usr/local, but both your custom isntalled python and the apt-get installed python would be looking at /usr/local/lib/pythonX.Y/site-packages if they didn't do dist-packages
[19:45:29] <dstufft> qwcode: I don't think it's more than that, but I could be wrong :D
[19:46:06] <qwcode> dstufft, ok, your second comment, was what he wrote about....
[19:46:24] <dstufft> qwcode: ah
[19:46:42] <dstufft> yea it's two different issues (dist-packages vs the schemes) but the dist-packages is a side effect of the schemes
[19:47:16] <dstufft> since if they didn't have the schemes pip would just install into /usr/lib/pythonX.Y/ and there'd be no overlap in /usr/local/lib/pythonX.Y
[19:47:31] <ionelmc> can i force pip to not use the "local" thing somehow?
[19:47:46] <ionelmc> actually, force setuptools
[19:49:33] <qwcode> ionelmc, why though? why not just go with what it gives you?
[19:50:17] <ionelmc> qwcode: i wanna see if there's a way to avoid symlinks
[19:50:29] <dstufft> qwcode: I'm guessing ionelmc is working on the virtualenv rewrite which doesn't currently have the symlink hack that makes it work
[19:50:39] <qwcode> ah
[19:51:06] <dstufft> I actually thought that debian had contiionals in place so that their things only happened otuside of virtual environments
[19:51:11] <dstufft> maybe I'm wrong about that though
[19:51:43] <ionelmc> dstufft: how would they know if it's a virtualenv or not
[19:52:18] <dstufft> ionelmc: the same way everyone else does, ``if hasattr(sys, "real_prefix") or getattr(sys, "base_prefix", sys.prefix) != sys.prefix):
[19:53:09] <ionelmc> dstufft: where would they have this handling?
[19:53:12] <qwcode> well, virtualenv has monkeypatches to alter things... maybe that once worked, but stopped? getting a headache...
[19:53:32] <dstufft> qwcode: that headache is part of why the rewrite exists :D
[19:53:42] <qwcode> roger that
[19:53:59] <dstufft> ionelmc: umm, I don't remember offhand, you'd have to go look at debian/patches in python2.7 or python3.4 (or both!) and see what their patches are doing
[19:54:15] <dstufft> ionelmc: I'm doing regular work stuff currently so I can't look real close ATM
[19:57:36] <ionelmc> aaaah now i get it
[19:57:50] <ionelmc> they have a custom scheme in sysconfig patch
[19:59:51] <ionelmc> no wonder
[19:59:54] <ionelmc> https://www.irccloud.com/pastebin/GPqxstFQ
[20:00:01] <ionelmc> FIXME lol
[20:00:44] <ionelmc> more like KILLME, or SORRYIMHORRIBLE
[20:01:20] <dstufft> maybe I read that comment and just thought they added a conditional
[20:01:39] <ionelmc> naaa
[20:01:49] <ionelmc> why will i be very sorry for this
[20:01:52] <ionelmc> if os.name == "posix":
[20:01:52] <ionelmc> os.name = "posix_prefix"
[20:04:27] <dstufft> debian is great for randomly patching things
[20:06:04] <ionelmc> dstufft: you did that sys.modules cleanup
[20:06:10] <ionelmc> is it reallllly necessary?
[20:06:38] <ionelmc> i mean they would have the same code anyway
[20:06:55] <dstufft> they would have the same code at the time that the virtualenv was created
[20:07:06] <dstufft> but what if say debian ships a bug fix for os.py
[20:08:04] <ionelmc> dstufft: recreate virtualenv
[20:08:13] <ionelmc> same as wehn the bin gets an update
[20:08:45] <dstufft> well except it won't (typically) "break", it'll just function slightly wierd
[20:08:50] <ionelmc> this reminds me, https://pbs.twimg.com/media/B50-fW6IIAArUEx.png:large
[20:09:01] <dstufft> it also makes the legacy isolation act more like the venv isolation
[20:09:25] <dstufft> ionelmc: is it causing a problem?
[20:09:55] <ionelmc> dstufft: well, if i'm gonna patch stuff then i need to keep modules around
[20:10:05] <ionelmc> otherwise patch don't have any effect
[20:11:05] <dstufft> ionelmc: you mean monkeypatching? you can just do it after the call to exec() in site.py
[20:17:31] <ionelmc> dstufft: can i force pip to use a specific scheme?
[20:17:43] <dstufft> um
[20:17:45] <dstufft> I'm not sure
[20:17:52] <ionelmc> like posix_user or posix_prefix
[20:17:54] <dstufft> you can force setup.py install to do it
[20:18:09] <dstufft> well --use wil do posix_user
[20:18:11] <dstufft> I think
[21:07:56] <ionelmc> dstufft: so i patched sysconfig, to have some garbage in the scheme conf for posix_local and bin path still doesn't change :-)
[21:07:59] <ionelmc> :-(