Meson 和 distutils 的做事方式#
旧工作流程(基于 numpy.distutils)
在提交 0f73f92255253ec5dff2de5ca45d8d3bdda03f92 [^1^_] 中移除了 runtests.py 文件。
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- 在当前环境中构建轮子(即使用已安装的 numpy 等)并安装它。pip install .- 在一个隔离的构建环境中针对pyproject.toml中的依赖项构建轮子并安装它。注意:小心,这通常不是开发安装的正确命令 - 通常您需要使用 (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).