Merge ~xavpaice/layer-snap:setup into ~stub/layer-snap:master

Proposed by Xav Paice
Status: Merged
Merged at revision: 04bc8808e7ef6cf5b233d6ebf49b3839c90d8708
Proposed branch: ~xavpaice/layer-snap:setup
Merge into: ~stub/layer-snap:master
Diff against target: 38 lines (+27/-0)
2 files modified
lib/charms/layer/__init__.py (+0/-0)
setup.py (+27/-0)
Reviewer Review Type Date Requested Status
Stuart Bishop Approve
Review via email: mp+397060@code.launchpad.net

Commit message

Add a setup.py to help testing infrastructure install dependencies

While not useful for general packaging of a Charm layer, a setup.py
file does allow the layer's branch to be referenced directly
in a requires.txt file using a syntax like:

-e git+https://git.launchpad.net/layer-snap#egg=charms.layer

To post a comment you must log in.
Revision history for this message
Xav Paice (xavpaice) wrote :

A large number of the LMA charms currently include in the requirements.txt file a line:

-e git+https://git.launchpad.net/~jjo/layer-snap@cab2b604695f39a81abe47b22b8426e44e66df8f#egg=charms.layer

We would like to be using currently maintained code.

Revision history for this message
Stuart Bishop (stub) wrote :

Seems sane

review: Approve
Revision history for this message
Stuart Bishop (stub) wrote :

However, won't this approach fail badly if more than one layer is using the trick?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/charms/layer/__init__.py b/lib/charms/layer/__init__.py
0new file mode 1006440new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/charms/layer/__init__.py
diff --git a/setup.py b/setup.py
1new file mode 1007551new file mode 100755
index 0000000..cda60d7
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,27 @@
1#!/usr/bin/env python
2
3import os
4from setuptools import setup
5
6here = os.path.abspath(os.path.dirname(__file__))
7
8with open(os.path.join(here, 'README.md')) as f:
9 README = f.read()
10
11setup(name='layer_snap',
12 version='1.0.0',
13 description='layer_snap',
14 long_description=README,
15 license='Apache License 2.0',
16 classifiers=[
17 "Development Status :: 5 - Production/Stable",
18 "Intended Audience :: Developers",
19 "Programming Language :: Python :: 3",
20 ],
21 url='https://git.launchpad.net/layer-snap',
22 package_dir={'': 'lib'},
23 packages=['charms/layer'],
24 include_package_data=True,
25 zip_safe=False,
26 install_requires=['charmhelpers', 'charms.reactive']
27 )

Subscribers

People subscribed via source and target branches

to all changes: