Skip to content

Commit

Permalink
Update setup.py version dependencies to use version_base for NM repos (
Browse files Browse the repository at this point in the history
…#115)

* Update setup.py version dependencies to use version_base for NM repos

* make style
  • Loading branch information
markurtz authored May 25, 2021
1 parent 8b8412b commit 5a5557f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,25 @@
# default variables to be overwritten by the version.py file
is_release = None
version = "unknown"
version_major_minor = version
version_major = version
version_minor = version
version_bug = version

# load and overwrite version and release info from deepsparse package
version_path = os.path.join("src", "deepsparse", "generated_version.py")
if not os.path.exists(version_path):
version_path = os.path.join("src", "deepsparse", "version.py")
exec(open(version_path).read())
print(f"loaded version {version} from {version_path}")
version_base = f"{version_major}.{version_minor}.{version_bug}"

_PACKAGE_NAME = "deepsparse" if is_release else "deepsparse-nightly"

# File regexes for binaries to include in package_data
binary_regexes = ["*/*.so", "*/*.so.*", "*.bin", "*/*.bin"]

_deps = ["numpy>=1.16.3", "onnx>=1.5.0,<1.8.0", "requests>=2.0.0", "tqdm>=4.0.0"]
_nm_deps = [
f"{'sparsezoo' if is_release else 'sparsezoo-nightly'}~={version_major_minor}"
]
_nm_deps = [f"{'sparsezoo' if is_release else 'sparsezoo-nightly'}~={version_base}"]
_dev_deps = [
"beautifulsoup4==4.9.3",
"black>=20.8b1",
Expand Down

0 comments on commit 5a5557f

Please sign in to comment.