PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Wednesday the 10th of June, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:39:23] <ionelmc> tos9: or just use the rewrite, it works fine IMO, it's just that dstufft didn't have time to review it yet :-)
[00:42:07] <ionelmc> tos9: eg: pip install https://github.com/ionelmc/virtualenv/archive/develop.zip
[01:13:04] <tos9> ionelmc: OK I'll have a look at that too, thanks.
[08:08:53] <nikolaosk> Hi, I have a setuptools+distutils question, am I in the right place?
[08:11:03] <nikolaosk> I am try to build an egg with bdist_egg
[08:11:25] <nikolaosk> in which I'd like to include package data defined in MANIFEST.in
[08:11:43] <ionelmc> nikolaosk: include_package_data=True
[08:11:47] <nikolaosk> I do
[08:12:05] <nikolaosk> and although I see them in the SOURCES.txt of the egg info
[08:12:12] <ionelmc> hard to say then, show manifest, file layout and setup.py
[08:12:13] <nikolaosk> in the zipped egg itself
[08:12:21] <nikolaosk> they are absent
[08:13:45] <ionelmc> nikolaosk: pastebin those 3 so we can figure it out
[08:24:36] <nikolaosk> setup.py http://ix.io/j22 MANIFEST.in http://ix.io/j23 egg contents http://ix.io/j24 egg's SOURCES.txt http://ix.io/j25 bdist_egg output http://ix.io/j26
[08:26:31] <ionelmc> nikolaosk: which files are missing?
[08:28:28] <nikolaosk> inside the egg, I expect to find README.rst on the top level
[08:28:56] <nikolaosk> because I define it in the manifest and I set include_package_data=True
[08:29:14] <ronny> its not inside a package, so its not pcakge data
[08:29:41] <ronny> its not something that should even go to that place itno the egg
[08:30:14] <ronny> a readme should be read into the long description, then its fed into the pacakge metadata
[08:30:29] <ronny> nikolaosk: btw, why doyou need to build an egg/
[08:30:49] <nikolaosk> I know it's of no use here (the readme) but I am expirementing
[08:31:04] <ionelmc> nikolaosk: the goal being?
[08:31:22] <nikolaosk> so, I guess there is no way to include package files on the top level of an egg, right?
[08:31:44] <ionelmc> nikolaosk: ofcourse there are, but they are risky
[08:31:49] <ronny> nikolaosk: right, you are not supposed to do that ever
[08:31:52] <ionelmc> so explain a bit your usecase
[08:32:01] <nikolaosk> yep
[08:32:38] <nikolaosk> there is a twisted daemon on which I upload eggs
[08:33:12] <nikolaosk> and then I schedule execution of eggs
[08:33:44] <nikolaosk> ultimately what I try to do, which may be out of the setuptools/distutils scope
[08:34:30] <nikolaosk> is include a dependency inside the egg and upload it to the daemon
[08:34:34] <nikolaosk> as a standalone egg
[08:35:18] <ronny> you are not supposed to munge additional packages into eggs
[08:35:26] <nikolaosk> eg, an egg may depend on an older version of a package
[08:36:21] <nikolaosk> and I don't want to mess up already installed packages
[08:36:56] <jchen> hi, namespace packages aren't making any sense to me. when i have two NS packages installed together I can't import the first NS package. What am I doing wrong?
[08:37:20] <ionelmc> nikolaosk: looks like you might want to do some vendoring
[08:37:25] <ionelmc> a painful manual process
[08:37:26] <jchen> https://github.com/podhub-io/website/blob/master/podhub/website/__init__.py#L4
[08:37:36] <nikolaosk> jchen: show both of your __init__.py of your toplevel namespace
[08:38:08] <jchen> https://github.com/podhub-io/website/blob/master/podhub/__init__.py and https://github.com/podhub-io/meh/blob/master/podhub/__init__.py ?
[08:38:20] <ronny> nikolaosk: what does that twisted daemon do?
[08:39:37] <nikolaosk> have you heard of the scrapy project? I write spider modules and upload them to a daemon as eggs
[08:39:43] <nikolaosk> then I schedule execution
[08:42:00] <nikolaosk> jchen: both __init__.py and setup.py seem correct to me
[08:42:05] <nikolaosk> how do you install them?
[08:42:23] <nikolaosk> same way both?
[08:42:29] <jchen> podhub.meh is installed as a dependency in setup.py, i'm currently working podhub.website with setup.py develop
[08:42:50] <jchen> i tried making an sdist and installing that in case there's a misunderstanding of how linking works in develop
[08:42:53] <jchen> but same deal
[08:43:45] <nikolaosk> haven't tried develop
[08:45:18] <nikolaosk> is this like easy_install -e or pip -e
[08:45:24] <jchen> pip
[08:45:38] <jchen> i believe
[08:47:05] <jchen> hm, nvm, it's working for some reason now. i deleted the virtualenv and made a new one
[08:53:13] <ronny> nikolaosk: if you run the eggs separately, you just need a nosite python and activate the ones you want ^^ (i suspect you dont use pip , so things should be fine)
[08:57:53] <nikolaosk> separate process, yes. The dependencies I install with easy_install as eggs
[08:58:27] <ionelmc> https://pbs.twimg.com/media/B4FeexbCAAA8xQB.png:large
[08:58:34] <ionelmc> :-)
[08:59:24] <nikolaosk> I think of going with the vendor/ folder
[08:59:44] <nikolaosk> I can't mess with the daemon's python
[09:01:22] <nikolaosk> can I just prepend it to sys.path in the toplevel __init__.py of my package without creating a mess
[09:02:03] <nikolaosk> provided what I said about running separate processes?
[09:02:39] <ronny> what do you mean by that
[09:03:17] <nikolaosk> I add a vendor/ folder next to my package, include it in setup's packages list
[09:04:04] <ronny> given that you use eggs, just add them to a new folder- and activate that folder as site in the subprocess?
[09:04:15] <ronny> kills data dumplication, still works, uses the formats as intended?
[09:04:29] <nikolaosk> and if, say, my actual package is "autojournalistics", I put in autojournalistics/__init__.py a sys.path[:0] = ...
[09:04:58] <nikolaosk> (but that would do only in source distributions I guess)
[09:05:38] <nikolaosk> I can't modify the daemon that spawn the subprocesses
[09:07:19] <nikolaosk> but the daemon will actualy add the vendor/ to my path
[09:07:39] <nikolaosk> along all the packages on the toplevel dir
[09:07:55] <nikolaosk> so in the worst case, I can always import from vendor
[09:15:55] <ronny> ?!
[09:16:45] <ronny> nikolaosk: good luck then, but plaase keep in midn that what you do is a) messy, b) is already solved by the tools in a different way - so you are fighting windmills
[09:18:58] <nikolaosk> I can't make the daemon run by a siteless python
[09:20:15] <nikolaosk> what do you mean by "activate a site in the subprocess"
[09:28:38] <ronny> nikolaosk: i never said make the daemon run in a siteless python
[09:28:52] <ronny> nikolaosk: subprocesses can add custom site folders
[09:29:31] <ronny> all you need is a python script thats started siteless and given an egg , a site and a entrypoint - thne you jsut enable pkg_ressources, and use that to add the other eggs to sys.path
[09:37:10] <nikolaosk> my mistake, I should have said "can't make the daemon ran by / run a siteless python"
[09:38:13] <nikolaosk> but why do I need it to be siteless? will I then need to put _all_ my dependencies in eggs
[09:38:34] <nikolaosk> packaged along with the project
[09:39:44] <ronny> nikolaosk: thats kind of the intent of the whole egg format, all deps are eggs, differnet processes can run different sets of eggs
[09:40:29] <ronny> and if you use easy_install to isntall the daemon, everything there should be eggs to begin with
[09:40:40] <ronny> easy-insstall does only encapsulated installs
[09:53:14] <nikolaosk> "subprocesses can add custom site folders" but my project is deployed as a zipped egg
[09:53:51] <nikolaosk> I guess I can't add to the python path eggs within eggs
[09:54:07] <nikolaosk> so my deps need to be sources on the toplevel of the egg itself
[09:54:33] <nikolaosk> then the egg, when ran, firstly adds itself to the python path
[10:32:43] <ronny> nikolaosk: dont store eggs in eggs unless you make it zip-unsafe and unpack
[10:32:58] <ronny> nikolaosk: also keep in mind that egg is bascially a dead format, scheduled for demise
[11:16:47] <nikolaosk> I know but I wouldn't expect the daemon to get any more development
[11:16:56] <nikolaosk> thank you for everything
[11:30:14] <ronny> nikolaosk: whats that demon for anyway?
[11:32:59] <nikolaosk> a not-very-useful set of webservices for deploying spiders to a server
[11:33:51] <nikolaosk> where processes, logs and stuff are managed by the daemon etc etc
[11:34:43] <nikolaosk> it mostly doesn't make sense and it's doesn't get any more developement
[11:35:46] <nikolaosk> its developers are onto something proprietary in the cloud so the forgot about it
[11:36:30] <ronny> ouch
[11:36:39] <nikolaosk> but I use it just for the trouble of it
[11:37:21] <nikolaosk> I sometimes encounter educational pitfalls
[11:37:53] <ronny> oO
[11:37:55] <ronny> wtf?
[11:38:06] <ronny> you use it just for the trouble of it?
[11:42:22] <nikolaosk> how does this look: open(os.join(os.path.split(__file__)[0], 'some package_data file'))
[11:42:41] <nikolaosk> instead of, say, pkg_resources.resource_stream()
[11:43:39] <ronny> usually a bad idea, when dealing with eggs, utterly broken
[11:44:44] <nikolaosk> exactly, and I care
[11:46:23] <nikolaosk> but even when it works, I refuse to fix things the quick-n-dirty way
[11:51:24] <nikolaosk> if I din't do it, I'd still be ignorant that's wrong
[11:53:34] <ronny> dstufft: ping?
[11:54:45] <ronny> dstufft: can you ensure that the next version of wheel will no longer have the version numbers in the inner folders (dist-info/data/...)
[11:55:40] <ronny> (right now there is no way to from within a file of package directly open its dist-info without searching sys.path)
[12:08:44] <kenpachi> i often see try except blocks attempting to import setup from setuptools with a distutils fallback. how does the distutils version of setup handle keyword args introduced by the setuptools version of setup? does it fail gracefully, or does it raise an error? I'm trying to decide whether it is worth offering a distutils fallback
[12:11:50] <ronny> kenpachi: print warnings, please done do the distutils fallbac, it creates a different kind of mess ^^
[12:17:43] <kenpachi> ronny: I don't think I will, I was trying to find good reasons to do so but haven't found any yet, at least for new packages anyway
[12:24:29] <ionelmc> kenpachi: if you use pip then you should have setuptools
[12:24:50] <ionelmc> only broken systems are missing setuptools
[12:25:05] <ionelmc> there's no graceful way to fallback on distutils
[12:25:33] <ionelmc> you'd have to severely cripple your setup.py to make it fallback on pure distutils
[12:25:39] <ronny> kenpachi: also for all pure python packages, make wheels, if possible universal ones, it cuts install times and makes callign setup.py unnecessary in many cases
[12:26:14] <ronny> (since wheels install by unzip, python -m compileall $TOPLEVELS; install_scripts
[12:29:32] <kenpachi> thanks for those tips
[12:29:59] <kenpachi> since the python docs explicitly recommend setuptools, is it fair to say that setuptools is now "the standard"?
[12:36:35] <ronny> kenpachi: for now yes, well, the setup part of setuptools is, the way it installs as eggs got superseeded by managed pip installs and virtualenvs
[12:41:57] <kenpachi> ronny: thanks
[12:44:10] <kenpachi> FYI to all - it might be worthwhile trying to get this popular stackoverflow answer updated to reflect the current best practices, as describes distutils as the standard and could be misleading: http://stackoverflow.com/questions/6344076/differences-between-distribute-distutils-setuptools-and-distutils2
[12:44:39] <kenpachi> * it currently describes distutils as the standard
[12:47:39] <ronny> ?me cant
[12:48:20] <ionelmc> kenpachi: he say he recommends setuptools - what's unclear?
[12:49:22] <Wooble> The whole premise of the question is outdated; who automatically runs 2to3 these days?
[12:50:17] <ionelmc> plus, does anyone really trust SO nowdays?
[12:50:40] <Wooble> kenpachi: by "standard" he clearly means "in the stdlib". That's not going to change any time soon.
[12:52:20] <kenpachi> I would change the line "Distutils is still the standard tool for packaging in Python"
[12:53:18] <Wooble> Feel free to suggest an edit. (I'd vote to close the question as "too localized" but they've removed that option.)
[12:53:49] <kenpachi> Just a gentle suggestion only because this answer will likely be getting a lot of traffic.
[12:57:22] <doismellburning> ionelmc: hey, don't be knocking my mad SO rep skillz etc. etc.
[13:00:13] <Wooble> I've gained 788 reputation since the last time I logged in, and I haven't even posted any new answers in 9 months. skillz.
[13:00:47] <ionelmc> doismellburning: sunk cost fallacy ? :-)
[13:01:08] <ronny> bbl
[13:04:31] <doismellburning> ionelmc: :P
[13:11:20] <nickjj> there's no shortcuts available to get up to date package versions for everything in your requirements file at once right?
[13:11:43] <nickjj> something like gem or npm's outdated commands
[13:12:52] <doismellburning> nickjj: https://github.com/nvie/pip-tools
[13:12:54] <nickjj> oh cool, -o with 7.x
[13:12:58] <doismellburning> nickjj: or requires.io
[13:13:00] <doismellburning> oh, nice
[13:13:08] <nickjj> doismellburning, pip list -o
[13:13:33] <nickjj> produces an output like this: https://gist.github.com/nickjj/f78674a55f2c96be9ca5 if you're curious
[13:17:13] <ionelmc> is pip-tools still maintained?
[13:37:29] <tdsmith> does anybody know why someone would be seeing a traceback like this, where pip._vendor.distlib.scripts can't be imported after installing a pip egg https://github.com/Homebrew/homebrew/issues/40516#issuecomment-110678188
[14:05:03] <ionelmc> tdsmith: terrible terrible code :-)
[14:05:11] <ionelmc> the original exception is shadowed
[14:05:31] <ionelmc> i suspect it's the one with the dlopen, but there's only one way to know for sure
[14:11:31] <tdsmith> that makes a lot more sense
[14:13:38] <tdsmith> thanks; my sense of order in the universe is restored. (next question is "why are python builds broken on the new os x" :/ which is hard to troubleshoot without access)
[14:26:08] <lambacck> !logs
[14:26:09] <pmxbot> http://chat-logs.dcpython.org/channel/pypa
[14:26:43] <lambacck> logs site is broken ;(
[19:59:50] <aclark4life> oh?
[19:59:52] <aclark4life> hmmm
[20:31:14] <aclark4life> jaraco: ping^
[20:31:19] <aclark4life> CherryPy traceback
[20:31:38] <aclark4life> Errr, sorry, pymongo actually
[20:32:21] <aclark> (restart of pmxbot did not fix)
[20:35:41] <ronny> dstufft: ?
[20:36:04] <dstufft> whats up
[20:36:07] <dstufft> I just sat down
[20:36:15] <dstufft> had to get my phone replaced @ the Apple Store
[20:36:59] <jaraco> Hi aclark4life. I don’t see the traceback.
[20:37:23] <jaraco> Oh, I see the restart.
[20:37:44] <jaraco> Probably a pymongo 3 issue. I’ve fixed a ton of those lately.
[20:38:55] <jaraco> oh, interesting. Apparently I’ve bumped pmxbot to pymongo3 already. Issue might be in the deployment.
[20:40:51] <jaraco> I see pymongo3 in the installation.
[20:43:11] <jaraco> !version
[20:43:11] <pmxbot> 1110.7.1
[20:43:19] <jaraco> Aah. That’s fixed in 1111.0
[20:43:51] <ronny> dstufft: i see, i asked a while back if the version numbers could be dropped from the directories inside of a wheel
[20:45:13] <jaraco> !version
[20:45:13] <pmxbot> 1110.7.1
[20:47:36] <jaraco> !version
[20:47:36] <pmxbot> 1110.7.1
[20:49:24] <jaraco> !version
[20:49:24] <pmxbot> 1111.0
[20:49:37] <jaraco> aclark: Should be fixed now. Let me know if you find otherwise.
[20:50:39] <lambacck> jaraco: http://chat-logs.dcpython.org/channel/pypa still has a stack trace showing
[20:50:45] <tdsmith> ionelmc: you were right! the real problem was that the _ssl module wasn't being built (because cpython's openssl detection code needs coaching) and that was giving rise to the real ImportError
[20:53:39] <aclark> jaraco: thanks
[20:53:53] <aclark> oops yeah same error
[20:57:00] <jaraco> back! http://chat-logs.dcpython.org/channel/pypa
[20:57:03] <jaraco> !version
[20:57:03] <pmxbot> 1111.0.1
[21:13:16] <dstufft> ronny: um
[21:13:17] <dstufft> no idea
[21:13:36] <dstufft> I never gave much thought to that
[21:13:53] <dstufft> so I can't say what the problem would be :(
[21:18:43] <ronny> dstufft: version numbers in stuff like dist-info paths only make sense if there is multi version install in a clunky way
[21:45:26] <aclark> jaraco: thanks! what was the prob?
[21:45:38] <aclark> lambacck: ^
[21:48:13] <jaraco> aclark: pmxbot when it’s updated gets the latest pymongo. Pymongo3 was recently released with backward incompatible changes.
[21:48:22] <jaraco> So at some point, those got pulled into the deployment.
[21:48:36] <jaraco> There were fixes to address that in the codebase, but they hadn’t been released or tested.
[21:48:55] <jaraco> After testing them and adding a couple more fixes, a refreshed deployment fixed everything.
[21:49:04] <jaraco> And using the latest pymongo.
[22:11:42] <aclark> jaraco: ah cool thanks
[22:16:24] <ronny> dstufft: pip breaks multiprocessing on win32 for script using packages
[22:17:36] <dstufft> you'll have to be more specific than that
[22:18:12] <dstufft> or open an issue
[22:18:29] <ronny> https://github.com/pypa/pip/issues/1891
[22:20:58] <ronny> anso off to bed
[23:07:00] <radix> is there a way to install packages without C extensions?
[23:07:49] <tomprince> You mean, without installing C extensions that the include?
[23:08:41] <radix> yeah
[23:09:09] <radix> lots of packages come with optional C extensions that fall back to pure Python code, and I just want to force the fallback.
[23:09:23] <radix> ideally in a way that I can specify in a requirements.txt or something.
[23:09:53] <tomprince> I doubt the later is currently possible.
[23:10:15] <tomprince> There might be a dance you can do by calling setup.py by hand, to just install parts of packages.
[23:11:11] <ionelmc> radix: something like this https://github.com/ionelmc/python-lazy-object-proxy/blob/master/setup.py#L28-L56 ?
[23:11:22] <ionelmc> what would you do with requirements.txt ?!
[23:12:28] <tomprince> ionelmc: The question is how to install existing packages that already have that fallback.
[23:12:40] <ionelmc> there are some other variantions on that custom command, eg: https://github.com/simplejson/simplejson/blob/master/setup.py
[23:12:49] <ionelmc> tho that's really messed up :-)
[23:13:31] <ionelmc> tomprince: that have a fallback but the build_ext is not "optional" ?!
[23:14:34] <tomprince> That will install the extension if there is a C compiler and headers. How, as a user, do you prevent that, for packages that can work without.
[23:14:48] <radix> ionelmc: that still unconditionally *try* to build the C extension, so it's not a solution
[23:15:13] <radix> If I type "pip install simplejson", I get a C extension. And I don't want one.
[23:15:40] <ionelmc> would using a custom PATH (that doesn't have any gcc) be a acceptable workaround?
[23:16:08] <tomprince> Is that enough? Or does distutils know where the compiler that compiled it lives?
[23:16:22] <ionelmc> other way is to use crippled virtualenv (that doesn't have the include dirs or whatever)
[23:16:28] <radix> maybe that'd work. I'd love to be able to specify it on the pip command line in requirements.txt
[23:16:36] <radix> *or in
[23:17:04] <ionelmc> radix: it's quite uncommon what you want
[23:17:11] <ionelmc> why do you want it like that?
[23:17:44] <radix> because I don't trust C extensions, and would prefer to use them only when strictly necessary.
[23:18:14] <radix> I have had many segfaults over the last 15 years which could be solved by disabling some crappy C optimization module. :)
[23:18:25] <ionelmc> heheh
[23:19:10] <ionelmc> argh
[23:20:07] <ionelmc> radix: oooor .... you could patch build_ext to be a no-op
[23:20:15] <ionelmc> you can do that in usercustomize.py
[23:20:34] <radix> I'm not familiar with that file
[23:20:36] <ionelmc> now you got 3 terrible ways to avoid other terribleness :-)
[23:21:10] <ionelmc> https://docs.python.org/2/library/site.html?highlight=usercustomize
[23:21:31] <radix> oh, wow. yeah, that sounds pretty nasty :)
[23:21:37] <ionelmc> eg ~/.local/lib/python2.7/site-packages/usercustomize.py
[23:21:41] <tos9> Is pip>=6.0 a sane thing to put in setup_requires for things that use environment markers, or will that cause setuptools to be the thing that tries to do the install, and therefore the world to end
[23:21:49] <ionelmc> nasty issues have nasty solutions heheh
[23:29:15] <dstufft> tos9: it probably won't do what you want
[23:30:07] <tos9> dstufft: what I want is for stuff to work I guess so I've already not gotten what I want :(
[23:30:50] <dstufft> tos9: lower your expectations until they match reality, instant recipe for contentment!
[23:31:27] <dstufft> tos9: what's the real problem you're trying to solve
[23:31:36] <tos9> dstufft: https://github.com/Julian/jsonschema/issues/233#issuecomment-110944344
[23:31:49] <tos9> that issue title is totally wrong
[23:32:05] <tos9> apparently it means "hey you need environment markers now, and debian still ships old-as-hell pip"
[23:32:15] <tos9> which I knew would be broken already, but I want them to go away.
[23:33:49] <dstufft> ah
[23:33:50] <dstufft> yea
[23:34:41] <dstufft> there's not a great way to resolve that currently. Probably we should add something that you can say that you require pip >= X.Y and error out if it doesn't match that
[23:34:50] <dstufft> error out with a reasonable error message*
[23:35:50] <tos9> so let's see if I get this straight.
[23:35:55] <tos9> older pips won't prefer wheels
[23:35:59] <tos9> so they'll use sdists
[23:36:12] <dstufft> pip 1.5+ prefers wheels
[23:36:17] <tos9> and so if I add install_requires in an if block, like I had before, then they'll work too?
[23:36:23] <dstufft> yes
[23:36:29] <tos9> oh. so there are versions where that won't be true :/?
[23:36:51] <tos9> pip 1.5 will grab the wheel, not respect the environment marker, and not look at install_requires either?
[23:37:07] <dstufft> I mean yes, that still works, and will always work as long as setup.py is a thing
[23:37:34] <dstufft> you'll want to use the ability of wheel to override the install_requires probably
[23:37:36] <dstufft> if you're not already
[23:37:59] <tos9> I don't know what that is, so probably I'm not. that's a setup.cfg thing right?
[23:38:14] <tos9> I want all of this to go away, so probably I will just do nothing :(
[23:38:33] <dstufft> https://github.com/pypa/twine/blob/master/setup.py // https://github.com/pypa/twine/blob/master/setup.cfg
[23:39:51] <tos9> I see, ok I've seen that in the cryptography issue
[23:39:59] <tos9> So that was the right thing, rather than putting htem in extras_require I guess.
[23:42:45] <dstufft> depends on what your defintion on right is, the extra_requires thing is the intended "right thing", but well, legacy software
[23:47:39] <tos9> I see. OK, well, thanks for the help as usual.
[23:49:00] <dstufft> tos9: someday maybe the bare minimum versions will actually all be sane
[23:49:06] <dstufft> (lol RHEL)
[23:49:42] <tos9> Gonna hold my breath.