Skip to content

Commit

Permalink
Replaced setup.py with pyproject.toml (#72)
Browse files Browse the repository at this point in the history
* - Replaced setup.py with pyproject.toml
- Modified build instruction in DEPLOY.md file

Signed-off-by: Saad Mohsin Khan <[email protected]>

* Update build.yml

Changed build command.

* Update build.yml

Added command to install build

---------

Signed-off-by: Saad Mohsin Khan <[email protected]>
  • Loading branch information
saad1998 authored Mar 23, 2024
1 parent 39cc0b9 commit 658ed10
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 103 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ jobs:

- name: Build wheels ${{ matrix.python-version }} on ${{ matrix.os }}
run: |
python setup.py sdist bdist_wheel;
python -m pip install build
python -m build;
- name: Publish Python distribution to PyPI
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
First update the version number, then do (change `0.X.Y`).

```bash
$ python3 setup.py sdist bdist_wheel
$ python3 -m build
$ twine upload --repository-url https://upload.pypi.org/legacy/ dist/efficient_apriori-0.X.Y*
```

Expand Down
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[build-system]
requires = ["setuptools","twine", "wheel","efficient_apriori"]
build-backend = "setuptools.build_meta"

[project]
name = "efficient_apriori"
dynamic = ["readme","dependencies","version"]
description = " An efficient Python implementation of the Apriori algorithm."
license = {file = "LICENSE"}
authors = [
{name = "tommyod", email = "[email protected]"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.7"

[project.urls]
Source = "https://github.com/tommyod/Efficient-Apriori"
Repository = "https://github.com/tommyod/Efficient-Apriori.git"

[tool.setuptools.dynamic]
version = {attr = "efficient_apriori.__version__"}
readme = { file = "README.md", content-type = "text/markdown"}
dependencies = {file = ["requirements.txt"]}

[tool.setuptools.packages.find]
where = ["efficient_apriori"]
exclude = ["contrib", "docs", "tests"]
namespaces = false

[tool.setuptools.package-data]
"*" = ["templates/*", "*.tex", "*.html"]

[tool.pytest.ini_options]
testpaths = ["efficient_apriori/tests"]
addopts = "-v -ra -q"
log_cli = true
log_cli_level = "INFO"
log_format = "%(asctime)s %(levelname)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
minversion = "3.6"
filterwarnings = "ignore"
norecursedirs = "docs"
101 changes: 0 additions & 101 deletions setup.py

This file was deleted.

0 comments on commit 658ed10

Please sign in to comment.