Commit 7fbb868
committed
Modernize build commands for setuptools 80+ compatibility
Replace deprecated setup.py develop commands with modern pip equivalents:
- Replace 'setup.py develop --uninstall' with 'pip uninstall -y monai'
- Replace 'setup.py develop' with 'pip install -e .'
- Remove setuptools upper bound for Python 3.12+ (previously <=79.0.1)
- Add BUILD_MONAI=1 explicitly in compile_cpp to ensure C++/CUDA extensions build
- Remove --user flag from editable installs for virtualenv compatibility
In setuptools 80+, the 'setup.py develop --uninstall' command was removed
as part of PEP 660 modernization. The build system now delegates to pip
for all installation and uninstallation operations.
When using 'pip install -e .', the BUILD_MONAI environment variable must be
set explicitly to trigger C++/CUDA compilation, as it's not automatically
inherited due to pip's build isolation.
The --user flag is removed from editable installs because it breaks inside
virtualenvs (the modern development standard). Without --user, pip installs
into the active virtualenv when present, or prompts for sudo when needed.
Changes made:
- runtests.sh: Updated compile_cpp() and clean_py() to use pip commands,
set BUILD_MONAI=1 explicitly, and removed --user flag
- requirements-min.txt: Removed setuptools <=79.0.1 upper bound for Python 3.12+
- docs/source/installation.md: Updated editable installation examples
- .github/workflows/pythonapp.yml: Updated CI workflow to use pip commands
Fixes #8439
Signed-off-by: Mohamed Salah <eng.mohamed.tawab@gmail.com>1 parent b106a4c commit 7fbb868
File tree
4 files changed
+12
-12
lines changed- .github/workflows
- docs/source
4 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
0 commit comments