-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mlxtend importing itself during installation
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,32 @@ | |
# | ||
# License: BSD 3 clause | ||
|
||
from os.path import dirname, join, realpath | ||
from os.path import abspath, dirname, join, realpath | ||
|
||
from setuptools import find_packages, setup | ||
|
||
import mlxtend | ||
|
||
VERSION = mlxtend.__version__ | ||
PROJECT_ROOT = dirname(realpath(__file__)) | ||
|
||
|
||
def get_version(rel_path): | ||
here = abspath(dirname(__file__)) | ||
with open(join(here, rel_path), "r") as f: | ||
for line in f.readlines(): | ||
if line.startswith("__version__"): | ||
delim = '"' if '"' in line else "'" | ||
return line.split(delim)[1] | ||
else: | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
REQUIREMENTS_FILE = join(PROJECT_ROOT, "requirements.txt") | ||
|
||
with open(REQUIREMENTS_FILE) as f: | ||
install_reqs = f.read().splitlines() | ||
|
||
setup( | ||
name="mlxtend", | ||
version=VERSION, | ||
version=get_version("mlxtend/__init__.py"), | ||
description="Machine Learning Library Extensions", | ||
author="Sebastian Raschka", | ||
author_email="[email protected]", | ||
|