diff --git a/dagmc_geometry_slice_plotter/__init__.py b/dagmc_geometry_slice_plotter/__init__.py index 3be41ee..39b8596 100644 --- a/dagmc_geometry_slice_plotter/__init__.py +++ b/dagmc_geometry_slice_plotter/__init__.py @@ -1,13 +1,11 @@ -try: - from importlib.metadata import version, PackageNotFoundError -except (ModuleNotFoundError, ImportError): - from importlib_metadata import version, PackageNotFoundError -try: - __version__ = version("dagmc_geometry_slice_plotter") -except PackageNotFoundError: - from setuptools_scm import get_version +from importlib.metadata import version # , PackageNotFoundError - __version__ = get_version(root="..", relative_to=__file__) +# try: +__version__ = version("dagmc_geometry_slice_plotter") +# except PackageNotFoundError: +# from setuptools_scm import get_version + +# __version__ = get_version(root="..", relative_to=__file__) __all__ = ["__version__"] diff --git a/pyproject.toml b/pyproject.toml index b213cd8..c5a3257 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,43 @@ [build-system] -requires = [ - "setuptools >= 45", - "wheel", - "setuptools_scm[toml] >= 6.2", -] +requires = ["setuptools >= 65.4.0", "setuptools_scm[toml]>=7.0.5"] build-backend = "setuptools.build_meta" +[project] +name = "dagmc_geometry_slice_plotter" +authors = [ + { name="Jonathan Shimwell", email="mail@jshimwell.com" }, +] +license = {file = "LICENSE.txt"} +description = "A minimal Python package for creating plots of slices through DAGMC geometry" +readme = "README.md" +requires-python = ">=3.8" +keywords = ["dagmc", "geometry", "plot", "slice"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dependencies = [ + "matplotlib", + "trimesh", + "shapely", + "scipy", + "meshio", + "h5py" +] +dynamic = ["version"] + + [tool.setuptools_scm] write_to = "dagmc_geometry_slice_plotter/_version.py" + + +[project.optional-dependencies] +tests = [ + "pytest", + "pytest-cov" +] + +[project.urls] +"Homepage" = "https://github.com/fusion-energy/dagmc_geometry_slice_plotter" +"Bug Tracker" = "https://github.com/fusion-energy/dagmc_geometry_slice_plotter/issues" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 04be1b9..0000000 --- a/setup.cfg +++ /dev/null @@ -1,44 +0,0 @@ -[metadata] -name = dagmc_geometry_slice_plotter -author = The Fusion Energy Development Team -author_email = mail@jshimwell.com -description = A minimal Python package for creating plots of slices through DAGMC geometry -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/fusion-energy/dagmc_geometry_slice_plotter -license = MIT -license_file = LICENSE.txt -classifiers = - Natural Language :: English - Topic :: Scientific/Engineering - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - License :: OSI Approved :: MIT License - Operating System :: OS Independent -project_urls = - Source = https://github.com/fusion-energy/dagmc_geometry_slice_plotter - Tracker = https://github.com/fusion-energy/dagmc_geometry_slice_plotter/issues - -[options] -packages = find: -python_requires= >=3.6 -install_requires= - matplotlib >= 3.4.2 - trimesh - shapely - scipy - meshio - h5py - setuptools_scm # not sure why this is needed, other codes using this setup.cfg don't need setuptools_scm here - -[options.extras_require] -tests = - pytest >= 5.4.3 - pytest-cov>=2.12.1 - -[flake8] -per-file-ignores = __init__.py:F401 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1abbd06..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -import setuptools - -if __name__ == "__main__": - setuptools.setup()