[Distutils] On vendoring binaries and headers with pypi packages
sylvain.corlay at gmail.com
Mon May 15 17:42:39 EDT 2017
Let's say that you have an anaconda installation, and you install the
latest pyzmq from pypi instead of from the conda recipe.
I would like the vendored libzmq to be placed under `PREFIX/bin` and the
headers under `PREFIX/include`, just as if I had either
- installed zmq with `cmake -D CMAKE_INSTALL_PREFIX=PREFIX` and `make
- or installed the zeromq from the conda package.
Similarly, for a system-wide install on linux distribution, the same would
hold with PREFIX=/usr
On Mon, May 15, 2017 at 9:47 PM, Nathaniel Smith <njs at pobox.com> wrote:
> What are you trying to accomplish by putting include files into
> On May 15, 2017 10:29 AM, "Sylvain Corlay" <sylvain.corlay at gmail.com>
>> When distributing python packages that depend on non-python components,
>> the typical way of doing this with general-purpose package managers (linux
>> distributions, conda) is to place binaries, headers, configuration and
>> other artefacts for these components in their respective natural locations
>> under the installation prefix (e.g. PREFIX/bin/, PREFIX/include/,
>> PREFIX/etc/, PREFIX/share/).
>> Now, if I have a python package that depends on such a thing (e.g. pyzmq
>> vs zmq), the pypi wheel for pyzmq will vendor a binary for libzmq as
>> package data.
>> For the case of the header files, there is the distutils
>> `install_headers` directive, but the target directory is (typically) under
>> PREFIX/include/PythonX.Y, which is probably only a good choices for headers
>> of a C extension linked with this specific python installation.
>> Would it make sense, when vendoring packages packages that don't depend
>> on the python version in a wheel to use `data_files` instead, and target
>> respectively the `bin`, `include`, `etc` and `share` subdirectories of the
>> Specifically, for the headers, one could do
>> data_files = [
>> ('include/foobar', [list of the foobar header files])),
>> Note: I was just using zmq as an example.
>> Distutils-SIG maillist - Distutils-SIG at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG