linode-cli
linode-cli copied to clipboard
`make build` fails: cp: cannot stat 'data-2': No such file or directory
On the current master (b49c6302d836d8e64ba0605e8cd7c88cd8eb1969) 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
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).
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?
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.
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
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.
Closing this issue as Python 2 support has been dropped in v5.25.0
.