PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Tuesday the 6th of September, 2016

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[05:58:20] <mgedmin> pip uninstall doesn't understand --local? :/
[06:01:01] <mgedmin> pip from a virtualenv refuses to uninstall stuff from ~/.local/
[06:29:42] <wleslie> hi! I'm building a module that has an Extension with extra_objects=, but I want to first build those extra objects into the --build-temp. what's the smart way to get the --build-temp directory before calling setup() ?
[06:36:50] <[Tritium]> mgedmin: the argument to deal with ~/.local/ is --user. --user doesnt work inside virtualenvs
[06:37:02] <mgedmin> d'oh
[06:37:06] <mgedmin> where's my morning coffee?
[06:44:57] <wleslie> did some distutils.sysconfig.get_config_var and now it seems to be working
[07:43:28] <wleslie> seems --root doesn't do what I expect: https://paste.pound-python.org/show/nWYHr9lkyi92VG4OHQjo/
[07:43:52] <wleslie> how do I get it to treat that directory like it's a site-packages or so?
[07:47:36] <tdsmith> use --prefix
[07:48:17] <tdsmith> i mean, maybe
[07:48:55] <tdsmith> --root when specced to setup.py isn't useful unless you're building a binary distribution package as a downstream redistributor https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Python-for-Formula-Authors.md#--prefix-vs---root
[07:49:07] <tdsmith> i actually don't know what the pip option does but probably it's similar; all of these things have too many options :p
[07:49:13] <pombreda> mitsuhiko: there must be something weird in your config. I am using pip install -vv -e . all the time and I get proper output, including any stdout (such as a print in my steup.py)
[07:50:25] <pombreda> *setup.py
[07:51:50] <pombreda> mitsuhiko: and the verbose output contains everything a regular verbose pip would contains for deps, plus the specific details of the --editable parts
[07:54:37] <pombreda> mitsuhiko: please ping for help: given all the code I use from you and team, you deserve dedicated service :)
[08:08:59] <wleslie> no luck with prefix either https://paste.pound-python.org/show/yc3WsQeLrFSXUliZpsfb/
[08:09:13] <wleslie> doesn't matter anyway, I can just keep installing + deleting
[08:09:21] <wleslie> thanks
[08:17:10] <pombreda> mitsuhiko: https://github.com/pypa/pip/issues/3952
[09:32:19] <pombreda> mitsuhiko: are you sure you have not aliased pip to something elase?
[09:32:39] <mitsuhiko> pombreda: i looked at the sourecode
[09:32:47] <mitsuhiko> pip explicitly silences the output from setup.py develop
[09:36:08] <pombreda> mitsuhiko: got it. https://github.com/pypa/pip/blob/3417fac05e48fff50497e07566ecaeb143065f02/pip/req/req_install.py#L988
[09:40:02] <pombreda> mitsuhiko: though it is not clear that ot will NOT show stdout: https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/pip/utils/__init__.py#L651
[09:40:27] <pombreda> *it will NOT
[09:41:03] <mitsuhiko> pombreda: well. it clearly does not show output
[09:41:08] <mitsuhiko> whereas python setup.py develop does
[09:41:20] <mitsuhiko> if that is not the cause then something else is. i did not spend that much time with it
[09:42:54] <pombreda> mitsuhiko: :) I just cannot reproduce this. I get the exact same output with a pip install -v . and a python setup.py develop
[09:43:39] <mitsuhiko> pombreda: do you have a custom build step that prints something?
[09:43:45] <mitsuhiko> because if not, then obviously you won't see anything
[09:43:49] <mitsuhiko> since setup.py develop does not print by default
[09:43:53] <mitsuhiko> note that egg-info is done independently
[09:44:18] <mitsuhiko> pombreda: https://github.com/getsentry/symsynd/tree/feature/llvm-lib
[09:44:25] <mitsuhiko> you can see the problem there in action for example
[09:44:32] <mitsuhiko> pip install --editable . is a black screen for 20 minutes
[09:44:42] <mitsuhiko> python setup.py develop will print the llvm compilation
[09:46:34] <mitsuhiko> pombreda: pip install --editable is an abomination in how it works :)
[09:46:46] <pombreda> :D
[09:47:10] <pombreda> mitsuhiko: yes, I do have a custom build step with prints. Let me clone symsynd and build that branch
[09:49:43] <wleslie> how do C files typically get included in a source distribution? package_data?
[09:50:08] <pombreda> mitsuhiko: any specila llvm/clang version you depend on?
[09:50:17] <mitsuhiko> pombreda: latest everything
[09:50:23] <mitsuhiko> cmake 3.4 and something that supports c++17
[09:50:33] <mitsuhiko> os x 10.11 has something that works by default
[09:50:38] <mitsuhiko> on linux see .travis.yml
[09:50:42] <pombreda> ok
[09:50:51] <mitsuhiko> wleslie: MANIFEST.in
[09:50:59] <wleslie> good idea
[09:51:39] <mitsuhiko> wleslie: btw. the only way i found that makes c in python work at all is cffi. in case you are not using that yet i would suggest investigating it
[09:51:50] <mitsuhiko> the built-in extension handling is not great
[09:52:03] <mitsuhiko> (unless you are actually building a traditional python c extension)
[09:58:24] <wleslie> yes, this is a cffi-based wrapper I'm making, but I also want to include the source to generate the .a that it wraps
[10:06:12] <pombreda> mitsuhiko: your bug is confirmed alright. I tried on a slightly less involved https://github.com/WojciechMula/pyahocorasick that contains native and pip -e does swallow the output indeed
[10:07:25] <pombreda> I will update my commenst on the ticket
[10:20:08] <wleslie> is there a standard way, actually, not to include certain modules in a built distribution or when installing? they are only required for building from source.
[10:20:56] <wleslie> having two packages is maybe a thing, but kind of a pain in the neck
[10:27:42] <wleslie> ok, put them in the manifest.in and that worked fine
[10:50:21] <mitsuhiko> wleslie: the only built distribution that contains binaries that is supported today are wheels
[10:50:23] <mitsuhiko> and they ignore all that stuff
[10:50:38] <mitsuhiko> they are just two contained archives: metadata and a dump of the package folder
[10:55:35] <wleslie> thanks armin
[11:16:19] <wleslie> hmm, so I don't know my username on pypi, but it already has my email address
[11:16:34] <wleslie> (so registration fails)
[13:02:02] <Phryq> hey, is pypa a KVM gui? Like Virt-manager?
[13:02:34] <Wooble> no, it's the python packaging authority.
[13:02:54] <Wooble> (at least, the one this channel is about. no idea if there's another)
[13:17:57] <dstufft> mitsuhiko: huh, I though that -v would show that output
[13:18:03] <dstufft> mitsuhiko: sounds like an oversight
[13:19:48] <mitsuhiko> so fun fact, i just got it to output this in verbose mode
[13:20:44] <mitsuhiko> trying to figure out under what circumstances it prints and under which ones it does not
[13:21:14] <dstufft> lollll
[13:21:22] <dstufft> sounds like our screwed up subprocess handling
[13:21:37] <dstufft> someday I'm going to get around to revamping that and also switching to click
[13:21:50] <dstufft> then I can blame all our problems on mitsuhiko instead!
[13:21:52] <dstufft> :D
[13:21:54] <mitsuhiko> hehe
[13:23:01] <dstufft> our logic for showing or not showing output is kinda convoluted
[13:23:23] <dstufft> (kinda convoluted is a good description for like 80% of the code base :( )
[13:24:42] <dstufft> mitsuhiko: anyways, -1 on showing that output by default, +1 on showing it with -v. If you have time to figure out why it's not and submit a PR, poke me and I'll review it. If not.. I'll try to get to it sometime :/
[13:24:48] <mitsuhiko> i'm fine with it showing for -v
[13:25:00] <mitsuhiko> i will try to figure out what's happening when i have some time for it later
[13:25:52] <dstufft> we shut off showing a bunch of stuff by default because people got really confused thinking random output from a setup.py was output from pip, particularly bad for things with optional C extensions which printed things like "Building C extension failed!" but then fell back and successfully installed
[13:26:28] <dstufft> and people would get confused thinking their install failed entirely
[13:27:19] <dstufft> mitsuhiko: fwiw if you make sure to output some lines of text during the build in your setup.py, a spinner should advance for each line
[13:27:37] <dstufft> so that people can detect a stalled build by the spinner moving or not
[13:28:36] <mgedmin> does pip redirect the stdin from /dev/null nowadays?
[13:28:37] <mitsuhiko> dstufft: this is not printing *anything*
[13:28:50] <mgedmin> pygame's setup.py would stall at one point because it wanted to ask the user questions via raw_input()
[13:28:54] <mitsuhiko> it literally sticks around there even though cmake prints something in regular intervals
[13:29:29] <mitsuhiko> dstufft: what magic would enable this btw?
[13:30:07] <dstufft> mitsuhiko: it should just work I think.. I forget what version it got added in
[13:30:10] <mitsuhiko> do i need to do something to make the spinner work?
[13:30:15] <mitsuhiko> i'm on latest pip
[13:30:21] <dstufft> the science folks added it because numpy and stuff take a long time to compile
[13:30:34] <dstufft> pretty sure it's just something like for every 8 lines of output, advance the spinner
[13:30:35] <mitsuhiko> maybe you only do it for build?
[13:30:36] <mitsuhiko> this is for develop
[13:30:40] <dstufft> ah, might be
[13:30:59] <mitsuhiko> setup.py build spits out output just fine btw
[13:31:07] <dstufft> we should probably do it for develop too if we don't
[13:31:17] <dstufft> develop is kinda the unloved stepchild
[13:31:25] <dstufft> mgedmin: to answer your question, I don't think we do atm
[13:31:43] <mitsuhiko> first i would need to reproduce the not printing thing again :P
[14:18:38] <muelli> I have "pytest; extra == "test"" in my requirements.txt. But "pip install ." fails with "UndefinedEnvironmentName: 'extra' does not exist in evaluation environment." with pip 8.1.2. Anybody having the same problem or better yet, a solution?
[14:53:19] <muelli> I've filed a bug https://github.com/pypa/pip/issues/3953
[20:15:10] <pombreda> muelli: pip install . uses your setup.py not the requirements file? unless you use the reqs in setup?
[20:16:03] <ngoldbaum> (which you really shouldn't ever do)
[20:18:00] <pombreda> ngoldbaum: I could not agree more, but few understand the subtle differences between required deps and the lockfile that requirements is
[20:19:17] <pombreda> ngoldbaum: if the requirements had been named requirements.lock that would be easier, I guess (like the gemfile.lock)
[20:20:13] <pombreda> muelli: if this is public code, post a url or a paste or sorts :)
[20:21:07] <pombreda> muelli: the right way would like to use extras_require in a setup.py... but I would need to see you config :)
[20:21:19] <pombreda> *likely be to use extras_require
[20:22:21] <pombreda> I actually did not knew and not sure using extra in requirements works or is supported, but it might be
[20:25:27] <pombreda> muelli: now a simple way to understand setup vs reqs is a menu: the menu says you can have a steak with sides (the setup). When the waiter comes to take your order, they ask: rare? well done? medium rare? (or english or sehr english if you are german :d ), and what kind of side do you want? fries, salad? if you have a salad, which dressing? ....
[20:25:48] <pombreda> that "order" are you requirements, eventually pinned down to an exact version
[20:26:57] <pombreda> the menu is the ranges of possible for that menu item, you setup.py eventually with sensible version rnages, lax enough to allow pip to resolve possible conflicts and just strict enough to avoid things to break badly
[20:27:11] <pombreda> *your setup.py
[20:27:26] <ionelmc> pombreda: note that he left long time ago :)
[20:27:48] <pombreda> ionelmc: :D, my IRC client plays tricks on me then
[20:28:40] <pombreda> well if muelli is this muelli, they figured it out anyway: https://github.com/muelli/geysigning/commit/f70c5cbee92d451ff2febe166f1ddbd08f3f5ffe
[20:29:27] <pombreda> "I've never really understood when to use setup.py's facilities or requirements. pip install -r requirements.txt seems to be broken." ;)
[20:29:44] <ngoldbaum> pombreda: now you just need to write a blog post about tis
[20:29:50] <pombreda> :D
[20:29:51] <ngoldbaum> (i'm sure such blog posts already exist)
[20:30:03] <pombreda> !logs
[20:30:03] <pmxbot> http://chat-logs.dcpython.org/channel/pypa
[20:30:34] <ngoldbaum> seeing a setup.py file that reads in requirements.txt is a great way for me to nope the hell out of installing something
[20:33:49] <pombreda> ngoldbaum: sounds like I like metaphors there: http://chat-logs.dcpython.org/day/pypa/2016-08-26#13.41.03.pombreda there I chatted about streets addresses vs a map and directions
[20:34:39] <pombreda> the menu feels better though, and yummier :P
[20:35:53] <pombreda> https://www.google.com/search?q=differentce betwen setup.py and requirements.txt : 823K results
[20:38:59] <pombreda> and dstufft 's post comes on top : https://caremad.io/2013/07/setup-vs-requirement/ and is quite sensible