Skip to content

Commit 195cc59

Browse files
authored
Update python-pipeline-dependencies.md (#37561)
* Update python-pipeline-dependencies.md Add note about setuptools and backwards compatibility with example * Update python-pipeline-dependencies.md whispace
1 parent d9adfa9 commit 195cc59

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

website/www/site/content/en/documentation/sdks/python-pipeline-dependencies.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,20 @@ However unlike with the `--requirements_file` option, when you use the `--setup_
134134
Only the pipeline package is staged. If they aren't already provided in the runtime environment,
135135
the package dependencies are installed from PyPI at runtime.
136136

137+
**Note:** When using the install_requires argument, ensure that the listed packages are compatible with the version of setuptools used by the runner's environment.
138+
If your dependencies require a backward-compatible version of setuptools to build successfully, you can force a specific version requirement using the setup_requires argument.
139+
140+
For instance, to ensure compatibility with packages that still rely on (now deprecated) `pkg_resources` module:
141+
142+
import setuptools
143+
144+
setuptools.setup(
145+
name='PACKAGE-NAME',
146+
version='PACKAGE-VERSION',
147+
setup_requires=['setuptools<82.0.0'],
148+
install_requires=['incompatible-package', ...],
149+
packages=setuptools.find_packages()
150+
)
137151

138152
## Non-Python Dependencies or PyPI Dependencies with Non-Python Dependencies {#nonpython}
139153

0 commit comments

Comments
 (0)