Skip to content

Add numpy as a build requirement

Irham Rasyidi requested to merge 39-numpy-build-requirement into master

Closes #39 (closed)

As described in the issue, this MR adds a pyproject.toml file that specifies "numpy>=1.14" as a build requirement.

Additional changes:

  • Replace the deprecated np.typeDict alias with np.scitypeDict
  • Fix new PyLint errors that appeared in newer versions of PyLint.

Notes:

  • This allows sortednp to be installed via pip (e.g. pip install path/to/sortednp-repository), though I have only tested it within a clean venv running Python 3.10.11 and Pip 23.0.1.

    ❯ python -m venv .venv
    source .venv/bin/activate
    ❯ python --version      
    Python 3.10.11
    ❯ pip --version         
    pip 23.0.1 from (path truncated)/sortednp/.venv/lib/python3.10/site-packages/pip (python 3.10)
    ❯ pip list | grep setuptools
    setuptools 65.5.0
    ❯ pip install .
    (...truncated)
    Collecting numpy>=1.14
      Using cached numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
    Building wheels for collected packages: sortednp
      Building wheel for sortednp (pyproject.toml) ... done
      Created wheel for sortednp: (...truncated)
    Installing collected packages: numpy, sortednp
    Successfully installed numpy-1.26.1 sortednp-0.4.0
  • This has not been tested with installation via setup.py, or for Python versions other than 3.10.11.

Edited by Irham Rasyidi

Merge request reports