Skip to content

Commit

Permalink
BLD: Move setuptools-scm version file to pyproject
Browse files Browse the repository at this point in the history
setuptools-scm > 8.0.0 seems to take issue with version file paths
supplied in setup.py. This is a step toward a more pyproject.toml
oriented package structure as well.
  • Loading branch information
berland authored and mferrera committed Sep 21, 2023
1 parent 4a0709e commit 315150e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ requires = [
"Sphinx",
"sphinx-rtd-theme",
]

[tool.setuptools_scm]
write_to = "src/xtgeoapp_grd3dmaps/_theversion.py"
17 changes: 2 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@
REQUIREMENTS_DOCS = setupx.parse_requirements("requirements/requirements_docs.txt")
REQUIREMENTS_EXTRAS = {"tests": REQUIREMENTS_TESTS, "docs": REQUIREMENTS_DOCS}

HC_FUNCTION = (
"grid3d_hc_thickness=xtgeoapp_grd3dmaps.avghc.grid3d_hc_thickness:main"
)
AVG_FUNCTION = (
"grid3d_average_map=xtgeoapp_grd3dmaps.avghc.grid3d_average_map:main"
)
HC_FUNCTION = "grid3d_hc_thickness=xtgeoapp_grd3dmaps.avghc.grid3d_hc_thickness:main"
AVG_FUNCTION = "grid3d_average_map=xtgeoapp_grd3dmaps.avghc.grid3d_average_map:main"
AGG_FUNCTION = (
"grid3d_aggregate_map=xtgeoapp_grd3dmaps.aggregate.grid3d_aggregate_map:main"
)
Expand All @@ -41,17 +37,8 @@
)


def src(anypath):
"""Find src folders."""
return Path(__file__).parent / anypath


setup(
name="xtgeoapp_grd3dmaps",
use_scm_version={
"root": src(""),
"write_to": src("src/xtgeoapp_grd3dmaps/_theversion.py"),
},
description="Make HC thickness, avg maps, etc directly from 3D props",
long_description=readme + "\n\n" + history,
author="Equinor R&T",
Expand Down

0 comments on commit 315150e

Please sign in to comment.