Skip to content

Slim functionality failing on Windows #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sweepy84 opened this issue Jun 28, 2018 · 7 comments · Fixed by #227
Closed

Slim functionality failing on Windows #212

sweepy84 opened this issue Jun 28, 2018 · 7 comments · Fixed by #227

Comments

@sweepy84
Copy link

Slim functionality not working at all on windows.
Still getting test folders >> https://snag.gy/g5SelK.jpg

Using the following options:

custom:
    pythonRequirements:
      slim: true
      slimPatterns:
        - "*test*"
        - "*.exe"
      pythonBin: python
      dockerizePip: true

Issue has been noted here by @dee-me-tree-or-love

@sweepy84
Copy link
Author

@dschep @dee-me-tree-or-love - Any updates on this?

@dschep
Copy link
Contributor

dschep commented Jul 30, 2018

Huh.. I thought it was supposed to work with docker @dee-me-tree-or-love ?

@sweepy84
Copy link
Author

sweepy84 commented Aug 3, 2018

@dschep Nope - as per comments in #191 completely busted for windows

@dee-me-tree-or-love
Copy link
Contributor

dee-me-tree-or-love commented Aug 23, 2018

Hey everyone, huge apologies, I have been totally out for the past months of the summer...

Now I finally got back to look into the problem and have noticed something interesting.
I am currently using the "serverless-python-requirements": "^4.1.1" version.
I have removed the windows check at slim.js :: L15

While trying out to deploy I have noticed that when run with slim: true and dockerizePip: true on Windows 10 (will yet try it out on a Linux later) I have also received the error:

find: missing argument to `-exec'

Then, when reviewing the console commands for package removal noticed that
changing `&& find ${folderPath} -name "*.so" -exec strip {} \\;`,
to `&& find ${folderPath} -name "*.so" -exec strip {} ;`
at slim.js :: L38 solves the issue 🤔.

So I have tried to escape the semicolon using the backslashes, which appaaaarently might not be necessary... Not sure if that was the whole deal, but could someone try it out too maybe? 😅

Sorry again for not keeping up for so long...
Node version: v8.11.1
Serverless version: 1.27.3
My serverless.yml

plugins:
  - serverless-python-requirements
  
custom:
  pythonRequirements:
    dockerizePip: non-linux
    # zip: true
    slim: true

@sweepy84 @dschep

@dschep
Copy link
Contributor

dschep commented Aug 23, 2018

@dee-me-tree-or-love, check out #227

@dee-me-tree-or-love
Copy link
Contributor

@dschep oh cool, on it!

@sweepy84
Copy link
Author

It works!!! good job @dee-me-tree-or-love !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants