Meson 與 distutils
的做事方式#
舊的工作流程 (基於 numpy.distutils)
runtests.py 檔案已在 commit 0f73f92255253ec5dff2de5ca45d8d3bdda03f92 中移除 [^1^_]。
python runtests.py
python 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.py
pip install -e . --no-build-isolation
(請參閱meson-python
文件)與 (2) 相同
python -m build --no-isolation
+pip install dist/scipy*.whl
- 請參閱 pypa/build。pip install .
[^1^_]: [GitHub 上的 Commit 0f73f92255253ec5dff2de5ca45d8d3bdda03f92](scipy/scipy)。