Skip to content

Commit

Permalink
Replace setup.py and versioneer with pyproject.toml and setuptools_sc…
Browse files Browse the repository at this point in the history
…m. (#616)
  • Loading branch information
hameerabbasi authored Jan 2, 2024
1 parent 492c279 commit 6fca42b
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 2,545 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ default.profraw
sandbox.py

# macOS
*.DS_Store
**/.DS_Store

# Version file
sparse/_version.py
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "sparse"
dynamic = ["version"]
description = "Sparse n-dimensional arrays for the PyData ecosystem"
readme = "README.rst"
dependencies = ["numpy>=1.17", "scipy>=0.19", "numba>=0.49"]
maintainers = [{ name = "Hameer Abbasi", email = "hameerabbasi@yahoo.com" }]
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = ["sparse", "numpy", "scipy", "dask"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
]

[project.optional-dependencies]
docs = ["sphinx", "sphinx_rtd_theme"]
tests = ["dask[array]", "pytest>=3.5", "pytest-black", "pytest-cov"]
tox = ["sparse[tests]", "tox"]
all = ["sparse[docs,tox]"]

[project.urls]
Documentation = "https://sparse.pydata.org/"
Source = "https://github.com/pydata/sparse/"
Repository = "https://github.com/pydata/sparse.git"
"Issue Tracker" = "https://github.com/pydata/sparse/issues"
Discussions = "https://github.com/pydata/sparse/discussions"

[project.entry-points.numba_extensions]
init = "sparse._numba_extension:_init_extension"

[tool.setuptools.packages.find]
where = ["."]
include = ["sparse", "sparse.*"]

[tool.setuptools_scm]
version_file = "sparse/_version.py"

[tool.black]
exclude = "sparse/_version.py"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/all.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/docs.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements/tests.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/tox.txt

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,5 @@ exclude =

max-line-length = 120

[versioneer]
VCS = git
style = pep440
versionfile_source = sparse/_version.py
versionfile_build = sparse/_version.py
tag_prefix =
parentdir_prefix = sparse-

[bdist_wheel]
universal=1
78 changes: 0 additions & 78 deletions setup.py

This file was deleted.

5 changes: 1 addition & 4 deletions sparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
from ._io import save_npz, load_npz
from ._common import *

from ._version import get_versions

__version__ = get_versions()["version"]
__array_api_version__ = "2022.12"
del get_versions
from ._version import __version__

from numpy import (
bool_ as bool,
Expand Down
Loading

0 comments on commit 6fca42b

Please sign in to comment.