Meson 和 distutils 的工作方式#
旧工作流(基于 numpy.distutils)
runtests.py 文件已在提交 0f73f92255253ec5dff2de5ca45d8d3bdda03f92 [^1^_] 中移除。
python runtests.pypython setup.py build_ext -i+export PYTHONPATH=/home/username/path/to/scipy/reporoot(然后编辑 SciPy 中的纯 Python 代码并使用python some_script.py运行它)。python setup.py develop- 这与 (2) 类似,不同之处在于就地构建在环境中永久可见。python setup.py bdist_wheel+pip install dist/scipy*.whl- 在当前环境中构建 wheel (即使用已安装的 numpy 等) 并安装它。pip install .- 在隔离的构建环境中,根据pyproject.toml中的依赖项构建 wheel 并安装它。注意:请小心,这通常不是开发安装的正确命令——通常您会希望使用 (4) 或pip install . -v --no-build-isolation。
新工作流(基于 Meson 和 meson-python)
python dev.pypip install -e . --no-build-isolation(参见meson-python文档)与 (2) 相同
python -m build --no-isolation+pip install dist/scipy*.whl- 参见 pypa/build。pip install .
[^1^_]: [GitHub 上的提交 0f73f92255253ec5dff2de5ca45d8d3bdda03f92](scipy/scipy)。