Skip to content

Commit

Permalink
Full pyproject conversion (#1065)
Browse files Browse the repository at this point in the history
* add pyproject.toml to support PEP 518

* Fix mlxtend importing itself during installation

* Convert to pyproject.toml for project informaiton
  • Loading branch information
jmahlik authored Sep 22, 2023
1 parent fe92dd0 commit 451eb26
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 82 deletions.
5 changes: 4 additions & 1 deletion docs/sources/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ 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
- Converted configuration to `pyproject.toml`

##### New Features and Enhancements

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

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

- Simplified code for ColumnSelector.
- Simplified code for ColumnSelector.
15 changes: 10 additions & 5 deletions docs/sources/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,18 +446,23 @@ Consider deploying the package to the PyPI test server first. The setup instruct
**First**, install Twine if you don't have it already installed. E.g., use the following to install all recommended packages:

```bash
$ conda install wheel twine setuptools
$ python -m pip install twine build
```


**Second**, create the binaries
**Second**, create the distribution. This by default creates an sdist and wheel
in the ``./dist`` directory.

```bash
$ python setup.py sdist
$ python -m build
```

Install the wheel and sdist to make sure they work.
The distributions file names will change with each version.

```bash
$ python setup.py bdist_wheel --universal
python -m pip install ./dist/mlxtend-0.23.0.dev0.tar.gz --force-reinstall
python -m pip install ./dist/mlxtend-0.23.0.dev0-py3-none-any.whl --force-reinstall
python -m pip uninstall mlxtend
```

**Third**, upload the packages to the test server:
Expand Down
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
requires = [
"setuptools >= 59.0.0",
]
build-backend = "setuptools.build_meta"

[project]
name = "mlxtend"
authors = [
{name = "Sebastian Raschka", email = "[email protected]"}
]
description="Machine Learning Library Extensions"
dynamic = ["version", "dependencies"]
license= {text = "BSD 3-Clause"}
readme = "README.md"
classifiers=[
"License :: OSI Approved :: BSD License",
"Development Status :: 5 - Production/Stable",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Image Recognition",
]

[project.optional-dependencies]
testing = ["pytest"]
docs = ["mkdocs"]

[project.urls]
Homepage = "https://github.com/rasbt/mlxtend"
Documentation = "https://rasbt.github.io/mlxtend"
Repository = "https://github.com/rasbt/mlxtend"

[tool.setuptools]
platforms = ["any"]

[tool.setuptools.dynamic]
version = {attr = "mlxtend.__version__"}
dependencies = {file = "requirements.txt"}

[tool.setuptools.package-data]
"*" = ["LICENSE-BSD3.txt", "LICENSE-CC-BY.txt", "README.md", "requirements.txt"]

[tool.pytest.ini_options]
norecursedirs = [
"plotting/*",
"image/*",
"build/",
]
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

71 changes: 0 additions & 71 deletions setup.py

This file was deleted.

0 comments on commit 451eb26

Please sign in to comment.