Merge ~stub/juju-lint:packaging into juju-lint:master

Proposed by Stuart Bishop
Status: Merged
Approved by: Stuart Bishop
Approved revision: 3e8bc6ee1db9661fc3342836fd047fd683fec6e6
Merged at revision: db20d85a3cd826d13d725c35d23f6b96fb1348e6
Proposed branch: ~stub/juju-lint:packaging
Merge into: juju-lint:master
Diff against target: 164 lines (+98/-1)
9 files modified
.gitignore (+14/-0)
MANIFEST.in (+2/-0)
Makefile (+7/-0)
debian/changelog (+5/-0)
debian/compat (+1/-0)
debian/control (+22/-0)
debian/rules (+15/-0)
setup.py (+8/-1)
snap/snapcraft.yaml (+24/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Juju Lint maintainers Pending
Review via email: mp+350727@code.launchpad.net

Commit message

Deb and snap packaging

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM, thx

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision db20d85a3cd826d13d725c35d23f6b96fb1348e6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index 113edff..60a29ef 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,2 +1,16 @@
6+*~
7+
8+# distutils cruft
9 .tox/
10 juju_lint.egg-info/
11+dist/
12+
13+# debuild cruft
14+debian/files
15+
16+# snapcraft cruft
17+*.snap
18+parts/
19+prime/
20+snap/.snapcraft/
21+stage/
22diff --git a/MANIFEST.in b/MANIFEST.in
23new file mode 100644
24index 0000000..3bb71b3
25--- /dev/null
26+++ b/MANIFEST.in
27@@ -0,0 +1,2 @@
28+# Additional files to include in any distutils source packages.
29+include debian/changelog # required by setup.py
30diff --git a/Makefile b/Makefile
31index f504748..268e2a8 100644
32--- a/Makefile
33+++ b/Makefile
34@@ -1,2 +1,9 @@
35 lint:
36 tox -e lint
37+
38+dch:
39+ if ! which gbp > /dev/null; then sudo apt-get install -y git-buildpackage; fi
40+ gbp dch --debian-tag='%(version)s' -D xenial --git-log --first-parent
41+
42+deb-src:
43+ debuild -S -sa -I.git -I.tox
44diff --git a/debian/changelog b/debian/changelog
45new file mode 100644
46index 0000000..e62e8d6
47--- /dev/null
48+++ b/debian/changelog
49@@ -0,0 +1,5 @@
50+juju-lint (1.0.0.dev1) xenial; urgency=medium
51+
52+ * Initial release.
53+
54+ -- Stuart Bishop (Work) <stuart.bishop@canonical.com> Tue, 24 Jul 2018 17:36:40 +0700
55diff --git a/debian/compat b/debian/compat
56new file mode 100644
57index 0000000..7f8f011
58--- /dev/null
59+++ b/debian/compat
60@@ -0,0 +1 @@
61+7
62diff --git a/debian/control b/debian/control
63new file mode 100644
64index 0000000..d651d81
65--- /dev/null
66+++ b/debian/control
67@@ -0,0 +1,22 @@
68+Source: juju-lint
69+Section: admin
70+Priority: extra
71+Maintainer: Juju Linters <juju@lists.ubuntu.com>
72+Build-Depends:
73+ debhelper,
74+ python-all (>= 2.6.6-3~),
75+ python-setuptools,
76+ python-yaml,
77+ python3-all,
78+ python3-setuptools,
79+ python3-yaml
80+Standards-Version: 3.9.3
81+X-Python-Version: >= 3.4
82+
83+Package: juju-lint
84+Architecture: all
85+Depends:
86+ ${python3:Depends},
87+ ${misc:Depends},
88+ python3-yaml
89+Description: Linter for Juju models to compare deployments with configurable policy
90diff --git a/debian/rules b/debian/rules
91new file mode 100755
92index 0000000..43797a6
93--- /dev/null
94+++ b/debian/rules
95@@ -0,0 +1,15 @@
96+#!/usr/bin/make -f
97+# -*- makefile -*-
98+# Sample debian/rules that uses debhelper.
99+# This file was originally written by Joey Hess and Craig Small.
100+# As a special exception, when this file is copied by dh-make into a
101+# dh-make output file, you may use that output file without restriction.
102+# This special exception was added by Craig Small in version 0.37 of dh-make.
103+
104+# Uncomment this to turn on verbose mode.
105+#export DH_VERBOSE=1
106+
107+export PYBUILD_NAME=juju_lint
108+
109+%:
110+ dh $@ --with=python3 --without-python2 --buildsystem=pybuild
111diff --git a/setup.py b/setup.py
112index e44e64c..4079db3 100644
113--- a/setup.py
114+++ b/setup.py
115@@ -1,11 +1,18 @@
116+import re
117 import setuptools
118+import warnings
119+
120+warnings.simplefilter("ignore", UserWarning) # Older pips complain about newer options.
121
122 with open("README.md", "r") as fh:
123 long_description = fh.read()
124
125+with open("debian/changelog", "r") as fh:
126+ version = re.search(r'\((.*)\)', fh.readline()).group(1)
127+
128 setuptools.setup(
129 name="juju-lint",
130- version="1.0.0.dev1",
131+ version=version,
132 author="Canonical",
133 author_email="juju@lists.ubuntu.com",
134 description="Linter for Juju models to compare deployments with configurable policy",
135diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
136new file mode 100644
137index 0000000..7ea58c1
138--- /dev/null
139+++ b/snap/snapcraft.yaml
140@@ -0,0 +1,24 @@
141+name: juju-lint
142+version: auto
143+summary: Linter for Juju models to compare deployments with configurable policy
144+description: Linter for Juju models to compare deployments with configurable policy
145+grade: stable
146+confinement: classic
147+version-script: |
148+ echo `python3 setup.py -V`-`git describe --dirty --always --tags | sed -r 's/v(.*)/\1/g'`
149+apps:
150+ juju-lint:
151+ command: usr/bin/python3 $SNAP/bin/juju-lint
152+ environment:
153+ PATH: "/snap/juju-lint/current/bin:/snap/juju-lint/current/usr/bin:/bin:/usr/bin:"
154+parts:
155+ juju-lint:
156+ plugin: python
157+ python-version: python3
158+ python-packages:
159+ - 3rdparty/attrs-18.1.0.tar.gz
160+ stage-packages:
161+ - libc6
162+ - python3-yaml
163+ source: .
164+ source-type: git

Subscribers

People subscribed via source and target branches