[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
[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: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
[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: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?
[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: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: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.)