move to hatch-based build

This commit is contained in:
Jan Petykiewicz 2022-11-20 19:38:21 -08:00
parent cba31bf081
commit e41a71ce6f
8 changed files with 52 additions and 39 deletions

1
opencl_fdfd/LICENSE.md Symbolic link
View File

@ -0,0 +1 @@
../LICENSE.md

1
opencl_fdfd/README.md Symbolic link
View File

@ -0,0 +1 @@
../README.md

View File

@ -1,4 +0,0 @@
""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """
__version__ = '''
0.3
'''.strip()

View File

@ -40,6 +40,5 @@
from .main import cg_solver from .main import cg_solver
__author__ = 'Jan Petykiewicz' __author__ = 'Jan Petykiewicz'
__version__ = '0.3'
from .VERSION import __version__
version = __version__ version = __version__

View File

@ -43,7 +43,7 @@ def cg_solver(omega: complex,
OpenCL. OpenCL.
All ndarray arguments should be 1D arrays. To linearize a list of 3 3D ndarrays, All ndarray arguments should be 1D arrays. To linearize a list of 3 3D ndarrays,
either use meanas.vec() or numpy: either use meanas.fdmath.vec() or numpy:
f_1D = numpy.hstack(tuple((fi.flatten(order='F') for fi in [f_x, f_y, f_z]))) f_1D = numpy.hstack(tuple((fi.flatten(order='F') for fi in [f_x, f_y, f_z])))
:param omega: Complex frequency to solve at. :param omega: Complex frequency to solve at.

0
opencl_fdfd/py.typed Normal file
View File

48
pyproject.toml Normal file
View File

@ -0,0 +1,48 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "opencl_fdfd"
description = "OpenCL FDFD solver"
readme = "README.md"
license = { file = "LICENSE.md" }
authors = [
{ name="Jan Petykiewicz", email="jan@mpxd.net" },
]
homepage = "https://mpxd.net/code/jan/opencl_fdfd"
repository = "https://mpxd.net/code/jan/opencl_fdfd"
keywords = [
"FDFD",
"finite",
"difference",
"frequency",
"domain",
"simulation",
"optics",
"electromagnetic",
"dielectric",
"PML",
"solver",
"FDTD",
]
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.8"
dynamic = ["version"]
dependencies = [
"numpy~=1.21",
"pyopencl",
"jinja2",
"meanas>=0.5",
]
[tool.hatch.version]
path = "opencl_fdfd/__init__.py"

View File

@ -1,32 +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('opencl_fdfd/VERSION.py', 'rt') as f:
version = f.readlines()[2].strip()
setup(name='opencl_fdfd',
version=version,
description='OpenCL FDFD solver',
long_description=long_description,
long_description_content_type='text/markdown',
author='Jan Petykiewicz',
author_email='jan@mpxd.net',
url='https://mpxd.net/code/jan/opencl_fdfd',
packages=find_packages(),
package_data={
'opencl_fdfd': ['kernels/*']
},
install_requires=[
'numpy',
'pyopencl',
'jinja2',
'meanas>=0.5',
],
extras_require={
},
)