@@ -45,7 +45,7 @@ function installRequirementsFile(requirementsPath, targetFile, serverless, servi
45
45
* @param {Object } options
46
46
* @return {undefined }
47
47
*/
48
- function installRequirements ( targetFolder , servicePath , serverless , options ) {
48
+ function installRequirements ( targetFolder , serverless , options ) {
49
49
const targetRequirementsTxt = path . join ( targetFolder , 'requirements.txt' ) ;
50
50
51
51
serverless . cli . log ( `Installing requirements from ${ targetRequirementsTxt } ...` ) ;
@@ -56,13 +56,13 @@ function installRequirements(targetFolder, servicePath, serverless, options) {
56
56
options . pythonBin , '-m' , 'pip' , '--isolated' , 'install' ,
57
57
...options . pipCmdExtraArgs ,
58
58
] ;
59
-
59
+
60
60
// If we're not dockerizing pip
61
61
if ( ! options . dockerizePip ) {
62
62
// Push our local OS-specific paths for requirements and target directory
63
63
pipCmd . push ( '-t' , targetFolder ) ;
64
64
pipCmd . push ( '-r' , targetRequirementsTxt ) ;
65
-
65
+
66
66
// If we want a download cache...
67
67
if ( options . useDownloadCache ) {
68
68
const downloadCacheDir = path . join ( getUserCachePath ( options ) , 'downloadCache_slspyc' ) ;
@@ -100,11 +100,11 @@ function installRequirements(targetFolder, servicePath, serverless, options) {
100
100
dockerImage = options . dockerImage ;
101
101
}
102
102
serverless . cli . log ( `Docker Image: ${ dockerImage } ` ) ;
103
-
103
+
104
104
// Push docker-specific paths for requirements and target directory
105
105
pipCmd . push ( '-t' , '/var/task/' ) ;
106
106
pipCmd . push ( '-r' , '/var/task/requirements.txt' ) ;
107
-
107
+
108
108
// Prepare bind path depending on os platform
109
109
const bindPath = getBindPath ( targetFolder ) ;
110
110
@@ -148,13 +148,7 @@ function installRequirements(targetFolder, servicePath, serverless, options) {
148
148
cmd = pipCmd [ 0 ] ;
149
149
cmdOptions = pipCmd . slice ( 1 ) ;
150
150
}
151
- serverless . cli . log ( `Trying to run command...` ) ;
152
- console . log ( cmd )
153
- console . log ( cmdOptions )
154
151
const res = spawnSync ( cmd , cmdOptions , { cwd : targetFolder , shell : true } ) ;
155
- serverless . cli . log ( `Ran command` ) ;
156
- serverless . cli . log ( res )
157
-
158
152
if ( res . error ) {
159
153
if ( res . error . code === 'ENOENT' ) {
160
154
if ( options . dockerizePip ) {
@@ -281,7 +275,6 @@ function installRequirementsIfNeeded(servicePath, modulePath, options, serverles
281
275
// Then install our requirements from this folder
282
276
installRequirements (
283
277
workingReqsFolder ,
284
- servicePath ,
285
278
serverless ,
286
279
options
287
280
) ;
0 commit comments