Compare commits
2 Commits
dafde6dda2
...
cb3fd1de1a
Author | SHA1 | Date | |
---|---|---|---|
cb3fd1de1a | |||
e4225d0bb1 |
@ -7,5 +7,8 @@ Class {
|
|||||||
{ #category : #baseline }
|
{ #category : #baseline }
|
||||||
BaselineOfExtEnvi >> baseline: spec [
|
BaselineOfExtEnvi >> baseline: spec [
|
||||||
<baseline>
|
<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') ] ]
|
||||||
]
|
]
|
||||||
|
6
src/ExtEnvi/ByteString.extension.st
Normal file
6
src/ExtEnvi/ByteString.extension.st
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Extension { #name : #ByteString }
|
||||||
|
|
||||||
|
{ #category : #'*ExtEnvi' }
|
||||||
|
ByteString >> parsePipInstallStdout [
|
||||||
|
^ self lines collect: [ :line | line splitOn: ':' ]
|
||||||
|
]
|
@ -57,18 +57,19 @@ PyEnv >> install: packageName [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
PyEnv >> install: aPackageName in: anEnvDirName [
|
PyEnv >> install: aPackageName in: anEnvDirName [
|
||||||
| bins pip |
|
| bins pip stdout |
|
||||||
(envs includesKey: anEnvDirName)
|
(envs includesKey: anEnvDirName)
|
||||||
ifFalse: [ InformDebugger inform: 'Env doesn''t exist'.
|
ifFalse: [ InformDebugger inform: 'Env doesn''t exist'.
|
||||||
^ self ].
|
^ self ].
|
||||||
bins := (envs at: anEnvDirName) / 'bin'.
|
bins := (envs at: anEnvDirName) / 'bin'.
|
||||||
pip := (bins / 'pip') fullName.
|
pip := (bins / 'pip') fullName.
|
||||||
^ GtSubprocessWithInMemoryOutput new
|
stdout := GtSubprocessWithInMemoryOutput new
|
||||||
workingDirectory: workingDirectory;
|
workingDirectory: workingDirectory;
|
||||||
command: pip;
|
command: pip;
|
||||||
arguments: #('install' 'instaloader');
|
arguments: #('install' 'instaloader');
|
||||||
runAndWait;
|
runAndWait;
|
||||||
stdout
|
stdout.
|
||||||
|
^ stdout parsePipInstallStdout
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user