Skip to content

Does stripy support numpy 2.x on PyPI (pip) ? #114

@jcannon-gplates

Description

@jcannon-gplates

I can see that stripy 2.3.3 on conda supports numpy 2.x (conda-forge/stripy-feedstock#21).

Do you know if stripy 2.3.3 on PyPI was also compiled with numpy 2.x ?

Because in GPlates/gplately#305 we're getting a numpy import error that appears to come from stripy. But if we downgrade numpy from 2.x to 1.x it's fine.

Building against numpy 2.x supports both numpy 1.x and 2.x at runtime. So you could force compilation against numpy 2.x with something like the following in your "pyproject.toml":

[build-system]
...
requires = [
    # Building against numpy 2.x supports both numpy 1.x and 2.x at *runtime*.
    'numpy>=2.0; python_version>="3.9"',
    # Python 3.8 is not supported by NumPy 2.x.
    # And *building* against NumPy 1.x does NOT support earlier (<1.x) versions at runtime.
    # So using the oldest supported NumPy for the Python version and platform.
    'oldest-supported-numpy; python_version<"3.9"',
    ...
]

...this is what I do in pygplates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions