make it clear which is private
@@ -43,20 +43,6 @@ BUILD_PYTHON_EMBED_XZTAR = BUILD_PYTHON_EMBED.with_suffix(".tar.xz")
BUILD_DIST = BUILD.joinpath("dist")
-def read_pyproject():
- with open(PYPROJECT_TOML_PATH) as f:
- pyproject_contents = tomlkit.loads(f.read())
-
- return pyproject_contents
-
-
-def get_version_string():
- pyproject_contents = read_pyproject()
- version_string = pyproject_contents["tool"]["poetry"]["version"]
-
- return version_string
-
-
def main():
if sys.platform == "win32":
prepend = ""
@@ -70,7 +56,7 @@ def main():
)
subprocess.check_call("poetry build -f wheel", shell=True, cwd=REPO_ROOT)
- version_string = get_version_string().replace("-", ".")
+ version_string = _get_version_string().replace("-", ".")
pymedphys_wheel = f"pymedphys-{version_string}-py3-none-any.whl"
shutil.copy(DIST.joinpath(pymedphys_wheel), WHEELS.joinpath(pymedphys_wheel))
@@ -138,5 +124,19 @@ def main():
)
+def _read_pyproject():
+ with open(PYPROJECT_TOML_PATH) as f:
+ pyproject_contents = tomlkit.loads(f.read())
+
+ return pyproject_contents
+
+
+def _get_version_string():
+ pyproject_contents = _read_pyproject()
+ version_string = pyproject_contents["tool"]["poetry"]["version"]
+
+ return version_string
+
+
if __name__ == "__main__":
main()
