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

Subscribers

People subscribed via source and target branches

to all changes: