Configuring pybuilder for developing command-line application
-
Create python3 virtual environment
$ python3 -m venv venv-name $ source venv-name/bin/activate
-
Install pybuilder
$ pip install pybuilder
-
Run main method
$ pyb run -P arg1="param1" -P arg2="param1" -P conf="./default_conf"
-
Run unittests
$ pyb run_unit_tests
-
Generate pip package
$ pyb publish
-
package location
target/dist/pybuilder-demo-/dist/pybuilder-demo-.tar.gz
-
Create python3 virtual environment
$ python3 -m venv prod-venv-name $ source prod-venv-name/bin/activate
-
Install pybuilder-demo package
$ pip install <pybuilder-demo-package-path>
-
Run main method
$ pyb-demo --help $ pyb-demo --arg1="<param1>" --arg2="<param2>" --conf="<custom_conf_dir>"
OR
$ pyb-demo
--conf has default value set to <prod-venv-name>/etc/configs