File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 26
26
from keras_nlp import samplers
27
27
from keras_nlp import tokenizers
28
28
from keras_nlp import utils
29
-
30
- # This is the global source of truth for the version number.
31
- __version__ = "0.7.0"
29
+ from keras_nlp .version import __version__
Original file line number Diff line number Diff line change
1
+ # Copyright 2023 The KerasNLP Authors
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from keras_nlp .api_export import keras_nlp_export
16
+
17
+ # Unique source of truth for the version number.
18
+ __version__ = "0.7.0"
19
+
20
+
21
+ @keras_nlp_export ("keras_nlp.version" )
22
+ def version ():
23
+ return __version__
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ def get_version(rel_path):
37
37
38
38
HERE = pathlib .Path (__file__ ).parent
39
39
README = (HERE / "README.md" ).read_text ()
40
+ VERSION = get_version ("keras_nlp/version.py" )
40
41
41
42
setup (
42
43
name = "keras-nlp" ,
@@ -45,7 +46,7 @@ def get_version(rel_path):
45
46
),
46
47
long_description = README ,
47
48
long_description_content_type = "text/markdown" ,
48
- version = get_version ( "keras_nlp/__init__.py" ) ,
49
+ version = VERSION ,
49
50
url = "https://github.com/keras-team/keras-nlp" ,
50
51
author = "Keras team" ,
51
52
You can’t perform that action at this time.
0 commit comments