diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index c28ab72..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include README.md -include LICENSE.md diff --git a/gridlock/LICENSE.md b/gridlock/LICENSE.md new file mode 120000 index 0000000..7eabdb1 --- /dev/null +++ b/gridlock/LICENSE.md @@ -0,0 +1 @@ +../LICENSE.md \ No newline at end of file diff --git a/gridlock/README.md b/gridlock/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/gridlock/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/gridlock/VERSION.py b/gridlock/VERSION.py deleted file mode 100644 index 8e6abf6..0000000 --- a/gridlock/VERSION.py +++ /dev/null @@ -1,4 +0,0 @@ -""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """ -__version__ = ''' -1.0 -'''.strip() diff --git a/gridlock/__init__.py b/gridlock/__init__.py index d547794..591ad12 100644 --- a/gridlock/__init__.py +++ b/gridlock/__init__.py @@ -19,6 +19,5 @@ from .error import GridError from .grid import Grid __author__ = 'Jan Petykiewicz' - -from .VERSION import __version__ +__version__ = '1.0' version = __version__ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e9ac6be --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "gridlock" +description = "Coupled gridding library" +readme = "README.md" +license = { file = "LICENSE.md" } +authors = [ + { name="Jan Petykiewicz", email="jan@mpxd.net" }, + ] +homepage = "https://mpxd.net/code/jan/gridlock" +repository = "https://mpxd.net/code/jan/gridlock" +keywords = [ + "FDTD", + "gridding", + "simulation", + "nonuniform", + "FDFD", + "finite", + "difference", + ] +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Topic :: Multimedia :: Graphics :: 3D Rendering", + "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", + "Topic :: Scientific/Engineering :: Physics", + "Topic :: Scientific/Engineering :: Visualization", + ] +requires-python = ">=3.8" +include = [ + "LICENSE.md" + ] +dynamic = ["version"] +dependencies = [ + "numpy~=1.21", + "float_raster", + ] + + +[tool.hatch.version] +path = "gridlock/__init__.py" + +[project.optional-dependencies] +visualization = ["matplotlib"] +visualization-isosurface = [ + "matplotlib", + "skimage>=0.13", + "mpl_toolkits", + ] diff --git a/setup.py b/setup.py deleted file mode 100644 index a424b97..0000000 --- a/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup, find_packages - -with open('README.md', 'r') as f: - long_description = f.read() - -with open('gridlock/VERSION.py', 'rt') as f: - version = f.readlines()[2].strip() - -setup(name='gridlock', - version=version, - description='Coupled gridding library', - long_description=long_description, - long_description_content_type='text/markdown', - author='Jan Petykiewicz', - author_email='jan@mpxd.net', - url='https://mpxd.net/code/jan/gridlock', - packages=find_packages(), - package_data={ - 'gridlock': ['py.typed'], - }, - install_requires=[ - 'numpy', - 'float_raster', - ], - extras_require={ - 'visualization': ['matplotlib'], - 'visualization-isosurface': [ - 'matplotlib', - 'skimage>=0.13', - 'mpl_toolkits', - ], - }, - classifiers=[ - 'Programming Language :: Python :: 3', - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: GNU Affero General Public License v3', - 'Topic :: Multimedia :: Graphics :: 3D Rendering', - 'Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)', - 'Topic :: Scientific/Engineering :: Physics', - 'Topic :: Scientific/Engineering :: Visualization', - ], - ) -