Skip to content

Avoid separate numpy and cython install when building from source #148

@letmaik

Description

@letmaik

Related to #147.

The end goal is to be able to do pip install git+https://github.com/letmaik/rawpy.git@v0.16.0 without installing numpy and cython in advance. This is mostly for Linux and will also work on macOS.

setuptools got more clever regarding cython: https://github.com/pypa/setuptools/blob/main/CHANGES.rst#180 But see also pypa/setuptools#1317.
However, this is not enough, as there's also this bit in setup.py: include_dirs += [numpy.get_include()]. I'm not sure yet how that can be deferred. Probably using pyproject.toml to declare build dependencies. The issue with that is that the numpy version should depend on the Python version to be as ABI compatible as possible, see also the GitHub Actions workflow. Maybe the requirements specifiers allow to express this. EDIT: There's https://pypi.org/project/oldest-supported-numpy/ which seems to be useful for this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions