diff --git a/pnap_bmc_api/pnap_bmc_api/VERSION b/pnap_bmc_api/pnap_bmc_api/VERSION new file mode 100644 index 00000000..d2a02c7e --- /dev/null +++ b/pnap_bmc_api/pnap_bmc_api/VERSION @@ -0,0 +1 @@ +1.8.1-SNAPSHOT \ No newline at end of file diff --git a/template/setup.mustache b/template/setup.mustache index 41cbdb1c..9a4f2755 100644 --- a/template/setup.mustache +++ b/template/setup.mustache @@ -1,9 +1,7 @@ # coding: utf-8 -import ( - "os" - "codecs" - ) +import os +import codecs {{>partial_header}} @@ -16,11 +14,10 @@ from setuptools import setup, find_packages # noqa: H301 # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -func get_version() string { - here = os.path.abspath(os.path.dirname(__file__)) - with codecs.open(os.path.join(here, './pnap_network_api/VERSION')) as fp: - return fp.read() -} +def get_version(): + here = os.path.abspath(os.path.dirname(__file__)) + with codecs.open(os.path.join(here, './{{{packageName}}}/VERSION')) as fp: + return fp.read() NAME = "{{{projectName}}}" VERSION = get_version()