PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Friday the 4th of September, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:18:17] <triogenes> my CI builds use a pip install of my package which means i get a "new download" on pypi every time a build happens
[00:18:33] <triogenes> is there any way to avoid that?
[01:57:30] <dstufft> triogenes: enable caching
[01:57:37] <dstufft> or rather, sahare a cache dir between builds
[13:05:09] <natim> Hello guys, gthank point me to this channel
[13:05:33] <natim> We plan on supporting wheel which look really great for our Python packaging
[13:07:24] <natim> Also the problem we face is that we've build universal wheel
[13:07:29] <natim> For py2 and py3 support
[13:07:44] <natim> But apparently, pypy installation also try to use this wheel which doesn't have the pp2 tag
[13:07:49] <natim> See https://www.python.org/dev/peps/pep-0425/#python-tag
[13:21:54] <ronny> natim: sounds like a bug, the cpython specific one should use cp... - pypy should try the py2/3 ones as well
[13:22:20] <ronny> natim: how do you build your packages?
[13:22:48] <natim> Yes pypy tries py2/3 but when you do /usr/bin/pypy setup.py bdist_wheel
[13:23:04] <natim> It generates py2-py3-none.whl instead of pp2-pp3-none.whl
[13:23:19] <natim> See https://github.com/pypa/packaging-problems/issues/73
[13:23:59] <natim> Note that in my case I don't have the same dependencies for pypy and cpython2/3 so that py2-py3*.whl doesn't work with pypy
[13:25:28] <ronny> natim: oh, for that reason there are platform markers
[13:25:55] <natim> Yes but this line of code doesn't handle them: https://bitbucket.org/pypa/wheel/src/f746a01eab7a673cb628a52f99c129d0d5741bcf/wheel/bdist_wheel.py?at=default#bdist_wheel.py-99
[13:26:05] <natim> Markers are defined here : https://www.python.org/dev/peps/pep-0425/#python-tag
[13:26:48] <ronny> natim: environment markers work different
[13:28:15] <natim> ronny: what do you mean? How should I generate my pypy specifics whl ?
[13:28:16] <ronny> natim: you can use extras_require={":implementation_name == 'thenamepypyuses'": ['needed_by_pypy']}
[13:28:55] <natim> ronny: do you have a working example?
[13:29:06] <ronny> natim: not off hand and at work
[13:31:31] <natim> ronny: apparently https://bitbucket.org/pypa/wheel/src/f746a01eab7a673cb628a52f99c129d0d5741bcf/wheel/bdist_wheel.py?at=default#bdist_wheel.py-113:114
[13:32:21] <natim> We should probably have a setyp.py options that says root_is_pure = False
[13:32:54] <ronny> natim: use environment markers!
[13:33:41] <natim> Ok will try to understand how this works
[13:33:51] <natim> Also I am already using extra_requires for other things
[13:33:56] <ronny> then you will have one wheel and it will use different dependencies based on the implementation name
[13:33:57] <natim> hope everything works alltogether
[13:34:03] <natim> Ok
[13:44:52] <natim> ronny: I have tried https://www.python.org/dev/peps/pep-0496/#examples whithout success
[13:55:14] <natim> ronny: I could use python_implementation to generate the build but then when trying to install I get NameError: global name 'python_implementation' is not defined
[13:55:59] <ronny> natim: what version of pip?
[13:56:13] <natim> 7.1.2
[13:56:48] <ronny> natim: hmm, this is costing too much time for you, you mgiht want to run 2 builds, one with pypy passing the pp version tag and one for cpython pasing the cp version tag
[13:57:16] <natim> How shall I pass the tag ?
[13:57:40] <natim> I wish running bdist_wheel with pypy would use the right tag
[13:59:49] <ronny> natim: it does use the right tag
[14:00:02] <ronny> natim: universal == py2.py3
[14:00:14] <ronny> which is vlaid for all python versions
[14:00:33] <ronny> natim: the problem is that environment markers are not yet widely and correctly implemented
[14:00:42] <ronny> natim: so use the wheel option to pass the python tag
[14:02:00] <ronny> natim: use python setup.py bdist_wheel --python-tag cp2.cp3 for cpython and pypy setup.py bdist_wheel --python-tag pp2.pp3 for now
[14:02:38] <natim> Ok this would work thanks
[14:03:34] <natim> python setup.py bdist_wheel --python-tag=cp2.cp3
[14:03:45] <natim> ls dist/ : cliquet-2.5.0-py2.py3-none-any.whl
[14:03:48] <natim> ...
[14:04:15] <natim> Because setup.cfg contains universal=1 my bad
[14:29:06] <agronholm> ronny: are those documented?
[14:58:34] <moldy> hi
[14:58:50] <moldy> what is the current state of the plans about pip as root / --user?
[14:59:13] <moldy> i am aware of https://github.com/pypa/pip/issues/1668 but it's a little hard to see in which direction things are moving right now
[15:34:16] <ronny> agronholm: yes, see the pep linked above
[15:35:07] <dstufft> moldy: the current state is we still plan to default to --user when not as root but I haven't had time to work on it more and nobody else has picked it up
[15:36:14] <agronholm> oh cool, I was not aware of these
[15:39:03] <moldy> dstufft: what about the anti-usecase of people breaking their systems by running "sudo pip install foo"?
[15:39:52] <moldy> oh i see, you think defaulting to user will make that happen less often...
[15:40:41] <moldy> the problem is, it will not fix all the broken documentation on the web that explicitly tells people to run sudo pip install
[15:40:54] <dstufft> we're not going to prevent people from running pip as root, it would break a lot of people's use cases and it's not an unreasonable use case. It's often times perfectly fine to install things using pip.
[15:41:02] <moldy> :(
[15:41:18] <agronholm> pip install --user places the scripts in a directory which is NOT on the PATH by default
[15:41:26] <agronholm> that will confuse a lot of people
[15:41:32] <moldy> i'd bet that 99% of the times, it's not a legitimate usecase, just somebody not knowing he is about to break his OS
[15:42:03] <dstufft> I'm working with various distros to make it so that it won't break their OS.
[15:42:31] <moldy> dstufft: sounds interesting, what are the plans in that area?
[15:42:58] <dstufft> it's a perfectly reasonable thing to install into /usr/local with pip and if that breaks things that's a failing of the toolchain not of the person invoking the command
[15:43:21] <moldy> i agree with that
[15:43:46] <moldy> but the current reality is that people read instructions on how to install X and 2 minutes later their os is broken.
[15:44:14] <dstufft> you'll have to define a broken OS here.
[15:44:27] <moldy> can be anything, really
[15:44:42] <moldy> broken portage (gentoo package manager) is a particulary common case
[15:45:17] <dstufft> I've never used gentoo, Is it written in Python?
[15:45:25] <moldy> their package manager is, yes
[15:46:13] <moldy> given the fact that python is an all-purpose language, a very wide range of tools can in principle be affected by this
[15:46:28] <moldy> various parts of desktop environments, whatever
[15:46:55] <moldy> but obviously, the PM is quite a bad component to break :p
[15:47:16] <dstufft> My plan for that is to standardize the patches that Debian has which has a different directory for "vendor" installed packages and "administrator" installed packages, and for something as critical as a package manager they'd use a new flag that I plan to add that says to exclude everything but the vendor packages
[15:48:27] <moldy> sounds like a plan
[15:48:28] <dstufft> But what you're asking is the equivilant to making it impossible to run ``make install`` into /usr/local too, people can do that and break their system just as easily if they aren't careful about what they install.
[15:49:17] <moldy> true in principle, but seems to be a much less common problem in practice
[15:52:05] <dstufft> Another item I plan on adding is adding a file to the python metadata, INSTALLER (or something like it) which will be a file that tells pip what tool was used to install a particular library and if it's a system package manager then pip won't uninstall it (but, in combination with the vendor patch) it will be willing to install into the site-packages instead of vendor-packages, but also importantly it will likely treat the already installed
[15:52:05] <dstufft> version as a "use this unless it doesn't match our required version" instead of "try to upgrade to the latest version"
[15:57:07] <moldy> personally i don't like all this complexity and special-casing and tools reading other tools' stuff, but ah well :)
[15:58:56] <dstufft> I happen to think that the old model of what an OS is is broken and doesn't make sense anymore, but I don't have the energy to fight with the distros to tell them that the things they picked in the 90's doesn't make sense in 2015.
[15:59:24] <agronholm> it would be so great if they could agree to unify their package tooling
[15:59:34] <agronholm> but I believe hell will freeze over sooner
[16:00:02] <agronholm> OTOH, I never expected systemd to happen either
[16:01:16] <dstufft> I don't even care about unifying their package tooling, but I think a lot of problems come from the fact that distros have pacakges which are designed to install *system utilities* but they make these system utilities available in non system use cases
[16:01:39] <dstufft> take Python, Python exists so that system tools written in Python can exist, not so that random developers can install stuff into it while developing
[16:01:57] <dstufft> so don't put ``python`` on the default path, hide it somewhere that's for system use only
[16:02:09] <agronholm> what would you suggest then
[16:02:13] <moldy> personally i just use virtualenv for everything that is not part of the base os, but most newbies don't
[16:02:41] <agronholm> it'd help if virtualenv was an integral part of python...oops it is
[16:02:43] <dstufft> (IOW, I think that idea of what OSX is doing with OpenSSL in El Capitan is the right way, OpenSSL is there, but it's not for you it's for the system and you can't compile against it really without hacking up your system)
[16:02:59] <agronholm> does the integrated pyvenv even install setuptools and pip?
[16:03:10] <dstufft> agronholm: yes
[16:03:11] <dstufft> in 3.4
[16:03:13] <dstufft> well
[16:03:14] <dstufft> "yes"
[16:03:17] <agronholm> "yes"?
[16:03:21] <dstufft> it depends if your distro butchered it or not
[16:03:31] <dstufft> Ubuntu 14.04 has it butchered
[16:03:42] <agronholm> running 15.04 here
[16:03:50] <dstufft> I'm not sure if 15.04 has it butchered or not
[16:04:17] <agronholm> "pyvenv" tells me to install python3-venv
[16:04:27] <dstufft> I think that means it's not butchered then
[16:04:37] <dstufft> I think if you install python3-venv it'll pull in python-pip-whl
[16:04:53] <moldy> agronholm: it is in python3, but you still have even high-profile packages like django telling people to run "sudo pip install django" in their installation docs :/
[16:04:57] <dstufft> I mean, it's still butchered because distros love applying random patches to things
[16:05:09] <dstufft> but I think it'll install it
[16:05:33] <dstufft> Step 1: to Debugging why pip isn't working how the docs say is to uninstall the distro version and install a real version
[16:06:57] <agronholm> ok, looks like it works
[16:07:13] <dstufft> (apt-get, yum, dnf, etc) are for things you don't care about how they work :V
[16:07:15] <agronholm> but the division between pyvenv and virtualenv just seems silly
[16:07:20] <dstufft> or if they work
[16:13:30] <agronholm> is there a tool that would let me write a single spec file and would spit out the proper rpm, deb or whatever
[16:14:49] <dstufft> not that I'm aware of
[16:16:00] <moldy> agronholm: by spec file you mean some file format, or something specific?
[16:16:26] <agronholm> moldy: something where system dependencies and other metadata are declared
[16:17:07] <moldy> agronholm: there are various tools that try to do this. "fpm" would be one of them that i happen to use
[16:17:16] <agronholm> I'll check that out, thanks
[16:17:19] <moldy> https://github.com/jordansissel/fpm
[16:18:34] <doismellburning> yay fpm!
[16:19:00] <agronholm> looks promising
[16:19:37] <doismellburning> agronholm: it doesn't quite do what you're talking about though; I was writing a wrapper that would have, but then Docker happened
[16:20:00] <agronholm> doismellburning: yeah docker does decrease its value somewhat
[16:20:16] <doismellburning> oh, parcel, that's what I called it
[16:20:20] <doismellburning> I was hilarious
[16:48:40] <ronny> re
[20:45:36] <transit> I've been trying hard to get a package's dependencies from a private (institutional) subversion repository installed when the package is installed, I can install via pip but could not get it done with dependency_links. Here's what I came up with: https://dpaste.de/tnot Comments?
[20:47:29] <xafer> if using dependency_links in your packages, you might need the --process-dependency-links option when invoking pip install
[20:48:17] <xafer> erh, are you invoking pip inside your setup.py ?
[22:47:53] <mathieui> Hi there
[22:48:38] <mathieui> is there a way of specifying a dependency in a requirements.txt without triggering the build action?
[22:49:12] <mathieui> because for some things (e.g. cython), building takes a long time, even if it’s already usable without it
[22:52:56] <dstufft> mathieui: Not really, but as of pip 7 if you have ``wheel`` installed it'll cache a built wheel and reuse that in future installations
[22:55:51] <mathieui> Ok
[22:56:06] <mathieui> another question then, is there a way to mix system packages and venv-installed packages?
[22:59:13] <moldy> mathieui: with virtualenv, there is --system-site-packages
[23:00:08] <mathieui> yes, but iirc if you do a pip install -r requirements.txt and one requirement is in a different version on the system, it will fail
[23:00:46] <moldy> i'm not sure which behaviour you are looking for
[23:05:03] <moldy> if the requirements.txt specifies foo==1.0 and the system has 0.9 or 1.1, what do you expect?
[23:05:19] <moldy> also, why? :)
[23:05:22] <mathieui> I would expect the venv to have foo==1.0
[23:05:26] <mathieui> well, I have this software
[23:05:29] <mathieui> which depends on a lib
[23:05:40] <moldy> you mean you expect pip to install 1.0
[23:05:43] <mathieui> which can be made faster if built with cython on a system
[23:10:35] <mathieui> moldy, yes, I expect pip to install 1.0
[23:13:10] <mathieui> theoretically, a virtualenv could have a dedicated site-packages directory, and still configure $PYTHONPATH to load modules from the system-wide directory if they are not found in the venv-specific one, right?
[23:13:56] <moldy> i never used it, but i always thought this was what --system-site-packages does
[23:15:31] <mathieui> well, afaik it does not
[23:15:44] <mathieui> and if I try to install anything it will try to write into the system dir
[23:15:52] <mathieui> (and utterly fail)
[23:16:14] <moldy> what *does* it do then?
[23:17:12] <moldy> "Give the virtual environment access to the global site-packages." isn't that what you want?
[23:20:31] <mathieui> Yes, but I want to install things in my venv, which isn’t possible if I enable --system-site-packages
[23:20:50] <mathieui> I’m looking at site.py to know why that happens
[23:20:53] <moldy> ah, i never figured that
[23:21:13] <moldy> but well, i never really used it except by accident
[23:21:38] <transit> mathieui: Why not install them in the virtualenv's site-packages?
[23:21:52] <mathieui> that’s what I would like to do.
[23:21:56] <moldy> mathieui: err, cannot reproduce
[23:22:16] <moldy> mathieui: virtualenv --system-site-packages foo
[23:22:53] <mathieui> I’m using pyvenv, fwiw
[23:23:09] <moldy> mathieui: and then i activate the virtualenv and install stuff into it. works fine.
[23:23:20] <moldy> ok, no idea about pyvenv, never used it
[23:24:09] <mathieui> yep, pyvenv fails while virtualenv works
[23:24:12] <mathieui> whelp.
[23:24:44] <transit> mathieui: What's the reason for using pyvenv over virtualenv?
[23:25:03] <mathieui> pyven is part of the standard python distribution
[23:25:06] <mathieui> pyvenv*
[23:25:56] <moldy> of the python3 standard distribution, which means that nobody uses it so it doesn't get tested ;)
[23:25:59] <moldy> scnr
[23:26:33] <mathieui> well, obviously it’s 2015, I’m not developing anything in python2 anymore
[23:28:35] <moldy> mathieui: that's a fine decision, so you chose to rather be the first one to run into certain bugs. cool :)
[23:29:24] <moldy> most people who develop on python3 are probably like me and still use virtualenv rather than pyenv, just because it works
[23:30:33] <jessamynsmith> I am in that camp
[23:30:38] <jessamynsmith> the python3/virtualenv
[23:30:54] <moldy> i was told ``that virtualenv -p`` is broken, but i will only switch after i actually hit a problem with it in practice
[23:31:04] <jessamynsmith> wait, what?
[23:31:19] <doismellburning> iirc yes
[23:31:39] <jessamynsmith> in what way?
[23:31:43] <jessamynsmith> (I use this all the time)
[23:32:06] <moldy> same thing about --relocatable, btw. i read it's evil and broken, but as long as it works for me, i am happy to use it :p
[23:32:12] <jessamynsmith> never used that one
[23:32:36] <moldy> don't believe the hype! :p
[23:33:00] <moldy> chances are that by the time you switch away from it, somebody has fixed the problem
[23:33:28] <jessamynsmith> heh
[23:35:41] <moldy> jessamynsmith: iirc, the people did not tell me in which way, sorry
[23:36:15] <jessamynsmith> oh ok
[23:36:34] <moldy> jessamynsmith: of course, they are probably still right. but well, every software is broken in some way.
[23:36:43] <jessamynsmith> so true
[23:36:50] <jessamynsmith> someone was talking to me about the singularity yesterday
[23:37:09] <jessamynsmith> and, I don't know, but I feel like we are a long way from making self-healing, self-replicating machine life
[23:37:10] <dstufft> mathieui: what version of python 3
[23:37:14] <jessamynsmith> we can't even write a web app that works
[23:37:16] <mathieui> dstufft, 3.4
[23:37:23] <mathieui> .3
[23:37:34] <moldy> maybe i am getting old, but i tend to be pretty conservative nowadays. if it isn't broken in a way that affects me, i don't care.
[23:37:44] <dstufft> mathieui: 3.4.3?
[23:37:48] <mathieui> yes
[23:37:59] <dstufft> Is it from Ubuntu 14.04 by any chance
[23:38:03] <mathieui> no
[23:38:12] <mathieui> archlinux
[23:38:26] <moldy> jessamynsmith: well, intelligent life is just 10 in the future since 1950 :p
[23:38:34] <jessamynsmith> exactly!!
[23:39:25] <moldy> and if "intelligent life" (whatever that means) would be a good idea is another story
[23:39:49] <moldy> insert "artificial" wherever you want into that sentence ;)
[23:40:37] <mathieui> heh, I found a funny workaround
[23:40:42] <mathieui> pyvenv my/venv
[23:40:48] <mathieui> pyvenv --system-site-packages my/venv
[23:40:50] <mathieui> and then it works