Things under legendu
**
Things under legendu
Poetry is a better alternative than PyBuilder!
Jump Start a Python 3 Project Using pybuilder¶
Install the Python package venv if you haven’t.
sudo apt install python3-venvCreate a directory for your new project (e.g., myproj).
mkdir myprojChange directory to the created directory.
cd myprojCreate a new virtual environment.
python3 -m venv venvActivate the virtual environment.
source venv/bin/activateInstall
pybuilderin the virtual environment.pip3 install pybuilder
Run the
pybcommand to initialize your project.pyb --start-project
Copy/Install Non-Python Files¶
from pybuilder.core import use_plugin, init
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.install_dependencies")
use_plugin("python.flake8")
use_plugin("python.coverage")
use_plugin("python.distutils")
use_plugin("copy_resources")
name = "demo_proj"
version = "0.0.1"
default_task = "publish"
@init
def set_properties(project):
project.set_property("coverage_break_build", False)
project.depends_on_requirements("requirements.txt")
project.get_property("copy_resources_glob").append("src/main/resources/*.jar")
project.set_property("copy_resources_target", "$dir_dist")
project.install_file("share/demo_proj/", "src/main/resources/ojdbc14.jar")
project.install_file("share/demo_proj/", "src/main/resources/tdgssconfig.jar")
project.install_file("share/demo_proj/", "src/main/resources/terajdbc4.jar")https://
Integration with PyCharm¶
http://
use pybuilder with pytest¶
You need to place
use_plugin('pypi:pybuilder_pytest')and
project.get_property("pytest_extra_args").append("-x")into the file build.py.
Issues with Python 3.7¶
The current version (0.11.17) of pybuilder does not support Python 3.7. Python 3.7 will be supported by pybuilder starting from version 0.12. If you must use pybuilder with Python 3.7 at this time, you can install the pre-release of pybuilder.
pip3 install --pre pybuilderReferences¶
https://
http://