-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsnapcraft.yaml
More file actions
67 lines (60 loc) · 1.99 KB
/
snapcraft.yaml
File metadata and controls
67 lines (60 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: tempren
title: tempren
summary: Template-based file renaming utility
base: core24
adopt-info: tempren
source-code: https://github.com/idle-code/tempren.git
description: |
tempren is a powerful file renaming utility that uses flexible template expressions to generate names for your files.
Tag templates can modify original filename, extract metadata from the files or anything in between.
A rich library of built-in tags helps with working with many common file types out-of-the-box.
grade: stable
confinement: strict
platforms:
amd64:
arm64:
build-on: [amd64, arm64]
build-for: [arm64]
parts:
poetry:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
curl https://install.python-poetry.org > install-poetry.py
export POETRY_HOME=/opt/poetry
python3 install-poetry.py --version 1.8.3
#$POETRY_HOME/bin/poetry --version
#export TEMPREN_VERSION="$($POETRY_HOME/bin/poetry version --short)"
#echo $TEMPREN_VERSION | tee /tmp/tempren_version
tempren:
after: [poetry]
plugin: python
source: .
build-environment:
- PATH: "/opt/poetry/bin:$PATH"
build-packages:
- python3-pip
override-pull: |
snapcraftctl pull
# Find out program version
export TEMPREN_VERSION="$(poetry version --short)"
snapcraftctl set-version $TEMPREN_VERSION
# Prepare requirements.txt to install tempren from the PyPi
# This is required as default build algorithm doesn't correctly
# export scripts declared in pyproject.toml
poetry export --extras=video --output=requirements.txt
python3 -m pip download "tempren[video]==$TEMPREN_VERSION"
export TEMPREN_HASH=$(python3 -m pip hash tempren*.whl | tail -1)
echo "tempren==$TEMPREN_VERSION $TEMPREN_HASH" >> requirements.txt
# requirements: [requirements.txt]
stage-packages:
- libmagic1
- libmediainfo0v5
apps:
tempren:
command: bin/tempren
plugs:
- home
- removable-media