From eb52350e4dd1b6d9f9f57b4169f4e466b922e461 Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 30 Oct 2022 23:39:03 +0000 Subject: [PATCH 1/4] pyproject instead of setup --- pyproject.toml | 51 ++++++++++++++++++-- setup.cfg | 46 ------------------ setup.py | 4 -- {brep_to_h5m => src/brep_to_h5m}/__init__.py | 0 {brep_to_h5m => src/brep_to_h5m}/core.py | 0 5 files changed, 46 insertions(+), 55 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py rename {brep_to_h5m => src/brep_to_h5m}/__init__.py (100%) rename {brep_to_h5m => src/brep_to_h5m}/core.py (100%) diff --git a/pyproject.toml b/pyproject.toml index 80ae454..017e160 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,51 @@ [build-system] -requires = [ - "setuptools >= 46.4.0", - "wheel", - "setuptools_scm[toml] >= 6.3.1", -] +requires = ["setuptools >= 65.4.0", "setuptools_scm[toml]>=7.0.5"] build-backend = "setuptools.build_meta" +[project] +name = "brep_to_h5m" +authors = [ + { name="Jonathan Shimwell", email="mail@jshimwell.com" }, +] +license = {file = "LICENSE.txt"} +description = "Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations" +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 = [ + "trimesh", + "networkx", + "stl_to_h5m", + "vertices_to_h5m", + "gmsh", +] +dynamic = ["version"] + + +[tool.setuptools_scm] +write_to = "src/brep_to_h5m/_version.py" + + +[project.optional-dependencies] +tests = [ + "pytest", + "pytest-cov", + "brep_part_finder", + "dagmc_h5m_file_inspector", + "openmc_data_downloader", +] + +[project.urls] +"Homepage" = "https://github.com/fusion-energy/brep_to_h5m" +"Bug Tracker" = "https://github.com/fusion-energy/brep_to_h5m/issues" + +[tool.setuptools] +package-dir = {"" = "src"} + [tool.setuptools_scm] write_to = "brep_to_h5m/_version.py" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index d469249..0000000 --- a/setup.cfg +++ /dev/null @@ -1,46 +0,0 @@ -[metadata] -name = brep_to_h5m -version = attr: brep_to_h5m.__version__ -author = The brep_to_h5m Development Team -author_email = mail@jshimwell.com -description = Converts Brep CAD geometry files to h5m geometry files compatible with DAGMC simulations -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/fusion-energy/brep_to_h5m -license = MIT -license_file = LICENSE.txt -classifiers = - Natural Language :: English - Topic :: Scientific/Engineering - Programming Language :: Python :: 3 - 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/brep_to_h5m - Tracker = https://github.com/fusion-energy/brep_to_h5m/issues - -[options] -packages = find: -python_requires= >=3.6 -install_requires= - trimesh - networkx - stl_to_h5m - vertices_to_h5m - # gmsh is not avaialbe on pypi but can be installed with conda or apt-get - # moab is also not available on pypi but can be installed with conda - -[options.extras_require] -tests = - pytest >= 5.4.3 - brep_part_finder # requires cadquery which can be installed with conda - dagmc_h5m_file_inspector # requires moab which can be installed with conda - openmc_data_downloader - vertices_to_h5m - -[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() diff --git a/brep_to_h5m/__init__.py b/src/brep_to_h5m/__init__.py similarity index 100% rename from brep_to_h5m/__init__.py rename to src/brep_to_h5m/__init__.py diff --git a/brep_to_h5m/core.py b/src/brep_to_h5m/core.py similarity index 100% rename from brep_to_h5m/core.py rename to src/brep_to_h5m/core.py From 358dc618d9668d4f2d5b3d50bcb10d727d1172b2 Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 30 Oct 2022 23:40:16 +0000 Subject: [PATCH 2/4] updated script as setup.py removed --- conda/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index e494c1c..e4192fe 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -9,7 +9,8 @@ source: build: number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt + script: python -m pip install --no-deps --ignore-installed . + # script: python setup.py install --single-version-externally-managed --record=record.txt requirements: build: From b0d9c1f514b5757f1b3e672b53efe5fad350d48f Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 31 Oct 2022 16:25:49 +0000 Subject: [PATCH 3/4] removed duplicate entry --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 017e160..7196128 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,3 @@ tests = [ [tool.setuptools] package-dir = {"" = "src"} - -[tool.setuptools_scm] -write_to = "brep_to_h5m/_version.py" From 6001abd603b755716b686797192950304fd62475 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 31 Oct 2022 17:32:34 +0000 Subject: [PATCH 4/4] removed pypi gmsh, relying on moab --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7196128..cd74e0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ dependencies = [ "networkx", "stl_to_h5m", "vertices_to_h5m", - "gmsh", ] dynamic = ["version"]