Skip to content

Commit d6f43c3

Browse files
committed
DOC: Use README.md to package long_description
Update this repository's README.md, but use the ITK README.md if available. Improve the ITK-source external project directory name.
1 parent 30948ed commit d6f43c3

14 files changed

Lines changed: 98 additions & 57 deletions

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ if(ITKPythonPackage_SUPERBUILD)
9090

9191
if(NOT DEFINED ITK_SOURCE_DIR)
9292

93-
set(ITK_SOURCE_DIR ${CMAKE_BINARY_DIR}/ITKs)
93+
set(ITK_SOURCE_DIR ${CMAKE_BINARY_DIR}/ITK)
9494

9595
ExternalProject_add(ITK-source-download
9696
SOURCE_DIR ${ITK_SOURCE_DIR}

‎README.md‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
ITK Python Package
2+
==================
3+
4+
This project provides a `setup.py` script to build ITK Python binary
5+
packages and infrastructure to build ITK external module Python
6+
packages.
7+
8+
ITK is an open-source, cross-platform system that provides developers
9+
with an extensive suite of software tools for image analysis.
10+
11+
Installation
12+
------------
13+
14+
To install the ITK Python package:
15+
16+
```
17+
$ pip install itk
18+
```
19+
20+
or:
21+
22+
```
23+
$ conda install -c conda-forge itk
24+
```
25+
26+
Usage
27+
-----
28+
29+
### Simple example script
30+
31+
```
32+
import itk
33+
import sys
34+
35+
input_filename = sys.argv[1]
36+
output_filename = sys.argv[2]
37+
38+
image = itk.imread(input_filename)
39+
40+
median = itk.median_image_filter(image, radius=2)
41+
42+
itk.imwrite(median, output_filename)
43+
```
44+
45+
See also the [ITK Python Quick Start
46+
Guide](https://itkpythonpackage.readthedocs.io/en/latest/Quick_start_guide.html).
47+
There are also many [downloadable examples documented in
48+
Sphinx](https://itk.org/ITKExamples/search.html?q=Python).
49+
50+
For more information on ITK's Python wrapping, [an introduction is
51+
provided in the ITK Software
52+
Guide](https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch3.html#x32-420003.7).
53+
54+
- Free software: Apache Software license
55+
- Documentation: <http://itkpythonpackage.readthedocs.org>
56+
- Source code: <https://github.com/InsightSoftwareConsortium/ITKPythonPackage>
57+

‎README.rst‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎docs/Build_ITK_Python_packages.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ Here are the steps:
130130
- Build "flavor" of package using::
131131

132132
python setup.py bdist_wheel -- \
133-
-DITK_SOURCE_DIR:PATH=/path/to/ITKPythonPackage-core-build/ITKs
133+
-DITK_SOURCE_DIR:PATH=/path/to/ITKPythonPackage-core-build/ITK

‎scripts/dockcross-manylinux-build-module-wheels.sh‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010

1111
# Pull dockcross manylinux images
1212
docker pull dockcross/manylinux1-x64
13-
#docker pull dockcross/manylinux1-x86
1413

1514
# Generate dockcross scripts
1615
docker run dockcross/manylinux1-x64 > /tmp/dockcross-manylinux-x64
1716
chmod u+x /tmp/dockcross-manylinux-x64
18-
#docker run dockcross/manylinux1-x86 > /tmp/dockcross-manylinux-x86
19-
#chmod u+x /tmp/dockcross-manylinux-x86
2017

2118
script_dir=$(cd $(dirname $0) || exit 1; pwd)
2219

@@ -26,6 +23,3 @@ DOCKER_ARGS="-v $(pwd)/dist:/work/dist/ -v $script_dir/..:/ITKPythonPackage -v $
2623
/tmp/dockcross-manylinux-x64 \
2724
-a "$DOCKER_ARGS" \
2825
"/ITKPythonPackage/scripts/internal/manylinux-build-module-wheels.sh" "$@"
29-
#/tmp/dockcross-manylinux-x86 \
30-
# -a "$DOCKER_ARGS" \
31-
# "/ITKPythonPackage/scripts/internal/manylinux-build-module-wheels.sh" "$@"

‎scripts/dockcross-manylinux-build-tarball.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
cd /home/kitware/Packaging
88
tar -c --to-stdout \
99
ITKPythonPackage/ITK-* \
10-
ITKPythonPackage/standalone-* \
1110
ITKPythonPackage/scripts > ITKPythonBuilds-linux.tar
1211
/home/kitware/Support/zstd-build/programs/zstd -f \
1312
./ITKPythonBuilds-linux.tar \

‎scripts/dockcross-manylinux-build-wheels.sh‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99

1010
# Pull dockcross manylinux images
1111
docker pull dockcross/manylinux1-x64
12-
#docker pull dockcross/manylinux1-x86
1312

1413
# Generate dockcross scripts
1514
docker run dockcross/manylinux1-x64 > /tmp/dockcross-manylinux-x64
1615
chmod u+x /tmp/dockcross-manylinux-x64
17-
#docker run dockcross/manylinux1-x86 > /tmp/dockcross-manylinux-x86
18-
#chmod u+x /tmp/dockcross-manylinux-x86
1916

2017
script_dir=$(cd $(dirname $0) || exit 1; pwd)
2118

@@ -26,7 +23,4 @@ DOCKER_ARGS="-v $(pwd)/dist:/work/dist/"
2623
/tmp/dockcross-manylinux-x64 \
2724
-a "$DOCKER_ARGS" \
2825
./scripts/internal/manylinux-build-wheels.sh "$@"
29-
#/tmp/dockcross-manylinux-x86 \
30-
# -a "$DOCKER_ARGS" \
31-
# ./scripts/internal/manylinux-build-wheels.sh "$@"
3226
popd

‎scripts/internal/manylinux-build-module-wheels.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ for PYBIN in "${PYBINARIES[@]}"; do
3535
echo 'ITK build tree not available!' 1>&2
3636
exit 1
3737
fi
38-
itk_source_dir=/work/standalone-${ARCH}-build/ITKs
39-
ln -fs /ITKPythonPackage/standalone-${ARCH}-build/ /work/standalone-${ARCH}-build
38+
itk_source_dir=/work/ITK-source/ITK
39+
ln -fs /ITKPythonPackage/ITK-source/ /work/ITK-source
4040
if [[ ! -d ${itk_source_dir} ]]; then
4141
echo 'ITK source tree not available!' 1>&2
4242
exit 1

‎scripts/internal/manylinux-build-wheels.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ popd > /dev/null 2>&1
1818
# -----------------------------------------------------------------------
1919

2020
# Build standalone project and populate archive cache
21-
mkdir -p /work/standalone-${ARCH}-build
22-
pushd /work/standalone-${ARCH}-build > /dev/null 2>&1
21+
mkdir -p /work/ITK-source
22+
pushd /work/ITK-source > /dev/null 2>&1
2323
cmake -DITKPythonPackage_BUILD_PYTHON:PATH=0 -G Ninja ../
2424
ninja
2525
popd > /dev/null 2>&1
@@ -42,7 +42,7 @@ for PYBIN in "${PYBINARIES[@]}"; do
4242
${PYBIN}/pip install --upgrade -r /work/requirements-dev.txt
4343

4444
build_type=MinSizeRel
45-
source_path=/work/standalone-${ARCH}-build/ITKs
45+
source_path=/work/ITK-source/ITK
4646
build_path=/work/ITK-$(basename $(dirname ${PYBIN}))-manylinux1_${ARCH}
4747
SETUP_PY_CONFIGURE="${script_dir}/../setup_py_configure.py"
4848
SKBUILD_CMAKE_INSTALL_PREFIX=$(${Python3_EXECUTABLE} -c "from skbuild.constants import CMAKE_INSTALL_DIR; print(CMAKE_INSTALL_DIR)")

‎scripts/macpython-build-tarball.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
pushd /Users/kitware/Dashboards/ITK > /dev/null
88
tar -cf ITKPythonBuilds-macosx.tar \
99
ITKPythonPackage/ITK-* \
10-
ITKPythonPackage/standalone-* \
1110
ITKPythonPackage/venvs \
1211
ITKPythonPackageRequiredExtractionDir.txt \
1312
ITKPythonPackage/scripts

0 commit comments

Comments
 (0)