PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Tuesday the 12th of June, 2018

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[17:33:34] <disi> are any more pip 9.x releases planned (even just patches)?
[21:04:57] <wiml> Is there any way to include an additional build step in `setup.py bdist_etc`? For example, to generate data files. There's builtin magic for C extensions, and there are some old hacks for things like SWIG that rely on undocumented internals, and the setuptools docs imply that there are ways to have setup generate data files, but as far as I can tell never give any information on how.
[21:08:12] <ngoldbaum> you can subclass the bdist class
[21:08:22] <ngoldbaum> i do that to include C files generated by cython in the sdist
[21:08:45] <ngoldbaum> wiml: https://github.com/yt-project/yt/blob/master/setup.py#L337
[21:08:48] <ngoldbaum> something like that ^
[21:08:51] <Xelnor> wiml: I have a simple example too, here: https://github.com/rbarrois/django_xworkflows/blob/master/setup.py#L66 https://github.com/rbarrois/django_xworkflows/blob/master/setup.py#L41-L48
[21:09:22] <ngoldbaum> ah yeah, you need to register your subclass via `cmdclass`
[21:09:45] <ngoldbaum> this sort of monkeypatching via subclassing is how setuptools is *supposed* to be extended
[21:09:51] <ngoldbaum> which is one reason why it's such an awul mess
[21:17:47] <ngoldbaum> which sorts of build steps do you need to override?
[21:24:05] <ngoldbaum> and you want to insert the data files into the sdist?
[21:24:38] <ngoldbaum> then i'd subclass setuptools.command.sdist i think, and make sure that the data files are in your MANIFEST.in
[21:26:14] <ngoldbaum> i guess you could also do it in build_py so it would happen for development installs as well
[21:27:35] <wiml> That seems reasonable. Maybe both sdist and build[_py]
[21:29:23] <wiml> I think that gets me in the right direction. Thanks ngoldbaum and Xelnor