Merge ~barryprice/spade/+git/spade:snapcraft into spade:master

Proposed by Barry Price
Status: Needs review
Proposed branch: ~barryprice/spade/+git/spade:snapcraft
Merge into: spade:master
Prerequisite: ~barryprice/spade/+git/spade:black
Diff against target: 70 lines (+13/-5)
4 files modified
.gitignore (+1/-0)
Makefile (+2/-3)
setup.py (+1/-0)
snap/snapcraft.yaml (+9/-2)
Reviewer Review Type Date Requested Status
Spade Developers Pending
Review via email: mp+394574@code.launchpad.net

This proposal supersedes a proposal from 2020-11-27.

Commit message

Snapcraft fixes for core20

To post a comment you must log in.

Unmerged commits

ef1426b... by Barry Price

Merge branch 'black' into snapcraft

fae038f... by Barry Price

Snapcraft fixes, and ignore built snap files

1734965... by Barry Price

Merge branch 'flake8' into black

6817bc5... by Barry Price

Merge branch 'master' into flake8

c85283a... by Barry Price

Typo

a86afa5... by Barry Price

Reformatted with black

aa2d273... by Barry Price

Address all Flake8 errors bar complexity (noqa: C901)

7e34f18... by Barry Price

Modernise, switch to python3 exclusively

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2new file mode 100644
3index 0000000..9d17685
4--- /dev/null
5+++ b/.gitignore
6@@ -0,0 +1 @@
7+spade_*.snap
8diff --git a/Makefile b/Makefile
9index ceb744e..0efca2a 100644
10--- a/Makefile
11+++ b/Makefile
12@@ -1,5 +1,4 @@
13-version := $(shell python3 -c "from spade import __version__; print(__version__)")
14-tempfiles_snap := snap/snapcraft.yaml spade*.snap
15+tempfiles_snap := snap/.snapcraft spade_*.snap parts/ prime/ stage/
16
17 blacken:
18 @echo "Normalising python layout with black"
19@@ -14,7 +13,7 @@ clean:
20 @git clean -fXd
21
22 snap: snap_clean
23- sed -e "s/{{VERSION}}/$(version)/" snapcraft.yaml.in > snap/snapcraft.yaml
24+ @export SNAPCRAFT_BUILD_ENVIRONMENT=multipass
25 snapcraft
26
27 snap_clean:
28diff --git a/setup.py b/setup.py
29index 7286fa2..efd69bd 100644
30--- a/setup.py
31+++ b/setup.py
32@@ -27,6 +27,7 @@ setup(
33 author_email="chris.stratford@canonical.com",
34 license='LICENSE',
35 packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
36+ setup_requires=['wheel'],
37 install_requires=[
38 "python-swiftclient",
39 "python-keystoneclient",
40diff --git a/snapcraft.yaml.in b/snap/snapcraft.yaml
41similarity index 74%
42rename from snapcraft.yaml.in
43rename to snap/snapcraft.yaml
44index 9f56fb4..8c9a196 100644
45--- a/snapcraft.yaml.in
46+++ b/snap/snapcraft.yaml
47@@ -1,5 +1,6 @@
48 name: spade
49-version: 1.0
50+version: '1.0'
51+base: core20
52 summary: A tool for managing buckets in the cloud
53 description: A tool to simplify accessing objects in cloud storage
54 buckets (Amazon S3, Azure blobstore, Google cloud storage,
55@@ -11,8 +12,14 @@ grade: stable
56 apps:
57 spade:
58 command: bin/spade
59+ environment:
60+ PATH: ${SNAP}/bin:${PATH}
61+ PYTHONPATH: ${SNAP}/lib/python3
62 parts:
63 spade:
64 plugin: python
65- python-version: python3
66 source: .
67+ build-environment:
68+ - PYTHONPATH: "$SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages"
69+ stage-packages:
70+ - python3-wheel

Subscribers

People subscribed via source and target branches

to all changes: