Skip to content

Commit 47c2bd5

Browse files
committed
Update docs for using "build" to create sdist and PEP 517
1 parent cc5229e commit 47c2bd5

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,23 @@ pip install SimpleITK
1313
## Installing SimpleITK for Python from the Python Packaging Source
1414

1515
```bash
16-
pip install SimpleITK
16+
pip install --no-binary :all: SimpleITK
1717
```
1818

1919
### Prerequisites
2020

21-
Building *requires*:
22-
* [CMake](https://cmake.org)
21+
The build requirements are specified in the pyproject.toml file via [PEP 518](https://peps.python.org/pep-0518/). The requirements should be automatically downloaded when using a [PEP 517](https://peps.python.org/pep-0517/) compliant build front-end.
22+
23+
Additionally building *requires*:
2324
* Git
2425
* C++ Compiler - Platform specific requirements are summarized in [scikit-build documentation](http://scikit-build.readthedocs.io).
2526
* Python
2627
* pip >= 9.0.0
27-
* scikit-build >= 0.5.0
2828

29-
Please ensure that `pip` and `scikit-build` are up to date and are a recent version.
30-
31-
*Optional*:
32-
33-
If CMake is not already available on you system it can be installed with pip. Additionally, the [Ninja](https://ninja-build.org) build tool is recommened for it's parallel build efficiency. These can be easily installed with:
29+
Please ensure that `pip` is up to date.
3430

3531
```bash
36-
pip install cmake ninja
32+
python -m pip install --upgrade pip
3733
```
3834

3935
### Compilations and Installation from Github
@@ -52,7 +48,7 @@ Alternatively, SimpleITK for Python can be compiled and installed from the Simpl
5248
pip install SimpleITKPythonPackage-1.0.0.tar.gz
5349
```
5450

55-
The source distributions are available from [PyPI](https://pypi.python.org/pypi/SimpleITK) and [Source Forge](https://sourceforge.net/projects/simpleitk/files/SimpleITK/1.0.0/Python). They are labeled as `SimpleITKPythonPackages` in the Python sub-directory as opposed to just `SimpleITK` for the source archive of the general SimpleITK repository.
51+
The source distributions are available from [PyPI](https://pypi.python.org/pypi/SimpleITK).
5652

5753
## Automated wheels building with scripts
5854

@@ -106,6 +102,13 @@ mkvirtualenv build-sitk
106102
pip install -r requirements-dev.txt
107103
python setup.py bdist_wheel
108104
```
105+
### Building Source Distribution
106+
107+
The Python [build](https://pypa-build.readthedocs.io/en/latest/) package should be used to build the source distribution:
108+
109+
```
110+
python -m build --sdist
111+
```
109112

110113
### Efficiently building wheels for different version of python
111114

0 commit comments

Comments
 (0)