Skip to content

Commit

Permalink
Merge pull request #595 from intersystems/v1-feat-bypass-py-deps
Browse files Browse the repository at this point in the history
feat: allow bypass installation of python dependencies
  • Loading branch information
isc-tleavitt authored Oct 25, 2024
2 parents 9b0902f + 438eb4e commit 9889db6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #538 Added ability to customize caller to PipCaller and UseStandalonePip through `config set`, which are empty by default and can be used to override the auto-detection of pip.
- #562 Added a generic resource processpor `WebApplication`, which handles creating and removal of all Security.Applications resources
- #575 Added ability to expand `$$$macro` in module.xml. The macro cannot take any arguments yet.
- #595 Added ability to bypass installation of python dependencies with -bypass-py-deps or -DBypassPyDeps=1.

### Changed
- IPM is now namespace-specific rather than being installed in %SYS and being available instance-wide.
Expand Down
6 changes: 6 additions & 0 deletions src/cls/IPM/Lifecycle/Base.cls
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ Method InstallPythonRequirements(pRoot As %String = "", ByRef pParams)
Quit $$$OK
}
Set tVerbose = $Get(pParams("Verbose"))
If $Get(pParams("BypassPyDeps"), 0) {
If tVerbose {
Write !, "Skipping installation of Python dependencies because -bypass-py-deps is set."
}
Quit $$$OK
}
Set pythonRequirements = ##class(%File).NormalizeFilename("requirements.txt", pRoot)
If '##class(%File).Exists(pythonRequirements) {
Quit $$$OK
Expand Down
12 changes: 12 additions & 0 deletions src/cls/IPM/Main.cls
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ load -dev -verbose C:\module\root\path\module-0.0.1.tgz
load https://github.com/user/repository.git
load https://github.com/user/repository.git -branch feature-1
</example>
<example description="Loads the module described in C:\module\root\path\module.xml without installing python dependencies">
load -bypass-py-deps C:\module\root\path\
</example>


<!-- Modifiers -->
Expand All @@ -258,6 +261,7 @@ load https://github.com/user/repository.git -branch feature-1
<modifier name="nodev" dataAlias="DeveloperMode" dataValue="0" description="Disables the DeveloperMode flag for the module's lifecycle." />
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />

<!-- Parameters -->
<parameter name="path" required="true" description="Directory on the local filesystem, containing a file named module.xml" />
Expand Down Expand Up @@ -356,6 +360,9 @@ run C:\Temp\MyCommands.json, where contents of the file are as follows:
<example description="Installs the most recent 1.x version of HS.JSON available in any configured repository in the current namespace.">
install HS.JSON 1.x
</example>
<example description="Installs HS.JSON without installing python dependencies">
install -bypass-py-deps HS.JSON
</example>

<!-- Parameters -->
<parameter name="module" required="true" description="Name of module to install" />
Expand All @@ -368,6 +375,7 @@ run C:\Temp\MyCommands.json, where contents of the file are as follows:
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="keywords" aliases="k" value="true" description="Searches for modules matching some set of keywords." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />

</command>

Expand All @@ -382,6 +390,9 @@ run C:\Temp\MyCommands.json, where contents of the file are as follows:
<example description="Reinstalls the currently-installed version of the ZHSLIB module, in development mode">
reinstall -dev ZHSLIB
</example>
<example description="Reinstalls the currently-installed vresion of the ZHSLIB module without reinstalling python dependencies">
reinstall -bypass-py-deps ZHSLIB
</example>

<!-- Parameters -->
<parameter name="module" required="true" description="Name of module to reinstall" />
Expand All @@ -391,6 +402,7 @@ run C:\Temp\MyCommands.json, where contents of the file are as follows:
<modifier name="quiet" aliases="q" dataAlias="Verbose" dataValue="0" description="Produces minimal output from the command." />
<modifier name="verbose" aliases="v" dataAlias="Verbose" dataValue="1" description="Produces verbose output from the command." />
<modifier name="shallow" aliases="s" dataAlias="UpdateSnapshots" dataValue="0" description="Suppresses updating of dependencies with '+snapshot' versions." />
<modifier name="bypass-py-deps" dataAlias="BypassPyDeps" dataValue="1" description="Skip installing python dependencies" />

</command>

Expand Down

0 comments on commit 9889db6

Please sign in to comment.