Skip to content

Commit 91c7518

Browse files
committed
add version attribute as per Python convention
1 parent 18e827d commit 91c7518

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bitsandbytes/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@
2424
"optim.optimizer.MockArgs": False,
2525
}
2626

27+
__version__ = "0.41.1"
28+
2729
PACKAGE_GITHUB_URL = "https://github.com/TimDettmers/bitsandbytes"

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import os
77

88
from setuptools import find_packages, setup
9+
import bitsandbytes as bnb
10+
11+
VERSION = bnb.__version__
912

1013
libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.so"))
1114
libs = [os.path.basename(p) for p in libs]
@@ -18,7 +21,7 @@ def read(fname):
1821

1922
setup(
2023
name=f"bitsandbytes",
21-
version=f"0.41.1",
24+
version=VERSION,
2225
author="Tim Dettmers",
2326
author_email="[email protected]",
2427
description="k-bit optimizers and matrix multiplication routines.",

0 commit comments

Comments
 (0)