Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
aa99c40a
Commit
aa99c40a
authored
Aug 16, 2017
by
Tsukasa OMOTO
Committed by
Guolin Ke
Aug 18, 2017
Browse files
python-package: fix version (#832)
* python-package: fix version * remove version variable
parent
256547fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
python-package/lightgbm/__init__.py
python-package/lightgbm/__init__.py
+4
-4
python-package/setup.py
python-package/setup.py
+11
-8
No files found.
python-package/lightgbm/__init__.py
View file @
aa99c40a
...
...
@@ -20,11 +20,11 @@ try:
except
ImportError
:
pass
version
=
'2.0.1'
if
os
.
path
.
isfile
(
'./VERSION.txt'
):
version
=
open
(
'./VERSION.txt'
).
read
().
strip
()
__version__
=
version
dir_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
os
.
path
.
isfile
(
os
.
path
.
join
(
dir_path
,
'VERSION.txt'
)):
__version__
=
open
(
os
.
path
.
join
(
dir_path
,
'VERSION.txt'
)).
read
().
strip
()
__all__
=
[
'Dataset'
,
'Booster'
,
'train'
,
'cv'
,
...
...
python-package/setup.py
View file @
aa99c40a
...
...
@@ -143,14 +143,17 @@ class CustomSdist(sdist):
if
__name__
==
"__main__"
:
if
(
8
*
struct
.
calcsize
(
"P"
))
!=
64
:
raise
Exception
(
'Cannot install LightGBM in 32-bit python, please use 64-bit python instead.'
)
if
os
.
path
.
isfile
(
'../VERSION.txt'
):
distutils
.
file_util
.
copy_file
(
"../VERSION.txt"
,
"./lightgbm/"
)
version
=
'2.0.3'
if
os
.
path
.
isfile
(
'./lightgbm/VERSION.txt'
):
with
open
(
'./lightgbm/VERSION.txt'
)
as
file_version
:
version
=
file_version
.
readline
().
strip
()
dir_path
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
os
.
path
.
isfile
(
os
.
path
.
join
(
'..'
,
'VERSION.txt'
)):
distutils
.
file_util
.
copy_file
(
os
.
path
.
join
(
'..'
,
'VERSION.txt'
),
os
.
path
.
join
(
'.'
,
'lightgbm'
))
if
os
.
path
.
isfile
(
os
.
path
.
join
(
dir_path
,
'lightgbm'
,
'VERSION.txt'
)):
version
=
open
(
os
.
path
.
join
(
dir_path
,
'lightgbm'
,
'VERSION.txt'
)).
read
().
strip
()
sys
.
path
.
insert
(
0
,
'.'
)
data_files
=
[]
setup
(
name
=
'lightgbm'
,
version
=
version
,
description
=
'LightGBM Python Package'
,
...
...
@@ -169,6 +172,6 @@ if __name__ == "__main__":
},
packages
=
find_packages
(),
include_package_data
=
True
,
data_files
=
data_files
,
data_files
=
[]
,
license
=
'The MIT License (Microsoft)'
,
url
=
'https://github.com/Microsoft/LightGBM'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment