diff --git a/.gitignore b/.gitignore index 6ce27898..cd6c1068 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ tqdm.egg-info build/ dist/ +snapcraft.yaml # Unit test / coverage reports .tox/ diff --git a/snapcraft.yaml b/.snapcraft.yml similarity index 58% rename from snapcraft.yaml rename to .snapcraft.yml index 49671446..07de7095 100644 --- a/snapcraft.yaml +++ b/.snapcraft.yml @@ -1,17 +1,17 @@ name: tqdm -version: '1.0' +version: '{version}' summary: A fast, extensible progress bar for Python and CLI description: | - A fast, extensible progress bar for Python and CLI + {description} grade: stable confinement: strict base: core18 -icon: tqdm-logo.png +icon: {icon} parts: tqdm: plugin: python - python-version: python2 - source: https://github.com/tqdm/tqdm.git + python-version: python3 + source: {source} apps: tqdm: command: bin/tqdm diff --git a/Makefile b/Makefile index 98b979a2..3ab2ad60 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ build buildupload pypi + snap help none @@ -92,6 +93,11 @@ tqdm/tqdm.1: .tqdm.1.md README.rst: .readme.rst tqdm/_tqdm.py tqdm/_main.py @python mkdocs.py +snapcraft.yaml: .snapcraft.yml + cat "$<" | sed -e 's/{version}/'`python -m tqdm --version`'/g' \ + -e 's/{source}/./g' -e 's/{icon}/logo.png/g' \ + -e 's/{description}/https:\/\/tqdm.github.io/g' > "$@" + distclean: @+make coverclean @+make prebuildclean @@ -138,5 +144,9 @@ buildupload: @make build @make pypi +snap: + @make snapcraft.yaml + snapcraft + none: # used for unit testing