auto-generate snapcraft.yml

closes #647
This commit is contained in:
Casper da Costa-Luis 2019-01-26 20:10:29 +00:00
parent 5fc9258dc2
commit ee66c04a24
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
3 changed files with 16 additions and 5 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
tqdm.egg-info
build/
dist/
snapcraft.yaml
# Unit test / coverage reports
.tox/

View File

@ -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

View File

@ -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