Meson 和 distutils 做事的方式#
旧的工作流程(基于 numpy.distutils):
python runtests.pypython setup.py build_ext -i+export PYTHONPATH=/home/username/path/to/numpy/reporoot(然后编辑NumPy中的纯Python代码并用python some_script.py运行它).python setup.py develop- 这类似于(2),除了就地构建在环境中永久可见.python setup.py bdist_wheel+pip install dist/numpy*.whl- 在当前环境中构建轮子并安装它.pip install .- 在隔离的构建环境中针对pyproject.toml中的依赖项构建 wheel 并安装它.*注意:小心,这通常不是用于开发安装的正确命令 - 通常你想要使用 (4) 或*pip install . -v --no-build-isolation.
新工作流(基于 Meson 和 meson-python):
spin testpip install -e . --no-build-isolation(注意:仅适用于在NumPy本身上工作 - 更多详情,请参见 IDE支持与可编辑安装)与 (2) 相同
python -m build --no-isolation+pip install dist/numpy*.whl- 见 pypa/build.pip install .