[00:43:24] <electsleeper> hey all, is it possible to override the default package index in a pipfile?
[14:38:42] <bauerj> How can I find files installed using the data_files option in setuptools.setup?
[14:39:14] <bauerj> I tried sys.prefix as described in https://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files but that's not where the file ended up
[14:39:45] <bauerj> Here, sys.prefix is /usr while the file was installed in /usr/local
[14:43:20] <tos9> bauerj: are you trying to do it at runtime of your program?
[14:46:15] <abadger1999> does python requirements include a way to Mark conflicts? I have a need to upgrade two packages at the same time so one package will require the other at a certain minimal version but because the other can be used standalone, it can't use requires... It needs something like conflicts: ansible < 2.10
[14:48:44] <tos9> bauerj: in pre-3.7 it's a PyPI package called `importlib-resources`
[14:49:07] <tos9> abadger1999: conflicts don't make sense in a requirements file
[14:49:17] <tos9> abadger1999: a requirements file represents a full working single environment
[14:49:30] <tos9> abadger1999: if you ahve 2 different configurations, then that should correspond to 2 different requirements files
[14:52:29] <abadger1999> tos9: two files is still insufficient. Imagine that someone has an existing installation which includes ansible-2.9. then they install my new package which conflicts with that. If there's no way to Mark that for pip to either error or automatically upgrade ansible, then the new install will be broken
[14:53:39] <tos9> abadger1999: a requirements file is a *full* environment specification
[14:54:05] <tos9> abadger1999: if your package does not work with ansible-2.9, your requirements file should have ansible==2.10.1 or whatever specific version it was built and confirmed with
[14:54:34] <tos9> abadger1999: if your entire package doesn't work with ansible-2.9 then your install_requires should also say ansible>2.9 or whatever
[14:54:41] <tos9> abadger1999: but are you writing a library or an application?
[14:54:47] <abadger1999> But that won't work. The new package does not require ansible. It merely conflicts with the old ansible
[14:59:26] <abadger1999> Concretely, the ansible package is being split up for the next release. The base program is going into an ansible-base package. The new ansible package will depend on ansible-base and also bring in the the extra content in a new location. If someone has the old ansible installed and then installs just ansible-base, it will break the old ansible. We want that case to upgrade ansible to the new ansible package (or error so the user can
[15:00:37] <abadger1999> (installing or upgrading the new ansible package can use requires fine. The problem is a user installing ansible-base with a pre-existing old version of ansible)
[15:01:34] <tos9> cool ok, so library and application
[15:01:54] <tos9> abadger1999: so why can't ansible-base just specify install_requires=["ansible>newversion"]?
[15:02:04] <tos9> oh sorry, you want ansible-base to not always require ansible?
[15:03:38] <abadger1999> We want ansible-base so people don't have to continue installing the kitchen sink when they really only need a small subset of it's functionality. There extra content are all plugins that allow it to do things that apply to only a small subset of users
[15:04:07] <tos9> so you can do that via a constraints file, but constraints files are for applications, not libraries, so it's not going to help for this case -- there's nothing really that helps you do this that I can think of other than your own runtime error saying the versions are incompatible
[15:04:31] <tos9> abadger1999: right makes sense -- and I assume you're not going with e.g. setuptools extras to preserve backwards compat for people doing `pip install ansible`
[15:06:13] <abadger1999> tos9: Right. We want people who do pip install ansible (after reading blog posts that say to do that) to end up with a user experience roughly consistent with prior versions of ansible.
[15:06:42] <tos9> trying to think if there's anything else that would help you, but I think yeah your best bet may be in `ansible-base` to do a version check and error out
[15:07:08] <tos9> (something like this I suspect will get better eventually but probably needs the resolver work to be done well)
[15:10:11] <bauerj> tos9: Thanks but I don't think that is going to help. Apparently it only supports packages, I'm just installing a module
[15:12:26] <tos9> bauerj: can you put at least the data files into a package? or are you installing them for some external program