File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -63,20 +63,21 @@ def export_version_string(version, is_nightly=False):
6363 )
6464 f .write (setup_contents )
6565
66- # Make sure to export the __version__ string
66+ # Overwrite the version string with our package version.
6767 with open (os .path .join (package , "src" , "version_utils.py" )) as f :
68- version_contents = list ( f .readlines () )
68+ version_contents = f .readlines ()
6969 with open (os .path .join (package , "src" , "version_utils.py" ), "w" ) as f :
7070 for line in version_contents :
7171 if line .startswith ("__version__" ):
72- f .write (f'__version__ = "{ version } "' )
72+ f .write (f'__version__ = "{ version } "\n ' )
7373 else :
7474 f .write (line )
75+ # Make sure to export the __version__ string.
7576 with open (os .path .join (package , "__init__.py" )) as f :
7677 init_contents = f .read ()
7778 with open (os .path .join (package , "__init__.py" ), "w" ) as f :
78- f .write (init_contents + " \n \n " )
79- f .write ("from keras_nlp.src import __version__\n " )
79+ f .write (init_contents )
80+ f .write ("from keras_nlp.src.version_utils import __version__\n " )
8081
8182
8283def build (root_path , is_nightly = False ):
You can’t perform that action at this time.
0 commit comments