Skip to content

Commit

Permalink
ref: Drop version script; consolidate version logic in setup.py (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai authored Apr 3, 2024
1 parent 96e9f97 commit a3cf252
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
15 changes: 4 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import os
import pathlib
import subprocess
import sys
Expand All @@ -10,6 +11,8 @@
here = pathlib.Path().absolute()


ENV_LINODE_CLI_VERSION = "LINODE_CLI_VERSION"

# get the long description from the README.md
with open(here / "README.md", encoding="utf-8") as f:
long_description = f.read()
Expand All @@ -31,16 +34,6 @@ def get_baked_files():
return data_files


def get_version():
"""
Uses the version file to calculate this package's version
"""
return (
subprocess.check_output([sys.executable, "./version"])
.decode("utf-8")
.rstrip()
)


def get_baked_version():
"""
Expand Down Expand Up @@ -71,7 +64,7 @@ def bake_version(v):
version = get_baked_version()
else:
# Otherwise, retrieve and bake the version as normal
version = get_version()
version = os.getenv(ENV_LINODE_CLI_VERSION) or "0.0.0"
bake_version(version)

with open("requirements.txt") as f:
Expand Down
21 changes: 0 additions & 21 deletions version

This file was deleted.

0 comments on commit a3cf252

Please sign in to comment.