Skip to content

Commit 2640753

Browse files
authored
fix version (#1532)
* fix version Signed-off-by: jiqing-feng <[email protected]> * fix setup version Signed-off-by: jiqing-feng <[email protected]> --------- Signed-off-by: jiqing-feng <[email protected]>
1 parent 89373b8 commit 2640753

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
from setuptools import find_packages, setup
22
from setuptools.dist import Distribution
33

4+
VERSION = "1.0.0"
5+
46

57
# Tested with wheel v0.45.1
68
class BinaryDistribution(Distribution):
79
def has_ext_modules(self):
810
return True
911

1012

11-
setup(packages=find_packages(), distclass=BinaryDistribution)
13+
def write_version_file(version, filepath="bitsandbytes/_version.py"):
14+
with open(filepath, "w") as f:
15+
f.write(f'__version__ = "{version}"\n')
16+
return version
17+
18+
19+
setup(packages=find_packages(), distclass=BinaryDistribution, version=write_version_file(VERSION))

0 commit comments

Comments
 (0)