diff --git a/pypardiso/__init__.py b/pypardiso/__init__.py index ee30dc1..dd9c464 100644 --- a/pypardiso/__init__.py +++ b/pypardiso/__init__.py @@ -1,8 +1,14 @@ # coding: utf-8 +from importlib.metadata import version, PackageNotFoundError from .pardiso_wrapper import PyPardisoSolver from .scipy_aliases import spsolve, factorized from .scipy_aliases import pypardiso_solver as ps -__version__ = '0.4.3' + +try: + __version__ = version(__package__) +except PackageNotFoundError: + __version__ = "0.0.0" + __all__ = ['PyPardisoSolver', 'spsolve', 'factorized', 'ps'] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..355f2e4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["setuptools>=64", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "pypardiso" +authors = [ + {name = "Adrian Haas"} +] +description = "Python interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations" +readme = "README.md" +requires-python = ">=3.8" +keywords = ["pardiso", "sparse solver"] +license = {file = "LICENSE.txt"} +classifiers = [ + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Mathematics" +] +dynamic = ["version"] +dependencies = [ + "mkl", + "numpy", + "scipy" +] + +[project.urls] +Homepage = "https://github.com/haasad/PyPardisoProject" +Repository = "https://github.com/haasad/PyPardisoProject.git" +Changelog = "https://github.com/haasad/PyPardisoProject/releases" + +[tool.setuptools_scm] diff --git a/setup.py b/setup.py deleted file mode 100644 index e19c9a7..0000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -from setuptools import setup - -setup( - name='pypardiso', - version="0.4.3", - packages=['pypardiso'], - install_requires=['mkl', 'numpy', 'scipy'], - author="Adrian Haas", - license=open('LICENSE.txt').read(), - url="https://github.com/haasad/PyPardisoProject", - long_description=open('README.md').read(), - long_description_content_type="text/markdown", - description='Python interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations', - classifiers=[ - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Topic :: Scientific/Engineering :: Information Analysis', - 'Topic :: Scientific/Engineering :: Mathematics', - ], -)