Skip to content

Commit f636faf

Browse files
authored
MAINT do not import imblearn in setup (#391)
1 parent 3016737 commit f636faf

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

imblearn/_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
"""
22
``imbalanced-learn`` is a set of python methods to deal with imbalanced
33
datset in machine learning and pattern recognition.
44
"""
@@ -21,4 +21,5 @@
2121
# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
2222
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
2323
#
24+
2425
__version__ = '0.4.0.dev0'

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
import codecs
55
import os
6-
import sys
76

87
from setuptools import find_packages, setup
9-
from imblearn import __version__
108

9+
# get __version__ from _version.py
10+
ver_file = os.path.join('imblearn', '_version.py')
11+
with open(ver_file) as f:
12+
exec(f.read())
1113

1214
DISTNAME = 'imbalanced-learn'
1315
DESCRIPTION = 'Toolbox for imbalanced dataset in machine learning.'

0 commit comments

Comments
 (0)