PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 29th of January, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[03:15:26] <buck1> all the people stuffing readme.md into long-description are doing it wrong yes? https://github.com/search?utf8=%E2%9C%93&q=filename%3Asetup.py+readme.md&type=Code&ref=searchresults
[04:45:31] <tomprince> Why would that be wrong?
[04:53:18] <glyph> tomprince: because it's RST
[04:53:24] <glyph> tomprince: so you should be stuffing README.rst in ther
[04:53:42] <glyph> The ones that do pandoc.convert first are cute :)
[04:55:08] <tomprince> I think pypi may do the right thing with them now.
[04:55:54] <glyph> tomprince: There's no field for a MIME type though
[04:56:09] <glyph> tomprince: so sniffing the contents is not great, especially if there's no standard for how to do it
[04:56:11] <tomprince> I guess not.
[04:56:40] <tomprince> https://warehouse.python.org/project/readme/ is what is powering it now.
[07:54:59] <ychaouche> Hello
[07:55:17] <ychaouche> I need help understanding why uninstall can't remove one of my packages
[07:55:21] <ychaouche> it's installed in /usr/local/
[07:55:28] <ychaouche> Please see command output here : https://gist.githubusercontent.com/ychaouche/76f8088955d4744f012b/raw/1e50177fa556c69c41fd4e087e9246e4982733b0/gistfile1.txt
[07:56:17] <ychaouche> I don't remember how it was installed, I think I used pip install -e but I'm not sure.
[07:57:11] <mgedmin> hm, interesting
[07:59:30] <mgedmin> ychaouche, cat /usr/local/lib/python2.7/dist-packages/infomaniak.egg-link
[07:59:36] <mgedmin> does it point to an existing directory?
[08:00:03] <ychaouche> mgedmin: yeah, it looks like the result of pip install -e or python setup.py develop
[08:00:05] <ychaouche> mgedmin: will paste
[08:00:38] <ychaouche> /home/ychaouche/REPOS/INFOMANIAK
[08:01:12] <mgedmin> does /home/ychaouche/REPOS/INFOMANIAK/infomaniak.egg-info/PKG-INFO exist?
[08:01:20] <ychaouche> let me check
[08:02:40] <ychaouche> https://gist.githubusercontent.com/ychaouche/93ed92458df0537c70d0/raw/fc808ce1a94bd3ed2eeaac0f061c876a0b6e2846/gistfile1.txt
[08:03:47] <mgedmin> ok, what about pip? is there perhaps an activated virtualenv? is the pip maybe using python 3?
[08:04:04] <mgedmin> can you strace -f -e open pip uninstall informatik and see what files it's trying to find and where?
[08:05:10] <ychaouche> ok
[08:05:50] <ychaouche> I beleive I should also add the.. oh never mind (-f)
[08:05:58] <ychaouche> sorry didn't see it :)
[08:06:36] <ychaouche> at first sight it doesn't seem to look in /usr/local
[08:06:40] <ychaouche> will read through
[08:07:07] <ychaouche> no it does.
[08:07:47] <ychaouche> Here's a grep on local https://gist.githubusercontent.com/anonymous/505e795dc294333d1514/raw/5663f5185b9ec4766a51f08c497ad5b3d87ace39/gistfile1.txt
[08:08:58] <ychaouche> mm.. I should have nl'ed it
[08:09:56] <ychaouche> and this is a grep on infomaniak https://gist.githubusercontent.com/anonymous/50bdc07ee348f9195439/raw/f1b6402f7fcb8bdc26ed6dcd59201da49c52fe99/gistfile1.txt
[08:11:24] <ychaouche> what do you think of -e file ? (maybe some stat and fstat calls would be relevant)
[08:12:01] <ychaouche> https://gist.githubusercontent.com/ychaouche/3cdc6113f7931cadf28d/raw/e5b940244e98701c0cb581e62e2554a6a7deba2c/gistfile1.txt
[08:12:53] <mgedmin> curious: it's not finding th e.egg-link
[08:13:17] <mgedmin> what's your pip version?
[08:13:34] <ychaouche> it's not looking in /usr/local at all
[08:13:38] <mgedmin> yeah
[08:13:50] <mgedmin> if you run /usr/bin/python and inspect sys.path, will you see /usr/local there?
[08:13:52] <ychaouche> root@ychaouche-PC ~/TMP # pip --version
[08:13:53] <ychaouche> pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
[08:14:40] <ychaouche> it's definitely there
[08:14:44] <ychaouche> ['', '/usr/lib/python2.7/dist-packages', '/home/ychaouche/REPOS/INFOMANIAK', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0']
[08:14:44] <mgedmin> it may be worth a try to pip install --user pip (maybe with -U, if it says "pip already installed")
[08:14:45] <ychaouche> >>>
[08:14:54] <mgedmin> and then see if ~/.local/bin/pip uninstall informatik works
[08:15:14] <mgedmin> might be a bug in debian/ubuntu's pip/setuptools patches
[08:15:32] <mgedmin> (the dist-packages/ is a debian/ubuntu thing; upstream pip/setuptools use site-packages/)
[08:15:51] <ychaouche> mm ok
[08:15:59] <mgedmin> hm, actually... will upstream pip realize it needs to look in dist-packages?
[08:16:07] <mgedmin> (maybe, if it walks, sys.path)
[08:17:27] <ychaouche> is -U supposed to install pip in my local directory ?
[08:17:51] <ychaouche> oh --user
[08:17:53] <ychaouche> I missed that
[08:17:58] <mgedmin> pip install --user is supposed to do that; -U means "upgrade"
[08:19:13] <ychaouche> Ok I installed pip in my user account, will try the .local/bin/pip now
[08:19:45] <ychaouche> ychaouche@ychaouche-PC ~ $ ~/.local/bin/pip uninstall infomaniak
[08:19:46] <ychaouche> Can't uninstall 'infomaniak'. No files were found to uninstall.
[08:19:56] <ychaouche> same
[08:24:45] <mgedmin> I think this is the point where you need to wait for an actual pip developer :)
[08:30:18] <ychaouche> ok
[08:30:29] <ychaouche> What is this module ? /usr/local/lib/python2.7/dist-packages/stevedore-1.2.0.dist-info/namespace_packages.txt
[08:30:42] <ychaouche> stevedore ? looks like a person's name
[08:31:50] <mgedmin> "stevedore: a person whose job is to load and unload ships at a port"
[08:32:02] <mgedmin> https://pypi.python.org/pypi/stevedore
[08:49:31] <ychaouche> Oh this is so cool
[08:49:45] <ychaouche> I too was using my own sort of library for "plugins"
[08:49:54] <ychaouche> I need to rewrite my code to use this then
[08:50:14] <ychaouche> Such a nice serendipity
[09:03:18] <ychaouche> IIRC, if I install something via python setup.py install, there will be no way to uninstall it (other than by hand). Correct ?
[09:03:38] <ychaouche> Can I use pip to install a package that I wrote without actually uploading it to pypi ?
[09:03:56] <ychaouche> and not in developing mode ? (sans -e)
[09:04:21] <mgedmin> yes
[09:04:25] <mgedmin> (to both questions)
[09:04:38] <ychaouche> :o)
[09:05:08] <mgedmin> actually I'm not sure about the 1st; perhaps the setuptools version of setup.py install writes a manifest file that pip can read
[09:09:16] <ychaouche> ok, how do I install using pip ? here's what I tried : pip install --src infomaniak/ infomaniak and ychaouche@ychaouche-PC ~/REPOS/INFOMANIAK $ pip install -r .
[09:10:21] <mgedmin> pip install ./infomaniak
[09:10:28] <mgedmin> or pip install .
[09:11:03] <mgedmin> or you could setup.py bdist_wheel and then pip install the whl file you'll find in dist/
[09:11:10] <mgedmin> this'll make repeated installations much faster
[09:11:19] <ychaouche> oh ok
[09:11:23] <mgedmin> (you need to pip install wheel in order to use setup.py bdist_wheel)
[09:11:26] <ychaouche> I'll try with wheel then
[09:11:41] <ychaouche> oh
[09:12:02] <ychaouche> Do I have to feel guilty if I put wheel as a dependency of my project :D
[09:12:17] <ychaouche> s/project/package/
[09:14:22] <mgedmin> why would you do that?
[09:14:52] <mgedmin> that'd be like putting 'pip' as a dependency of your project just because you expect people to use 'pip install' on it
[09:19:13] <ychaouche> Then I'll have to write an install.sh script that install it, then calls pip.
[09:19:38] <ychaouche> the install.sh is already written, I forgot...
[09:19:47] <ychaouche> (because I also do other operations)
[09:19:52] <ychaouche> I just have to add it to my install.sh
[09:26:28] <mgedmin> you won't get any speedup if you rebuild the wheel file every time just before installing it
[09:26:45] <mgedmin> if that's your use case, better simplify the script and install from the source tree directly
[09:28:52] <ychaouche> Ok, I'll keep wheel for linux/python-aware sysadmins then (only me for the moment)
[09:29:36] <ychaouche> I want to simplify the installation of that package to a maximum so that any member of the team could install it.
[13:53:23] <moldy> hi
[13:53:40] <moldy> was it ever considered to warn the user if pip is run as root?
[13:56:15] <ionelmc> isn't sudo enough of a warning?
[14:41:23] <moldy> ionelmc: not everyone uses sudo
[14:42:06] <moldy> ionelmc: pip has a bad repuration for breaking user's systems, because people who are not-so-familiar with python run pip as root and end up with broken systems
[14:43:13] <moldy> to a naive user, it's not obivous that running pip as root is usually a very bad idea
[14:43:18] <ionelmc> well yeah, that's how debian got their dist-packages patch to python
[14:43:28] <ionelmc> and we all know how terrible that is
[14:43:35] <moldy> ionelmc: i am not familiar with that patch
[14:43:40] <moldy> can you explain?
[14:44:13] <moldy> i think a big fat warning and a 5 seocnd wait or so would be a good idea :)
[14:44:17] <ionelmc> they added a custom install scheme in distutils
[14:44:31] <ionelmc> so now virtualenv needs special handling for that
[14:44:45] <ionelmc> cause virtualenvs have no dist-packages, and no local/lib
[14:45:19] <moldy> hmm, ok. though i don't see the connection yet.
[14:45:34] <ionelmc> basically their patch makes packages install (via pip or setuptools) in a different place than where the apt-provided packages install to
[14:45:42] <moldy> ionelmc: ah, i see
[14:45:51] <ionelmc> nice idea in theory
[14:45:59] <ionelmc> but in practice it's terrible
[14:46:02] <moldy> on gentoo, the package manager is implemented in python
[14:46:40] <moldy> so people regularly end up with broken systems that are hard to fix, since the package manager is broken :p
[14:47:30] <ionelmc> how come they don't have some sort of isolation
[14:47:38] <ionelmc> at worst they could have something like debian
[14:49:10] <moldy> ionelmc: they don't know
[14:49:28] <moldy> ionelmc: python developers know how to use pip with --prefix or virtualenv, the average sysadmin does not
[14:49:53] <ionelmc> moldy: the plan is to make `pip install --user` the default at some point
[14:50:15] <ionelmc> that would make the gentoo devs happy i think
[14:50:32] <moldy> ionelmc: yes, that sounds like a good idea
[14:50:43] <ionelmc> you'll have to search the pip issue tracker for plan details
[14:50:48] <moldy> ok, thanks
[14:51:18] <ionelmc> unless dstufft is around
[14:51:21] <ionelmc> dstufft: pong
[16:13:33] <edrahn> Hello, I can't seem to use a python version older than 2.7.8 with virtualenv
[16:13:42] <edrahn> I get CertificateError traceback's
[20:33:18] <tdsmith> does a new package on pypi need to be explicitly registered before upload or is "twine upload" sufficient to register a package?
[20:34:41] <dstufft|vpn> tdsmith: I think currently right now you need to reigster it once, you can do it via the webui though and just type in the name with a version 0 or something
[20:36:59] <tdsmith> great, ty dstufft
[21:25:24] <Moult> Yasumoto: ipng
[21:25:29] <Yasumoto> howdy howdy
[21:25:39] <Moult> Yasumoto: any ideas what could be causing pex: Failed to translate SourcePackage('file:///var/lib/jenkins/.pex/build/numpy-1.9.1.zip'): 'UUID' object has no attribute 'get_hex
[21:26:36] <Yasumoto> I've seen https://github.com/pantsbuild/pex/issues/9 before
[21:27:16] <Moult> Yasumoto: yeah saw that too
[21:27:42] <Moult> Yasumoto: but it does say it's been fixed
[21:27:42] <Yasumoto> is your stacktrace from within pex?
[21:28:20] <Moult> Yasumoto: yes
[21:33:05] <Yasumoto> brutal, if you can file a new issue, that'd be rad
[21:35:08] <Moult> Yasumoto: i will do a bit of digging first, because this is a very similar environment the my previous one where the same command worked completely
[21:40:16] <Moult> Yasumoto: by the way, when will the master branch be available in my pypi? i'd like to make sure the pex i install has my fix
[21:43:34] <Yasumoto> hm, I think we just convince wickman to cut a new release
[21:44:05] <Yasumoto> I can file an issue, but now you're motivating me to finally land https://github.com/pantsbuild/pex/pull/20 :D
[21:44:21] <Moult> Yasumoto: i've been doing a nasty hack - building pex manully then symlinking it to /usr/bin/pex
[21:44:29] <Yasumoto> oof
[21:44:36] <Yasumoto> yah, we should get a release out asap with your fix
[21:45:34] <Yasumoto> Moult: https://github.com/pantsbuild/pex/issues/38
[21:46:54] <Moult> Yasumoto: cheers
[21:50:15] <Moult> Yasumoto: slightly unrelated, but globally i can do python, and it'll drop me into an interpreter with python 3.4.1, and i can import wheel. however if i do pyvenv-3.4 foo and do source foo/bin/activate, and do python (also 3.4.1) and import wheel it says module wheel not found. isthat normal behavior?
[21:50:47] <Yasumoto> that should be
[21:50:53] <Yasumoto> after you source foo/bin/activate
[21:50:56] <Yasumoto> you'll need to pip install wheel
[21:51:14] <Yasumoto> only the distributions available from within that virtualenv will be available- you're isolating yourself from the system that way
[21:51:43] <Moult> Yasumoto: i see
[21:52:26] <Moult> Yasumoto: so once i'm in the pyvenv, i want to build pex, i just do python setup.py install, but i need to have pip install wheel before that otherwise i build a useless pex. is there anything else i'm forgetting to install?
[21:52:44] <Yasumoto> I think we can also add wheel to the setup.py
[21:52:48] <Yasumoto> not sure why that wasn't included in there
[21:53:29] <Moult> Yasumoto: good point, i will add it, but do you know if i might be missing anything else?
[21:54:50] <Yasumoto> ah, it's specified in extras: https://github.com/pantsbuild/pex/blob/master/setup.py#L54
[21:55:33] <Yasumoto> kinda looking at https://bitbucket.org/tarek/distribute/issue/130
[21:56:25] <Moult> Yasumoto: ok, so it's already in there, and you're right it shoudl be in extras as it technically isn't required for all packages
[22:20:45] <Moult> Yasumoto: the error doesn't really make sense as it suggests i'm not on python3