Skip to content
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

`make build` fails: cp: cannot stat 'data-2': No such file or directory #78

Open
themightychris opened this issue Dec 6, 2018 · 5 comments

Comments

@themightychris
Copy link

commented Dec 6, 2018

On the current master (b49c630) I get this on make build:

rm -f linodecli/data-*                                                                                                                                       
rm -f linode-cli.sh                                                                                                                                          
rm -f dist/*                                                                                                                                                 
python -m linodecli bake https://developers.linode.com/api/v4/openapi.yaml --skip-config                                                                     
No spec baked.  Please bake by calling this script as follows:                                                                                               
  python3 gen_cli.py bake /path/to/spec                                                                                                                      
Baking...                                                                                                                                                    
Warning: Resolved empty node for {'type': 'object'} in [{'$ref': '#/components/schemas/IPAddress'}, {'type': 'object'}]                                      
Baking bash completions...                                                                                                                                   
Writing file...                                                                                                                                              
Done.                                                                                                                                                        
python3 -m linodecli bake https://developers.linode.com/api/v4/openapi.yaml --skip-config                                                                    
No spec baked.  Please bake by calling this script as follows:                                                                                               
  python3 gen_cli.py bake /path/to/spec                                                                                                                      
Baking...                                                                                                                                                    
Warning: Resolved empty node for {'type': 'object'} in [{'$ref': '#/components/schemas/IPAddress'}, {'type': 'object'}]                                      
Baking bash completions...                                                                                                                                   
Writing file...                                                                                                                                              
Done.                                                                                                                                                        
cp data-2 linodecli/                                                                                                                                         
cp: cannot stat 'data-2': No such file or directory                                                                                                          
make: *** [Makefile:23: build] Error 1    

asciicast

@Dorthu

This comment has been minimized.

Copy link
Member

commented Dec 7, 2018

The build process requires both python2 and python3, and expects python to be python2. I've seen this error before if python --version returns 3.x. Try modifying this line of the Makefile to say python2 instead of python - although I'm hesitant to commit this change because many systems don't have a python2 by default (ideally the Makefile will detect what pythons are available and give reasonable errors if it can't build).

@themightychris

This comment has been minimized.

Copy link
Author

commented Dec 7, 2018

What if it sniffed the versions of python, python2, and python3 and then set $PYTHON2 and $PYTHON3 for use in the rest of the Makefile?

@Dorthu

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

yeah, I think that's what needs to happen. @asauber also encountered this when attempting to build with python pointed to python3 - I'm going to get on this shortly.

@themightychris

This comment has been minimized.

Copy link
Author

commented Dec 11, 2018

FYI, I wrote a habitat plan to work me around this: https://bldr.habitat.sh/#/pkgs/jarvus/linode-cli/latest

So on any Linux box now you can run:

# install hab CLI
curl -s https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash

# install linode-cli and binlink it
hab pkg install -b jarvus/linode-cli

# profit!
linode-cli k8s-alpha create 

python, kubectl, and terraform binaries all get pulled and put into env by habitat

@asauber

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

I had a copy of the Makefile that removed all ambiguity, but it got lost in my stash. I'll add a to-do item for myself to put up a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.