add pip package 57/37757/1
authorWuKong <rebirthmonkey@gmail.com>
Wed, 19 Jul 2017 08:23:25 +0000 (10:23 +0200)
committerWuKong <rebirthmonkey@gmail.com>
Wed, 19 Jul 2017 08:23:25 +0000 (10:23 +0200)
Change-Id: I8b4d3fa24f6ad7c7f9bb5dc93279c4a48bb0fe86
Signed-off-by: WuKong <rebirthmonkey@gmail.com>
25 files changed:
moonv4/DEV.md [moved from moonv4/development.md with 81% similarity]
moonv4/bin/build_all_pip.sh [new file with mode: 0644]
moonv4/moon_db/Changelog
moonv4/moon_db/moon_db/__init__.py
moonv4/moon_orchestrator/Changelog [new file with mode: 0644]
moonv4/moon_orchestrator/moon_orchestrator/__init__.py
moonv4/moon_router/LICENSE [moved from moonv4/moon_secrouter/LICENSE with 100% similarity]
moonv4/moon_router/MANIFEST.in [moved from moonv4/moon_secrouter/MANIFEST.in with 100% similarity]
moonv4/moon_router/README.rst [moved from moonv4/moon_secrouter/README.rst with 100% similarity]
moonv4/moon_router/doc/api-moon-secrouter.pdf [moved from moonv4/moon_secrouter/doc/api-moon-secrouter.pdf with 100% similarity]
moonv4/moon_router/doc/api.pdf [moved from moonv4/moon_secrouter/doc/api.pdf with 100% similarity]
moonv4/moon_router/moon_secrouter/__init__.py [moved from moonv4/moon_secrouter/moon_secrouter/__init__.py with 100% similarity]
moonv4/moon_router/moon_secrouter/__main__.py [moved from moonv4/moon_secrouter/moon_secrouter/__main__.py with 100% similarity]
moonv4/moon_router/moon_secrouter/api/__init__.py [moved from moonv4/moon_secrouter/moon_secrouter/api/__init__.py with 100% similarity]
moonv4/moon_router/moon_secrouter/api/generic.py [moved from moonv4/moon_secrouter/moon_secrouter/api/generic.py with 100% similarity]
moonv4/moon_router/moon_secrouter/api/route.py [moved from moonv4/moon_secrouter/moon_secrouter/api/route.py with 100% similarity]
moonv4/moon_router/moon_secrouter/messenger.py [moved from moonv4/moon_secrouter/moon_secrouter/messenger.py with 100% similarity]
moonv4/moon_router/moon_secrouter/server.py [moved from moonv4/moon_secrouter/moon_secrouter/server.py with 100% similarity]
moonv4/moon_router/requirements.txt [moved from moonv4/moon_secrouter/requirements.txt with 100% similarity]
moonv4/moon_router/setup.py [moved from moonv4/moon_secrouter/setup.py with 100% similarity]
moonv4/moon_router/tests/moon_db-0.1.0.tar.gz [moved from moonv4/moon_secrouter/tests/moon_db-0.1.0.tar.gz with 100% similarity]
moonv4/moon_router/tests/moon_policy-0.1.0.tar.gz [moved from moonv4/moon_secrouter/tests/moon_policy-0.1.0.tar.gz with 100% similarity]
moonv4/moon_utilities/Changelog
moonv4/moon_utilities/moon_utilities/__init__.py
moonv4/templates/moon_keystone/README.md

similarity index 81%
rename from moonv4/development.md
rename to moonv4/DEV.md
index bc5f7e9..70bcc4f 100644 (file)
@@ -1,8 +1,8 @@
-# Build Python Packages and Containers
+# Build Python Packages and Docker Images
 
 ## Python Package
-### Get the code
-
+### pre-requist
+Get the code
 ```bash
 git clone https://git.opnfv.org/moon
 cd moon/moonv4
@@ -10,20 +10,51 @@ export MOON_HOME=$(pwd)
 sudo ln -s $(pwd)/conf /etc/moon
 ```
 
-### Build python packages for all components
+Install python wheel
 ```bash
-sudo pip3 install pip --upgrade
-cd ${MOON_HOME}/bin
-source build_all.sh
+sudo apt install python3-wheel
 ```
 
-### moon_db
+Install pip twine
+```bash
+sudo pip install twine
+```
 
+Package code, wheel is a new format instead of `tar.gz`
+```bash
+python setup.py sdist bdist_wheel
+```
 
-### utilities
+Upload to PyPi
+```bash
+twine upload dist/moon_xxx-y.y.y.whl
+twine upload dist/moon_xxx-y.y.y.tar.gz
+```
 
+Install a package from PyPi
+```bash
+sudo pypi install moon_xxx --upgrade
+```
+
+### moon_db
+- change version in `moon_db/__init__.py`
+- add `Changelog`
+
+### moon_utilities
+- change version in `moon_utilities/__init__.py`
+- add `Changelog`
 
 ### moon_orchestrator
+- change version in `moon_orchestrator/__init__.py`
+- add `Changelog`
+
+
+### Build All Pip
+```bash
+sudo pip3 install pip --upgrade
+cd ${MOON_HOME}/bin
+source build_all_pip.sh
+```
 
 
 ## Container
diff --git a/moonv4/bin/build_all_pip.sh b/moonv4/bin/build_all_pip.sh
new file mode 100644 (file)
index 0000000..2b415bf
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+
+echo Building Moon_DB
+cd $MOON_HOME/moon_db
+python3 setup.py sdist bdist_wheel> /tmp/moon_db.log
+
+
+echo Building Moon_Utilities
+cd $MOON_HOME/moon_utilities
+python3 setup.py sdist bdist_wheel> /tmp/moon_utilities.log
+
+
+echo Building Moon_Orchestrator
+cd $MOON_HOME/moon_orchestrator
+python3 setup.py sdist bdist_wheel> /tmp/moon_orchestrator.log
\ No newline at end of file
index 94631fc..9295c0d 100644 (file)
@@ -19,3 +19,7 @@ CHANGES
 -----
 - Update setup.py to force the installation of requirements.
 
+1.0.2
+-----
+- Test PyPi upload
+
index ddfaf2b..bfca6ef 100644 (file)
@@ -3,5 +3,5 @@
 # license which can be found in the file 'LICENSE' in this package distribution
 # or at 'http://www.apache.org/licenses/LICENSE-2.0'.
 
-__version__ = "1.0.1"
+__version__ = "1.0.2"
 
diff --git a/moonv4/moon_orchestrator/Changelog b/moonv4/moon_orchestrator/Changelog
new file mode 100644 (file)
index 0000000..544e8fd
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
+# This software is distributed under the terms and conditions of the 'Apache-2.0'
+# license which can be found in the file 'LICENSE' in this package distribution
+# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
+
+
+CHANGES
+=======
+
+0.1.0
+-----
+- First version of the moon_orchestrator library.
+
+1.0.0
+-----
+- First public version of the moon_orchestrator library.
+
+1.0.1
+-----
+- add Changelog
+
index 660beb1..2249a1b 100644 (file)
@@ -3,4 +3,4 @@
 # license which can be found in the file 'LICENSE' in this package distribution
 # or at 'http://www.apache.org/licenses/LICENSE-2.0'.
 
-__version__ = "1.0.0"
+__version__ = "1.0.1"
index c91a038..bd049b1 100644 (file)
@@ -19,3 +19,6 @@ CHANGES
 -----
 - Update setup.py to force the installation of requirements.
 
+1.0.2
+-----
+- Test PyPi upload
\ No newline at end of file
index 2249a1b..b254b24 100644 (file)
@@ -3,4 +3,4 @@
 # license which can be found in the file 'LICENSE' in this package distribution
 # or at 'http://www.apache.org/licenses/LICENSE-2.0'.
 
-__version__ = "1.0.1"
+__version__ = "1.0.2"
index 77c90e9..cf77a74 100644 (file)
@@ -13,7 +13,7 @@ docker build --build-arg https_proxy=http://proxy:3128 --build-arg http_proxy=ht
 ```
 
 
-## set up an execution environment
+## Setup an execution environment
 
 ### clean up if necessary
 ```bash