File tree 4 files changed +27
-292
lines changed
4 files changed +27
-292
lines changed Original file line number Diff line number Diff line change 48
48
run : python -m pip install --force setuptools wheel
49
49
50
50
- name : Install pipenv / poetry
51
- run : python -m pip install pipenv==2022.9.24 poetry
51
+ run : python -m pip install pipenv poetry
52
52
53
53
- name : Install serverless
54
54
run : npm install -g serverless@${{ matrix.sls-version }}
99
99
run : python -m pip install --force setuptools wheel
100
100
101
101
- name : Install pipenv / poetry
102
- run : python -m pip install pipenv==2022.9.24 poetry
102
+ run : python -m pip install pipenv poetry
103
103
104
104
- name : Install serverless
105
105
run : npm install -g serverless@${{ matrix.sls-version }}
@@ -147,7 +147,7 @@ jobs:
147
147
run : python -m pip install --force setuptools wheel
148
148
149
149
- name : Install pipenv / poetry
150
- run : python -m pip install pipenv==2022.9.24 poetry
150
+ run : python -m pip install pipenv poetry
151
151
152
152
- name : Install serverless
153
153
run : npm install -g serverless@${{ matrix.sls-version }}
Original file line number Diff line number Diff line change 61
61
run : python -m pip install --force setuptools wheel
62
62
63
63
- name : Install pipenv / poetry
64
- run : python -m pip install pipenv==2022.9.24 poetry
64
+ run : python -m pip install pipenv poetry
65
65
66
66
- name : Install serverless
67
67
run : npm install -g serverless@${{ matrix.sls-version }}
@@ -128,7 +128,7 @@ jobs:
128
128
run : python -m pip install --force setuptools wheel
129
129
130
130
- name : Install pipenv / poetry
131
- run : python -m pip install pipenv==2022.9.24 poetry
131
+ run : python -m pip install pipenv poetry
132
132
133
133
- name : Install serverless
134
134
run : npm install -g serverless@${{ matrix.sls-version }}
@@ -181,7 +181,7 @@ jobs:
181
181
run : python -m pip install --force setuptools wheel
182
182
183
183
- name : Install pipenv / poetry
184
- run : python -m pip install pipenv==2022.9.24 poetry
184
+ run : python -m pip install pipenv poetry
185
185
186
186
- name : Install serverless
187
187
run : npm install -g serverless@${{ matrix.sls-version }}
Original file line number Diff line number Diff line change @@ -28,15 +28,26 @@ async function pipfileToRequirements() {
28
28
}
29
29
30
30
try {
31
- let res ;
32
31
try {
33
- res = await spawn ( 'pipenv' , [ 'lock' , '--keep-outdated' ] , {
34
- cwd : this . servicePath ,
35
- } ) ;
36
- res = await spawn ( 'pipenv' , [ 'requirements' , '--hash' ] , {
32
+ await spawn ( 'pipenv' , [ 'lock' , '--keep-outdated' ] , {
37
33
cwd : this . servicePath ,
38
34
} ) ;
39
35
} catch ( e ) {
36
+ if (
37
+ e . stderrBuffer &&
38
+ e . stderrBuffer . toString ( ) . includes ( 'must exist to use' )
39
+ ) {
40
+ // No previous Pipfile.lock, we will try to generate it here
41
+ try {
42
+ await spawn ( 'pipenv' , [ 'lock' ] , {
43
+ cwd : this . servicePath ,
44
+ } ) ;
45
+ } catch ( e ) {
46
+ console . log ( 'weird' , e . stderrBuffer . toString ( ) ) ;
47
+ throw e ;
48
+ }
49
+ }
50
+
40
51
if (
41
52
e . stderrBuffer &&
42
53
e . stderrBuffer . toString ( ) . includes ( 'command not found' )
@@ -46,8 +57,13 @@ async function pipfileToRequirements() {
46
57
'PYTHON_REQUIREMENTS_PIPENV_NOT_FOUND'
47
58
) ;
48
59
}
60
+
49
61
throw e ;
50
62
}
63
+ const res = await spawn ( 'pipenv' , [ 'requirements' ] , {
64
+ cwd : this . servicePath ,
65
+ } ) ;
66
+
51
67
fse . ensureDirSync ( path . join ( this . servicePath , '.serverless' ) ) ;
52
68
fse . writeFileSync (
53
69
path . join ( this . servicePath , '.serverless/requirements.txt' ) ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments