File tree 3 files changed +5
-2
lines changed 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class ServerlessPythonRequirements {
25
25
cleanupZipHelper : true ,
26
26
invalidateCaches : false ,
27
27
fileName : 'requirements.txt' ,
28
+ usePipenv : true ,
28
29
pythonBin : this . serverless . service . provider . runtime ,
29
30
dockerImage : `lambci/lambda:build-${ this . serverless . service . provider . runtime } ` ,
30
31
pipCmdExtraArgs : [ ] ,
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ const {spawnSync} = require('child_process');
8
8
*/
9
9
function installRequirements ( ) {
10
10
let fileName = this . options . fileName ;
11
- if ( fse . existsSync ( path . join ( this . servicePath , 'Pipfile' ) ) ) {
11
+ let usePipenv = this . options . usePipenv ;
12
+ if ( usePipenv && fse . existsSync ( path . join ( this . servicePath , 'Pipfile' ) ) ) {
12
13
fileName = '.serverless/requirements.txt' ;
13
14
}
14
15
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ const {spawnSync} = require('child_process');
7
7
* @return {Promise }
8
8
*/
9
9
function pipfileToRequirements ( ) {
10
- if ( ! fse . existsSync ( path . join ( this . servicePath , 'Pipfile' ) ) )
10
+ let usePipenv = this . options . usePipenv ;
11
+ if ( ! usePipenv || ! fse . existsSync ( path . join ( this . servicePath , 'Pipfile' ) ) )
11
12
return ;
12
13
13
14
this . serverless . cli . log ( 'Generating requirements.txt from Pipfile...' ) ;
You can’t perform that action at this time.
0 commit comments