PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Friday the 7th of June, 2019

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[18:42:41] <exarkun> is it possible to specify data files for inclusion with setup.cfg?
[18:43:21] <exarkun> I tried `package_data` in `options` and it makes setup.py fail with "AttributeError: 'str' object has no attribute 'get'"
[18:44:58] <exarkun> I also tried `include_package_data=True` and wrote a MANIFEST.in and setup.py completed but the package data is not included.
[19:01:44] <toad_polo> exarkun: It certainly should be.
[19:02:35] <toad_polo> One reason I want to add `.toml` configuration support is because the INI file stuff is horribly counter-intuitive.
[19:03:22] <toad_polo> exarkun: `include_package_data` and `package_data` are, amazingly, mutually incompatible.
[19:03:52] <toad_polo> I think `include_package_data` automatically adds data files in modules, and causes `package_data` to be ignored. `package_data` manually specifies it.
[19:04:08] <toad_polo> exarkun: https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
[19:04:18] <exarkun> there seems to be an extra layer of weird going on that I didn't notice before. possibly `sdist` is getting the package data but then ... some part of the install is not installing it
[19:04:30] <exarkun> yea. I've been reading that page.
[19:04:34] <toad_polo> See the `[options.package_data]` heading, does that do what you want?
[19:04:42] <toad_polo> Are you using `setup.py install`? If so, don't use that.
[19:04:56] <exarkun> hm, I haven't tried doing options.package_data stuff yet, I'll try that
[19:05:03] <exarkun> Let me get back to you on that last question.
[19:06:29] <toad_polo> We're generally trying to get out of the business of being any sort of invocable front-end, so almost all `setup.py` invocations are better replaced by something else. In this case `pip`. I usually build wheels with `python -m pep517.build`, but `pip wheel --no-deps -w dist/ .` will do the same thing.
[19:06:57] <exarkun> ugh so confusing
[19:07:01] <exarkun> now everything is behaving differently.
[19:07:13] <exarkun> the short answer is that I am using 'nix build'.
[19:09:29] <toad_polo> Heh.
[19:10:31] <exarkun> wiped all my experiments, now it is back to broken. `sdist` does not include the package data w/ just `include_package_data = True` in setup.cfg. now if I add the options...
[19:11:56] <exarkun> nor if I add `* = *.py` to `[options.package_data]` (the package data is `src/twisted/plugins/somestuff.py`)
[19:13:00] <exarkun> if I include it in MANIFEST.in (w/o the other changes) then it ends up in the sdist
[19:13:31] <toad_polo> Interesting.
[19:14:02] <exarkun> but if I `nix build` that configuration it still isn't installed
[19:14:11] <exarkun> well, it isn't part of the build artifact
[19:14:17] <ionelmc> exarkun: include_package_data mean "include what you have in manifest as package data"
[19:14:32] <exarkun> ionelmc: include it where?
[19:14:42] <ionelmc> in bdists
[19:15:02] <ionelmc> the point of it was to remove the manifest/package_data duplication
[19:15:21] <exarkun> bdists specifically - excluding sdists?
[19:15:23] <ionelmc> because why write filenames two times
[19:15:43] <ionelmc> fost sdist manifest.in is the source of "what gets included"
[19:18:00] <exarkun> So I have it in MANIFEST.in and I have include_package_data = True and `setup.py sdist` includes the package data and `setup.py bdist` excludes the package data
[19:21:47] <exarkun> Any more ideas?
[19:28:01] <exarkun> alright
[19:28:14] <exarkun> I replaced `packages = find:` with `packages = explicit list of all of my packages`
[19:28:15] <exarkun> And that works