Skip to content

Commit 90ca20d

Browse files
committed
DOC: Clean up file header comments on script usage
1 parent 49f7e81 commit 90ca20d

9 files changed

+117
-58
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
########################################################################
34
# Run this script to build the Python wheel packages for Linux for an ITK
45
# external module.
56
#
@@ -17,12 +18,8 @@
1718
# These variables are set with the `export` bash command before calling the script.#
1819
# For example,
1920
#
20-
# export ITK_PACKAGE_VERSION="v5.3.0"
21+
# export MANYLINUX_VERSION="_2_28"
2122
# scripts/dockcross-manylinux-build-module-wheels.sh cp39
22-
#
23-
# `ITK_PACKAGE_VERSION`: ITKPythonBuilds archive tag to use for ITK build artifacts.
24-
# See https://github.com/InsightSoftwareConsortium/ITKPythonBuilds for available tags.
25-
# For instance, `export ITK_PACKAGE_VERSION=v5.3.0`.
2623
#
2724
# `LD_LIBRARY_PATH`: Shared libraries to be included in the resulting wheel.
2825
# For instance, `export LD_LIBRARY_PATH="/path/to/OpenCL.so:/path/to/OpenCL.so.1.2"`
@@ -35,15 +32,11 @@
3532
# For instance, `export IMAGE_TAG=20221205-459c9f0`
3633
#
3734
# `ITK_MODULE_PREQ`: Prerequisite ITK modules that must be built before the requested module.
38-
# Format is `<org_name>/<module_name>@<module_tag>:<org_name>/<module_name>@<module_tag>:...`.
39-
# For instance, `export ITK_MODULE_PREQ=InsightSoftwareConsortium/[email protected]`
40-
#
41-
# `ITKPYTHONPACKAGE_ORG`: Github organization for fetching ITKPythonPackage build scripts.
42-
#
43-
# `ITKPYTHONPACKAGE_TAG`: ITKPythonPackage tag for fetching build scripts.
35+
# See notes in `dockcross-manylinux-build-module-deps.sh`.
4436
#
4537
# `ITK_MODULE_NO_CLEANUP`: Option to skip cleanup steps.
4638
#
39+
########################################################################
4740

4841
# Handle case where the script directory is not the working directory
4942
script_dir=$(cd $(dirname $0) || exit 1; pwd)

scripts/dockcross-manylinux-cleanup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
########################################################################
44
# Run this script in an ITK external module directory to clean up
5-
# build artifacts for prerequisite ITK external modules.
6-
# Typically required for building multiple module wheels in the same
5+
# Linux Python build artifacts.
6+
#
7+
# Typically required for building multiple types of module wheels in the same
78
# directory, such as using different toolsets or targeting different
89
# architectures.
910
#

scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
#!/bin/bash
22

3-
# This module should be pulled and run from an ITKModule root directory to generate the Linux python wheels of this module,
4-
# it is used by the azure-pipeline.yml file contained in ITKModuleTemplate: https://github.com/InsightSoftwareConsortium/ITKModuleTemplate
3+
########################################################################
4+
# Pull this script and run from an ITK external module root directory
5+
# to generate the Linux Python wheels for the external module.
56
#
6-
# Exported variables used in this script:
7-
# - ITK_PACKAGE_VERSION: Tag for ITKPythonBuilds build archive to use
8-
# Examples: "v5.3.0", "v5.2.1.post1"
9-
# See available tags at https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/tags
10-
# - MANYLINUX_VERSION: manylinux specialization to use
11-
# Examples: "_2_28", "2014", "_2_28_aarch64"
12-
# See https://github.com/dockcross/dockcross
13-
# - ITKPYTHONPACKAGE_TAG: Tag for ITKPythonPackage build scripts to use.
14-
# If ITKPYTHONPACKAGE_TAG is empty then the default scripts distributed
15-
# with the ITKPythonBuilds archive will be used.
16-
# - ITKPYTHONPACKAGE_ORG: Github organization or user to use for ITKPythonPackage
17-
# build script source. Default is InsightSoftwareConsortium.
18-
# Ignored if ITKPYTHONPACKAGE_TAG is empty.
7+
# ========================================================================
8+
# PARAMETERS
199
#
10+
# Versions can be restricted by passing them in as arguments to the script
11+
# For example,
12+
#
13+
# scripts/dockcross-manylinux-build-module-wheels.sh cp39
14+
#
15+
# ===========================================
16+
# ENVIRONMENT VARIABLES
17+
#
18+
# These variables are set with the `export` bash command before calling the script.
19+
# For example,
20+
#
21+
# export ITK_PACKAGE_VERSION="v5.3.0"
22+
# scripts/dockcross-manylinux-build-module-wheels.sh cp39
23+
#
24+
# `ITKPYTHONPACKAGE_ORG`: Github organization for fetching ITKPythonPackage build scripts.
25+
#
26+
# `ITKPYTHONPACKAGE_TAG`: ITKPythonPackage tag for fetching build scripts.
27+
#
28+
# Additional environment variables may be defined in accompanying build scripts.
29+
#
30+
########################################################################
2031

2132
# -----------------------------------------------------------------------
2233
# Script argument parsing

scripts/dockcross-manylinux-download-cache.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
#!/bin/bash
22

3-
# -----------------------------------------------------------------------
4-
#
5-
# Download ITK build cache and other requirements to prepare for generating Linux Python wheels of the given ITK module.
3+
########################################################################
4+
# Download ITK build cache and other requirements to prepare for
5+
# generating Linux Python wheels of the given ITK module.
66
#
77
# Most ITK modules will download and call `dockcross-manylinux-download-cache-and-build-module-wheels.sh` which will
88
# subsequently fetch and run this script for getting build artifacts.
99
# ITK modules with tailored build processes may instead directly fetch and run this script as part of their own
1010
# custom build workflow. Examples include ITK GPU-based modules that require additional system configuration
1111
# steps not present in `dockcross-manylinux-download-cache-and-build-module-wheels.sh`.
1212
#
13-
# Exported variables used in this script:
14-
# - ITK_PACKAGE_VERSION: Tag for ITKPythonBuilds build cache to use
13+
# ===========================================
14+
# ENVIRONMENT VARIABLES
15+
#
16+
# `ITK_PACKAGE_VERSION`: Tag for ITKPythonBuilds build cache to use
1517
# Examples: "v5.3.0", "v5.2.1.post1"
1618
# See available tags at https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/tags
17-
# - MANYLINUX_VERSION: manylinux specialization used to build ITK for cache
19+
#
20+
# `MANYLINUX_VERSION`: manylinux specialization used to build ITK for cache
1821
# Examples: "_2_28", "2014", "_2_28_aarch64"
1922
# See https://github.com/dockcross/dockcross
20-
# - ITKPYTHONPACKAGE_TAG: Tag for ITKPythonPackage build scripts to use.
23+
#
24+
# `ITKPYTHONPACKAGE_TAG`: Tag for ITKPythonPackage build scripts to use.
2125
# If ITKPYTHONPACKAGE_TAG is empty then the default scripts distributed
2226
# with the ITKPythonBuilds archive will be used.
23-
# - ITKPYTHONPACKAGE_ORG: Github organization or user to use for ITKPythonPackage
27+
#
28+
# `ITKPYTHONPACKAGE_ORG`: Github organization or user to use for ITKPythonPackage
2429
# build script source. Default is InsightSoftwareConsortium.
2530
# Ignored if ITKPYTHONPACKAGE_TAG is empty.
2631
#
32+
########################################################################
33+
2734
# -----------------------------------------------------------------------
2835
# Script argument parsing
2936
#

scripts/dockcross-manylinux-set-vars.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
# Run this script to set enviroment variables used in building the
3+
########################################################################
4+
# Run this script to set common enviroment variables used in building the
45
# ITK Python wheel packages for Linux.
56
#
67
# ENVIRONMENT VARIABLES
@@ -11,6 +12,7 @@
1112
# export ITK_PACKAGE_VERSION=v5.3.0
1213
# scripts/dockcross-manylinux-set-vars.sh cp39
1314
#
15+
########################################################################
1416

1517
########################################################################
1618
# ITKPythonBuilds parameters

scripts/macpython-build-module-deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export ITK_MODULE_PREQ=""
3838
export ITK_USE_LOCAL_PYTHON="ON"
3939

4040
########################################################################
41-
echo "Building ITK module dependencies"
41+
echo "Building ITK module dependencies: ${ITK_MODULE_PREQ_TOPLEVEL}"
4242

4343
for MODULE_INFO in ${ITK_MODULE_PREQ_TOPLEVEL//:/ }; do
4444
MODULE_ORG=`(echo ${MODULE_INFO} | cut -d'/' -f 1)`

scripts/macpython-build-module-wheels.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,43 @@
11
#!/usr/bin/env bash
22

3-
# Run this script to build the Python wheel packages for macOS for an ITK
4-
# external module.
3+
########################################################################
4+
# Run this script in an ITK external module directory to build the
5+
# Python wheel packages for macOS for an ITK external module.
6+
#
7+
# ========================================================================
8+
# PARAMETERS
59
#
610
# Versions can be restricted by passing them in as arguments to the script.
11+
# For example,
712
#
13+
# scripts/macpython-build-module-wheels.sh 3.7 3.9
814
# Shared libraries can be included in the wheel by exporting them to DYLD_LIBRARY_PATH before
915
# running this script.
1016
#
17+
# ===========================================
18+
# ENVIRONMENT VARIABLES
19+
#
20+
# These variables are set with the `export` bash command before calling the script.
1121
# For example,
1222
#
1323
# export DYLD_LIBRARY_PATH="/path/to/libs"
1424
# scripts/macpython-build-module-wheels.sh 3.7 3.9
1525
#
26+
# `DYLD_LIBRARY_PATH`: Shared libraries to be included in the resulting wheel.
27+
# For instance, `export DYLD_LIBRARY_PATH="/path/to/OpenCL.so:/path/to/OpenCL.so.1.2"`
28+
#
29+
# `ITK_MODULE_PREQ`: Prerequisite ITK modules that must be built before the requested module.
30+
# Format is `<org_name>/<module_name>@<module_tag>:<org_name>/<module_name>@<module_tag>:...`.
31+
# For instance, `export ITK_MODULE_PREQ=InsightSoftwareConsortium/[email protected]`
32+
#
33+
########################################################################
1634

1735

1836
# -----------------------------------------------------------------------
1937
# (Optional) Build ITK module dependencies
2038

2139
script_dir=$(cd $(dirname $0) || exit 1; pwd)
2240

23-
echo "ITK_MODULE_PREQ ${ITK_MODULE_PREQ}"
2441
if [[ -n ${ITK_MODULE_PREQ} ]]; then
2542
source "${script_dir}/macpython-build-module-deps.sh"
2643
fi

scripts/macpython-download-cache-and-build-module-wheels.sh

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
#!/bin/bash
22

3-
# This module should be pull and run from an ITKModule root directory to generate the Mac python wheels of this module,
4-
# it is used by the .travis.yml file contained in ITKModuleTemplate: https://github.com/InsightSoftwareConsortium/ITKModuleTemplate
5-
#
6-
# Exported variables used in this script:
7-
# - ITK_PACKAGE_VERSION: Tag for ITKPythonBuilds build archive to use
8-
# - ITKPYTHONPACKAGE_TAG: Tag for ITKPythonPackage build scripts to use.
9-
# If ITKPYTHONPACKAGE_TAG is empty then the default scripts distributed
10-
# with the ITKPythonBuilds archive will be used.
11-
# - ITKPYTHONPACKAGE_ORG: Github organization or user to use for ITKPythonPackage
12-
# build script source. Default is InsightSoftwareConsortium.
13-
# Ignored if ITKPYTHONPACKAGE_TAG is empty.
3+
########################################################################
4+
# This module should be pulled and run from an ITK external module root directory
5+
# to generate the Mac python wheels of this module.
6+
#
7+
# ========================================================================
8+
# PARAMETERS
9+
#
10+
# Versions can be restricted by passing them in as arguments to the script.
11+
# For example,
12+
#
13+
# scripts/macpython-build-module-wheels.sh 3.7 3.9
14+
# Shared libraries can be included in the wheel by exporting them to DYLD_LIBRARY_PATH before
15+
# running this script.
16+
#
17+
# ===========================================
18+
# ENVIRONMENT VARIABLES
19+
#
20+
# These variables are set with the `export` bash command before calling the script.
21+
# For example,
22+
#
23+
# export DYLD_LIBRARY_PATH="/path/to/libs"
24+
# scripts/macpython-build-module-wheels.sh 3.7 3.9
25+
#
26+
# `ITK_PACKAGE_VERSION`: ITKPythonBuilds archive tag to use for ITK build artifacts.
27+
# See https://github.com/InsightSoftwareConsortium/ITKPythonBuilds for available tags.
28+
# For instance, `export ITK_PACKAGE_VERSION=v5.3.0`.
29+
#
30+
# `ITKPYTHONPACKAGE_ORG`: Github organization for fetching ITKPythonPackage build scripts.
31+
#
32+
# `ITKPYTHONPACKAGE_TAG`: ITKPythonPackage tag for fetching build scripts.
33+
#
34+
# `ITK_USE_LOCAL_PYTHON`: Determine how to get Python framework for build.
35+
# - If empty, Python frameworks will be fetched from python.org
36+
# - If not empty, frameworks already on machine will be used without fetching.
37+
#
38+
########################################################################
1439

1540
# Install dependencies
1641
brew update

scripts/windows-download-cache-and-build-module-wheels.ps1

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -----------------------------------------------------------------------
1+
########################################################################
22
# Pull build dependencies and build an ITK external module.
33
#
44
# This script must be run in an x64 Developer Powershell.
@@ -14,18 +14,21 @@
1414
# -----------------------------------------------------------------------
1515
# Environment variables used in this script:
1616
#
17-
# - $env:ITK_PACKAGE_VERSION: Tag for ITKPythonBuilds build archive to use
18-
# - $env:ITKPYTHONPACKAGE_TAG: Tag for ITKPythonPackage build scripts to use.
17+
# `$env:ITK_PACKAGE_VERSION`: Tag for ITKPythonBuilds build archive to use
18+
#
19+
# `$env:ITKPYTHONPACKAGE_TAG`: Tag for ITKPythonPackage build scripts to use.
1920
# If ITKPYTHONPACKAGE_TAG is empty then the default scripts distributed
2021
# with the ITKPythonBuilds archive will be used.
21-
# - $env:ITKPYTHONPACKAGE_ORG: Github organization or user to use for ITKPythonPackage
22+
#
23+
# `$env:ITKPYTHONPACKAGE_ORG`: Github organization or user to use for ITKPythonPackage
2224
# build script source. Default is InsightSoftwareConsortium.
2325
# Ignored if ITKPYTHONPACKAGE_TAG is empty.
24-
# - $env:ITK_MODULE_PREQ: Delimited list of ITK module dependencies to build before
25-
# building the target module.
26+
#
27+
# `$env:ITK_MODULE_PREQ`: Delimited list of ITK module dependencies to build before building the target module.
2628
# Format is `<org_name>/<module_name>@<module_tag>:<org_name>/<module_name>@<module_tag>:...`.
2729
# For instance, `export ITK_MODULE_PREQ=InsightSoftwareConsortium/[email protected]`
2830
#
31+
########################################################################
2932

3033
$pythonArch = "64"
3134
$pythonVersion = "3.$($args[0])"

0 commit comments

Comments
 (0)