Skip to content

Commit 917d4ce

Browse files
committed
Merge branch 'master' of github.com:ubaniabalogun/serverless-package-python-functions into fix-docker-requirements
# Conflicts: # index.js
2 parents 89fd1cb + b4f9b03 commit 917d4ce

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717

1818

1919
### Removed
20+
21+
22+
## [0.2.4] - 2017-10-24
23+
### Added
24+
- Normalized path for building on windows courtesy @wsteimel77

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const Fse = require('fs-extra');
66
const Path = require('path');
77
const ChildProcess = require('child_process');
88
const zipper = require('zip-local');
9+
const upath = require('upath');
910

1011
BbPromise.promisifyAll(Fse);
1112

@@ -75,14 +76,15 @@ class PkgPyFuncs {
7576
}
7677

7778
let cmd = 'pip'
79+
let args = ['install','--upgrade','-t', upath.normalize(buildPath), '-r']
7880
if ( this.useDocker === true ){
7981
cmd = 'docker'
80-
args = ['exec',this.containerName, 'pip', ...args]
82+
args = ['exec', this.containerName, 'pip', ...args]
8183
requirementsPath = `${this.dockerServicePath}/${requirementsPath}`
8284
}
8385

84-
args = [...args, requirementsPath]
85-
return this.runProcess(cmd,args)
86+
args = [...args, upath.normalize(requirementsPath)]
87+
return this.runProcess(cmd, args)
8688
}
8789

8890
checkDocker(){

package-lock.json

Lines changed: 22 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-package-python-functions",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"description": "Serverless Framework plugin to package python functions and their requirements",
55
"main": "index.js",
66
"scripts": {},
@@ -10,6 +10,7 @@
1010
"bluebird": "^3.5.0",
1111
"fs-extra": "^3.0.0",
1212
"lodash": "^4.17.4",
13+
"upath": "^1.0.0",
1314
"zip-local": "^0.3.4"
1415
},
1516
"repository": {

0 commit comments

Comments
 (0)