feanor
V1.2.5
用於簡化專案自動建置、測試、發布和部署的 Python 腳本。
在專案的根目錄中建立一個名為pack.py
的文件,其中包含以下內容:
from feanor import BaseBuilder
class Builder ( BaseBuilder ):
def Setup ( self ):
pass
def Tests ( self ):
pass
def Docs ( self ):
pass
def Build ( self ):
pass
def BuildTests ( self ):
pass
def Publish ( self ):
pass
您可以將
Builder
類別重新命名為您想要的任何名稱。
您可以將檔案重新命名為您想要的任何名稱。
刪除不需要的方法(
Setup
和Build
是唯一需要的方法)。
運行腳本:
python pack.py
使用python pack.py --help
查看可用選項:
-h, --help show this help message and exit
--debug Enable debug messages
--deep-debug Enable deep debug messages
--version, -v show program's version number and exit
Builder options:
--no-tests Do not run tests
--no-docs Do not generate documentation
--publish Publish the package
--no-clean Do not clean temporary files
--dist-dir DIST_DIR Distribution directory (where to save the built files)
-pv PACKAGE_VERSION, --package-version PACKAGE_VERSION
set the version of the package you want to build