Browse Source

fix debian build/packaging

Ticket: CM-XXX
Reviewed By: None
Testing Done: sbuild
changes/46/506146/1
kanna 2 years ago
parent
commit
8f7b933c0c

cumulus-ml2/mech_driver/__init__.py → README.md View File


BIN
cumulus-ml2/mech_driver/.driver.py.swp View File


+ 0
- 0
cumulus_ml2/mech_driver/__init__.py View File


cumulus-ml2/mech_driver/config.py → cumulus_ml2/mech_driver/config.py View File


cumulus-ml2/mech_driver/driver.py → cumulus_ml2/mech_driver/driver.py View File


cumulus-ml2/mech_driver/hpb_bridge_agent.py → cumulus_ml2/mech_driver/hpb_bridge_agent.py View File


cumulus-ml2/utils/.discovery.py.swp → cumulus_ml2/utils/.discovery.py.swp View File


cumulus-ml2/utils/discovery.py → cumulus_ml2/utils/discovery.py View File


cumulus-ml2/utils/misc.py → cumulus_ml2/utils/misc.py View File


+ 7
- 4
debian/control View File

@@ -1,14 +1,17 @@
1 1
 Source: cumulus-ml2
2
-Section: python
2
+Section: net
3 3
 Priority: extra
4 4
 Maintainer: dev-support <dev-support@cumulusnetworks.com>
5
-Build-Depends: debhelper (>= 8.0.0), python-setuptools(>= 0.7), python-dev
5
+Build-Depends:
6
+	debhelper (>= 7.0.0),
7
+	python-all (>= 2.6.6-3),
8
+	python-setuptools
6 9
 Standards-Version: 3.9.3
7
-Homepage: http://github.com/CumulusNetworks/altocumulus
10
+X-Python-Version: >= 2.7
8 11
 #Vcs-Git: git://git.debian.org/collab-maint/cumulus-ml2.git
9 12
 #Vcs-Browser: http://git.debian.org/?p=collab-maint/cumulus-ml2.git;a=summary
10 13
 
11
-Package: cumulus-ml2-driver
14
+Package: cumulus-ml2
12 15
 Architecture: all
13 16
 Depends: ${python:Depends}, ${misc:Depends}
14 17
 Description: Mechanism ML2 Driver for Cumulus ML2 Plugin

+ 0
- 1
debian/docs View File

@@ -1,2 +1 @@
1 1
 README.md
2
-requirements.txt

+ 30
- 1
debian/rules View File

@@ -12,5 +12,34 @@ PYTHONS:=$(shell pyversions -r)
12 12
 # Uncomment this to turn on verbose mode.
13 13
 #export DH_VERBOSE=1
14 14
 
15
+# We assume that the build machine is running the same environment as the
16
+# target system.
17
+ifeq ($(shell command -v systemctl > /dev/null && echo 1), 1)
18
+	HELPERS = python2,systemd
19
+else
20
+	HELPERS = python2
21
+endif
22
+
15 23
 %:
16
-	dh $@ --with python2
24
+	dh $@ --buildsystem=python_distutils --with $(HELPERS)
25
+
26
+override_dh_auto_install:
27
+	set -e && for pyvers in $(shell pyversions -r); do \
28
+		$$pyvers setup.py install --install-layout=deb \
29
+		--root $(CURDIR)/debian/cumulus-ml2; \
30
+	done
31
+
32
+override_dh_clean:
33
+	dh_clean -O--buildsystem=python_distutils
34
+	rm -rf build __pycache__
35
+	rm -rf *.egg-info
36
+
37
+override_dh_installinit:
38
+	dh_installinit --name=cumulus-ml2
39
+
40
+override_dh_systemd_enable:
41
+	dh_systemd_enable --no-enable --name=cumulus-ml2
42
+
43
+override_dh_systemd_start:
44
+	dh_systemd_start --no-start --name=cumulus-ml2
45
+

+ 2
- 2
setup.cfg View File

@@ -8,11 +8,11 @@ description-file =
8 8
 packages =
9 9
 	cumulus-ml2
10 10
 data_files =
11
-  /etc/cumulus-ml2 = etc/cumulus-ml2/config.yaml
11
+  /etc/cumulus-ml2 = etc/cumulus/config.yaml
12 12
 
13 13
 [entry_points]
14 14
 neutron.ml2.mechanism_drivers =
15
-	cumulus = cumulus-ml2.mech-driver.driver:CumulusMechanismDriver
15
+	cumulus = cumulus_ml2.mech_driver.driver:CumulusMechanismDriver
16 16
 
17 17
 [global]
18 18
 setup-hooks =

Loading…
Cancel
Save