[solved] Snapping Python CLI app fails, help wanted

name: getenv
version: '0.1'
summary: Keep track of your .env files
description: |
    usage: getenv [-h] [-c] [-o <project_name>] [-s <source_dir>]

    Copies .env files from "<source_dir>/<current_dir_name>" to current dir.

    optional arguments:
      -h, --help            show this help message and exit
      -c, --copy            Copy .env to <source_dir>/<current_dir_name>
      -o <project_name>, --override <project_name>
                            Override <current_dir_name>.
      -s <source_dir>, --source <source_dir>
                            Permanantly change source dir
grade: stable
confinement: devmode

    command: getenv

    source: https://github.com/izznogooood/getenv.git
    source-tag: master
    plugin: python

I am trying to snap a simple CLI script but I ran in to an issue. I get this error:

Priming getenv 
Failed to generate snap metadata: The specified command 'getenv' defined in the app 'getenv' does not exist or is not executable.
Ensure that 'getenv' is relative to the prime directory.
Error: not found
Stopping local:snapcraft-indulgently-unaccusable-alyvia
An error occurred when trying to copy files using 'lxd': returned exit code 1.

Now, my program is basically identical (in setup) to the snapcraft python example. When running python setpup.py install you get two files installed:


And the program works as expected. Can anyone shed some light on why it does not recognize the executable setuptools provides?

Source: https://github.com/izznogooood/getenv

Thanks to @popey, adding Base: 18, and avoiding cleanbuild solved this.