PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 4th of February, 2016

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:25:16] <Ryan_Lane> things work well <8 and break >8
[00:26:27] <Ryan_Lane> I have no idea how to sanely use subdirectory >8 based on the docs and the behavior
[00:29:18] <Ryan_Lane> anyway, having one package that includes the package (common) and others that just add entrypoints and requirements (client and web) fixed my issue
[01:46:02] <kennethreitz> dstufft: you around?
[01:46:14] <dstufft> kennethreitz: heya
[01:46:22] <kennethreitz> it's been a while :)
[01:47:06] <kennethreitz> so, pip-freeze excludes certain dependencies by default, e.g. setuptools, distribute
[01:47:28] <kennethreitz> i feel it should also exclude wheel
[01:50:27] <dstufft> yea probably
[01:50:41] <kennethreitz> cool, maybe i'll send a PR
[03:50:18] <ceridwen> I have a question about virtualenvs and package data installation---is this an appropriate place to ask?
[03:53:46] <tdsmith> sure is
[03:55:23] <ceridwen> I have a package with install_package_data=True in setup.py and some data files and directories in MANIFEST.in. My basic question is: when I install them into a virtualenv, where do they end up?
[03:55:44] <ceridwen> I can provide many more details on request.
[03:58:34] <ceridwen> Or is the whole premise of my question wrong and should I be doing something different to install data?
[04:00:59] <tdsmith> i think you also want to pass package_data to setup()
[04:01:33] <tdsmith> the less helpful answer is "try it and see"
[04:01:47] <tdsmith> i'm Not Actually Sure but someone else might be
[04:03:37] <ceridwen> What should the argument for passing package_data to setup() be? (Is this explained somewhere?) I've tried the setup.py/MANIFEST.in I've described above, and I can't find any data files anywhere in the virtualenv with Unix's find. I've also tried it with example packages that are supposed to show how all this works, and their data files don't show up either. In other words, I'm very confused.
[04:04:03] <tdsmith> MANIFEST.in controls which files end up in the sdist but not which files are installed
[04:05:22] <tdsmith> i... think
[04:05:44] <tdsmith> i assume you've seen https://pythonhosted.org/setuptools/setuptools.html#including-data-files
[04:15:15] <tdsmith> ceridwen: ah, okay, so they should end up in site-packages
[04:16:55] <tdsmith> i forgot i have a package which does this
[04:16:55] <tdsmith> https://github.com/tdsmith/ijroi
[04:19:56] <ceridwen> I have seen that. I'm trying to follow the first one, specified using setup.py with include_package_data and MANIFEST.in.
[04:20:13] <tdsmith> gotcha
[04:20:14] <ceridwen> But I can't find the data files in site-packages or any subdirectory of it at all.
[04:20:30] <tdsmith> they aren't ending up in the virtualenv root are they?
[04:21:08] <ceridwen> Nope.
[04:25:16] <ceridwen> Here's an example package: https://github.com/ionelmc/python-nameless
[04:25:17] <ceridwen> It has a very similar layout to what I'm trying to get to work.
[04:25:18] <ceridwen> Installing it into a virtualenv, I get a lib/python3.4/site-packages/nameless-0.1.0-py3.4.egg/ directory.
[04:25:19] <ceridwen> Inside this directory, there's a nameless/ directory that contains the files under src/nameless in the Github repository.
[04:25:20] <ceridwen> There's an EGG-INFO directory too, which contains some text files.
[04:26:00] <ceridwen> There's SOURCES.txt file which lists the files that are theoretically supposed to be included, but if they exist anywhere in the virtualenv, find can't find them.
[04:26:04] <njs> honestly, I usually just say "f this" and drop the data files into my package next to the module that needs them
[04:26:18] <njs> and then do os.path.join(os.path.dirname(__file__), "some-data.txt")
[04:26:55] <ceridwen> In this case, the data files for the package I'm trying to get to work include deliberately-broken Python files, which break any tools I try to use on the package.
[04:27:12] <njs> can you give them a different extension?
[04:27:58] <ceridwen> I may end up doing something like that as a half-measure, but I'm concerned that will have other undesirable side effects =/.
[04:31:12] <ceridwen> I'm wondering if there's something fundamental I'm missing here---I can't believe that the instructions are simply wrong, but at the moment, it looks like they are.
[04:33:17] <njs> all respect to the people involved in making it work as well as it does, but honestly every time I've ignored setuptools's weird way of looking at the world and just hacked together something that worked, it's made my life better
[10:03:52] <Haris> hello all
[10:04:09] <Haris> how to reinstall an already installed pkg ? I'm trying to re-install Pillow==3.0.0
[10:04:41] <Haris> with openjpeg, tiff support, other than jpeg support
[10:18:33] <apollo13> Haris: pip install --force-reinstall --upgrade Pillow==3.0.0 will probably work
[10:18:44] <apollo13> though make sure that you have no cached wheel file
[10:19:12] <apollo13> maybe add --no-use-wheel to actually fetch a source file
[10:20:06] <njs> you can use --no-cache-dir to prevent using a cached wheel file
[10:32:39] <ionelmc> ceridwen: what do you mean "include deliberately-broken Python files, which break any tools I try to use on the package." ?
[11:18:15] <Haris> hmm
[11:18:25] <Haris> all done now
[12:32:23] <zigurat> Hi. I am trying to install pip but get the error "TypeError: Incorrect padding"
[12:32:28] <zigurat> Thoughts?
[12:53:57] <ionelmc> zigurat: traceback?
[13:24:37] <mattt> hi all, need some help with an odd issue. i'm trying to run a wsgi app installed in a virtualenv, but it's failing to start as a library which the app uses requires argparse, which is apparently not there. however, if i go into the virtualenv argparse is available and if i explicitly try to import argparse in the app i don't get a failure. any idea where i could look?
[13:25:47] <ronny> mattt: in what way is the app started? and on what kinda system do you run
[13:26:03] <ronny> mattt: because off hand it sounds like you dont use the right python to run it
[13:27:20] <mattt> ronny: i'm using apache/mod_wsgi -- i've explicitly set python-home on WSGIDaemonProcess
[13:27:57] <ronny> sounds like a mod wsgi configuration issue
[13:28:16] <mattt> ronny: so you suspect i'm using the host's python interpreter rather than the one in the virtualenv ?
[13:28:23] <ronny> yes
[13:28:56] <ronny> does the python version perhaps differ between mod wsgi and the virtualenv?
[13:29:03] <mattt> ronny: no :( both 2.7
[13:29:47] <ronny> then a missing argparse points torwards a broken python
[13:29:52] <mattt> ronny: one thing i see is that there is no explicit argparse in my venv, but i see /usr/lib/python2.7 is in its path
[13:29:53] <ronny> argparse is in the stdlib in 2.7
[13:30:20] <mattt> should the venv use the stdlib on the host or have its own ?
[13:32:06] <ronny> i dont know off-hand
[13:32:35] <Wooble> venvs don't copy over the stdlib.
[13:33:52] <mattt> Wooble: great ... i've just looked at sys.executable and i'm not using the python interpreter in the venv
[13:33:56] <mattt> ^^^ ronny
[13:34:04] <mattt> so sounds like a misconfigured apache/wsgi
[13:34:33] <Wooble> If it's running py2.7 at all and not finding argparse, that's certainly weird no matter what environment, though.
[13:43:36] <Ivoz> mattt, get the wsgi app to print sys.executable to stdout/err on startup so you can see what python exactly it is being run from
[13:46:04] <Wooble> (maybe print sys.path too to see if something really horrible is happening)
[13:59:24] <zigurat> Solved it. Some corrupted cache
[14:19:59] <mattt> Wooble: path looks ok, and according to https://pypi.python.org/pypi/virtualenv/1.3.1#using-virtualenv-without-bin-python i should see it using the host's python interpreter
[14:20:53] <mattt> Wooble: oddly, i strace apache and it is does actually open /usr/lib/python2.7/argparse.py
[14:21:18] <mattt> Wooble: so not sure why i get "DistributionNotFound: The 'argparse' distribution was not found and is required by oslo.config, python-keystoneclient, stevedore, keystoneauth1"
[14:23:34] <Wooble> mattt: I wonder if something weird is expecting py2.6 with third-party argparse.
[14:25:08] <Wooble> mattt: are you using a really old setuptools, by chance?
[14:25:47] <s3lext> ur1.ca/ohay5
[14:33:13] <Wooble> s3lext: you need libjpg-dev (or whatever your distro calls it)
[14:34:20] <s3lext> f23
[14:34:38] <savior> hi guys
[14:34:57] <savior> I created a new virtualenv, and it seems to access the global site packages
[14:35:10] <savior> version 1.11, so it shouldn't do that
[14:35:15] <savior> how can I fix this?
[14:36:27] <Wooble> savior: do you have PYTHONPATH set or something?
[14:36:52] <savior> nope
[14:37:46] <savior> hmm
[14:37:48] <savior> now it works
[14:37:54] <savior> very strange
[14:37:59] <savior> but I specified --no-site-packages
[14:38:36] <savior> maybe it's only a problem with ipython?
[14:39:13] <Wooble> I'm beyond trying to figure out how ipython works :)
[14:49:31] <ionelmc> savior: maybe you created it over an old virtualenv?
[14:49:49] <savior> no, I deleted the directory beforehand
[14:50:01] <savior> but apparently ipython does not play nicely with virtualenvs
[14:50:03] <savior> :(
[14:50:10] <savior> so I'll just use python for now
[14:50:16] <ionelmc> that sounds crazy
[14:50:58] <savior> that's how it is :(
[14:55:26] <Ivoz> savior, --no-site-packages has been default for years :)
[14:55:47] <savior> I know, that's why I didn't understand
[14:55:48] <Ivoz> also you need to install ipython in the virtualenv
[14:55:54] <savior> but apparently the problem is ipython
[14:56:00] <savior> I installed it, but still no cookie
[14:56:10] <natefoo> ronny: have you had a chance to look at the windows test output at all?
[14:56:14] <savior> maybe it shouldn't be installed globally? but I cannot do anything about that, it is a server
[15:10:38] <ronny> natefoo: not yet, im at work
[15:11:23] <mattt> Wooble: i don't believe so
[15:11:47] <mattt> Wooble: so oddly, i'm using a pre-configured venv ... if i uninstall the package and re-install it, it actually goes and installs argparse
[15:16:13] <natefoo> ronny: okay. the changes aren't that big, i'm not really worried about them on windows, i just thought it'd be good to check. so i will probably go ahead and release it.
[15:17:25] <ronny> natefoo: i stongly suggest to get a multi platform ci setup tho ^^
[15:20:28] <natefoo> yeah, i'm planning on that
[15:38:53] <ceridwen> ionelmc, One of them is a file with a wrong encoding, for instance.
[15:39:09] <ionelmc> ceridwen: ook, and why is that a problem?
[15:40:41] <ceridwen> Because at least with the tools I'm working with, they try to read all the files in subdirectories of the package, hit the file with the bad encoding, and raise an uncaught exception.
[15:50:19] <ionelmc> ceridwen: what tools?
[15:50:47] <ceridwen> Rope, for instance.
[15:53:21] <ionelmc> ceridwen: when would rope be used?
[15:53:52] <ionelmc> i still don't get what you're trying to do
[15:54:46] <ronny> ionelmc: rope is a refactoring library for python in python
[15:58:19] <ceridwen> Yes. (Note, these are all examples. There are other files that cause problems, for instance there are files that use Python 3 or Python 2-only constructs, and other tools that have crashed---for instance, I was trying to do a dependency graph analysis at one point and that also didn't work.)