Compare commits

..

2 Commits

3 changed files with 18 additions and 8 deletions

View File

@ -7,5 +7,8 @@ Class {
{ #category : #baseline }
BaselineOfExtEnvi >> baseline: spec [
<baseline>
^ spec for: #common do: [ spec package: 'ExtEnvi' ]
^ spec
for: #common
do: [ spec package: 'GToolkit-Utility-System'.
spec package: 'ExtEnvi' with: [ spec requires: #('GToolkit-Utility-System') ] ]
]

View File

@ -0,0 +1,6 @@
Extension { #name : #ByteString }
{ #category : #'*ExtEnvi' }
ByteString >> parsePipInstallStdout [
^ self lines collect: [ :line | line splitOn: ':' ]
]

View File

@ -57,18 +57,19 @@ PyEnv >> install: packageName [
{ #category : #accessing }
PyEnv >> install: aPackageName in: anEnvDirName [
| bins pip |
| bins pip stdout |
(envs includesKey: anEnvDirName)
ifFalse: [ InformDebugger inform: 'Env doesn''t exist'.
^ self ].
bins := (envs at: anEnvDirName) / 'bin'.
pip := (bins / 'pip') fullName.
^ GtSubprocessWithInMemoryOutput new
workingDirectory: workingDirectory;
command: pip;
arguments: #('install' 'instaloader');
runAndWait;
stdout
stdout := GtSubprocessWithInMemoryOutput new
workingDirectory: workingDirectory;
command: pip;
arguments: #('install' 'instaloader');
runAndWait;
stdout.
^ stdout parsePipInstallStdout
]
{ #category : #accessing }