On Wed, Dec 7, 2016 at 5:46 PM, Daniel Holth <
dho...@gmail.com> wrote:
> I'm curious about what it might take to build Python packages and extension
> modules with Meson. I've done it in SCons, and the Python-packaging-specific
> parts are easy. The process would seem to have a few requirements.
>
> - 'Building' .py by copying
> - Building shared modules in-place: during development, "import
> mylib._extension" expects the .so to exist in the mylib/ directory
> - Generating metadata
> - Creating .tar.gz and .zip files of the source and built artifacts.
> Archives with metadata and a specific directory structure are required for
> PyPI upload
We already have a few test cases to build extensions and run them with
unit tests:
https://github.com/mesonbuild/meson/tree/master/test%20cases/python3
Built modules do not need to be in the current dir as long as
PYTHONPATH is set correctly (for example see how unit tests do it).
Install is missing but that is just a case of setting a few install
directives and install_subdirs. We have not looked into PyPI
integration because I have assumed that any packages uploaded there
would need to build with distutils/setuptools (there is at least one
SCons Python module thing that specifically generates setup.py files).
If this is not necessary but instead it is enough to produce a wheel
in a specific format then I guess we could look into providing that.