-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Sanji-IO/release/mxcloud-1.0
Release/mxcloud 1.0
- Loading branch information
Showing
26 changed files
with
2,188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# .coveragerc to control coverage.py | ||
[run] | ||
branch = True | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self\.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
ignore_errors = True | ||
|
||
[html] | ||
directory = coverage_html_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install -r tests/requirements.txt | ||
script: | ||
- make pylint | ||
- make test | ||
after_success: | ||
coveralls | ||
notifications: | ||
slack: | ||
rooms: | ||
- sys:yeTvjm0bw1tX6MBWrfkVL5RG#travis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
NAME = $(shell cat bundle.json | sed -n 's/"name"//p' | tr -d '", :') | ||
VERSION = $(shell cat bundle.json | sed -n 's/"version"//p' | tr -d '", :') | ||
|
||
PROJECT = sanji-bundle-$(NAME) | ||
|
||
DISTDIR = $(PROJECT)-$(VERSION) | ||
ARCHIVE = $(CURDIR)/$(DISTDIR).tar.gz | ||
|
||
SANJI_VER ?= 1.0 | ||
INSTALL_DIR = $(DESTDIR)/usr/lib/sanji-$(SANJI_VER)/$(NAME) | ||
STAGING_DIR = $(CURDIR)/staging | ||
PROJECT_STAGING_DIR = $(STAGING_DIR)/$(DISTDIR) | ||
|
||
TARGET_FILES = \ | ||
bundle.json \ | ||
requirements.txt \ | ||
route.py \ | ||
data/route.json.factory \ | ||
ip/__init__.py \ | ||
ip/addr.py \ | ||
ip/route.py | ||
DIST_FILES= \ | ||
$(TARGET_FILES) \ | ||
README.md \ | ||
Makefile \ | ||
tests/requirements.txt \ | ||
tests/test_route.py \ | ||
tests/data/route.json.factory \ | ||
tests/test_e2e/bundle.json \ | ||
tests/test_e2e/view_routes.py | ||
INSTALL_FILES=$(addprefix $(INSTALL_DIR)/,$(TARGET_FILES)) | ||
STAGING_FILES=$(addprefix $(PROJECT_STAGING_DIR)/,$(DIST_FILES)) | ||
|
||
|
||
all: | ||
|
||
clean: | ||
rm -rf $(DISTDIR)*.tar.gz $(STAGING_DIR) | ||
@rm -rf .coverage | ||
@find ./ -name *.pyc | xargs rm -rf | ||
|
||
distclean: clean | ||
|
||
pylint: | ||
flake8 -v --exclude=.git,__init__.py . | ||
test: | ||
nosetests --with-coverage --cover-erase --cover-package=$(NAME) -v | ||
|
||
dist: $(ARCHIVE) | ||
|
||
$(ARCHIVE): distclean $(STAGING_FILES) | ||
@mkdir -p $(STAGING_DIR) | ||
cd $(STAGING_DIR) && \ | ||
tar zcf $@ $(DISTDIR) | ||
|
||
$(PROJECT_STAGING_DIR)/%: % | ||
@mkdir -p $(dir $@) | ||
@cp -a $< $@ | ||
|
||
install: $(INSTALL_FILES) | ||
|
||
$(INSTALL_DIR)/%: % | ||
@mkdir -p $(dir $@) | ||
@cp -a $< $@ | ||
|
||
uninstall: | ||
-rm $(addprefix $(INSTALL_DIR)/,$(TARGET_FILES)) | ||
|
||
.PHONY: clean dist pylint test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
PROJ_DIR = $(abspath ..) | ||
|
||
NAME = $(shell cat $(PROJ_DIR)/bundle.json | sed -n 's/"name"//p' | tr -d '", :') | ||
VERSION = $(shell cat $(PROJ_DIR)/bundle.json | sed -n 's/"version"//p' | tr -d '", :') | ||
|
||
PROJECT = sanji-bundle-$(NAME) | ||
DEBVERSION = 1 | ||
DIST ?= unstable | ||
|
||
STAGING_DIR = $(abspath $(PROJECT)-$(VERSION)) | ||
UPSTREAM_ARCHIVE = $(PROJECT)-$(VERSION).tar.gz | ||
UPSTREAM_ORIG_ARCHIVE = $(PROJECT)_$(VERSION).orig.tar.gz | ||
|
||
FILES = \ | ||
$(STAGING_DIR)/debian/changelog \ | ||
$(STAGING_DIR)/debian/compat \ | ||
$(STAGING_DIR)/debian/control \ | ||
$(STAGING_DIR)/debian/copyright \ | ||
$(STAGING_DIR)/debian/docs \ | ||
$(STAGING_DIR)/debian/postinst \ | ||
$(STAGING_DIR)/debian/README \ | ||
$(STAGING_DIR)/debian/rules \ | ||
$(STAGING_DIR)/debian/source/format | ||
|
||
.PHONY: all build | ||
|
||
all: build | ||
|
||
build: extract-upstream $(FILES) | ||
cd $(STAGING_DIR) && \ | ||
dpkg-buildpackage -us -uc -rfakeroot | ||
|
||
$(STAGING_DIR)/debian/%: $(PROJ_DIR)/build-deb/debian/% | ||
mkdir -p $(dir $@) | ||
cp $< $@ | ||
|
||
extract-upstream: | ||
cp -a $(PROJ_DIR)/$(UPSTREAM_ARCHIVE) $(UPSTREAM_ORIG_ARCHIVE) | ||
tar zxf $(UPSTREAM_ORIG_ARCHIVE) | ||
|
||
changelog: | ||
dch -v $(VERSION)-$(DEBVERSION) -D $(DIST) -M -u low \ | ||
--release-heuristic log | ||
|
||
clean: | ||
rm -rf $(STAGING_DIR) $(PROJECT)-* $(PROJECT)_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The Debian Package route | ||
---------------------------- | ||
|
||
Comments regarding the Package | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Fri, 12 Jun 2015 16:48:57 +0800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
sanji-bundle-route (0.9.6-1) unstable; urgency=low | ||
|
||
* Add timeout to `grep` for preventing input without EOF. | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Thu, 05 Nov 2015 11:22:22 +0800 | ||
|
||
sanji-bundle-route (0.9.5-1) unstable; urgency=low | ||
|
||
* Bugfix: default gateway cannot be updated at some scenario. | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Fri, 23 Oct 2015 10:20:25 +0800 | ||
|
||
sanji-bundle-route (0.9.4-2) unstable; urgency=low | ||
|
||
* Update building policy for debian package. | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Fri, 12 Jun 2015 16:57:12 +0800 | ||
|
||
sanji-bundle-route (0.9.4-1) unstable; urgency=low | ||
|
||
* Use netifaces to speedup query time. | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Fri, 05 Jun 2015 18:32:58 +0800 | ||
|
||
sanji-bundle-route (0.9.0) unstable; urgency=low | ||
|
||
* Initial Release. | ||
|
||
-- Aeluin Chen <aeluin.chen@moxa.com> Fri, 05 Jun 2015 18:27:19 +0800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Source: sanji-bundle-route | ||
Priority: extra | ||
Maintainer: Aeluin Chen <aeluin.chen@moxa.com> | ||
Build-Depends: debhelper (>= 8.0.0) | ||
Build-Depends-Indep: python (>= 2.7) | ||
Standards-Version: 3.9.3 | ||
Section: libs | ||
Homepage: http://www.moxa.com | ||
#Vcs-Git: | ||
#Vcs-Browser: | ||
X-Python-Version: >= 2.5 | ||
|
||
Package: sanji-bundle-route | ||
Section: libs | ||
Architecture: all | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, python2.7, python-pip | ||
Description: Handle the routing table | ||
|
Oops, something went wrong.