Skip to content

Commit

Permalink
Fix mlxtend importing itself during installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jmahlik committed Sep 18, 2023
1 parent eaaea36 commit 3cbb9e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion docs/sources/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The CHANGELOG for the current development version is available at

- Address NumPy deprecations to make mlxtend compatible to NumPy 1.24
- Changed the signature of the `LinearRegression` model of sklearn in the test removing the `normalize` parameter as it is deprecated. ([#1036](https://github.com/rasbt/mlxtend/issues/1036))
- Add `pyproject.toml` to support PEP 518 builds
- Fixed installation from sdist failing

##### New Features and Enhancements

Expand Down Expand Up @@ -951,4 +953,4 @@ imput arrays via `transform` and `fit_transform`

### Version 0.1.1 (2014-08-13)

- Simplified code for ColumnSelector.
- Simplified code for ColumnSelector.
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]",
Expand Down

0 comments on commit 3cbb9e5

Please sign in to comment.