Skip to content

Commit

Permalink
BLD: Use setuptools_scm version_file
Browse files Browse the repository at this point in the history
setuptools_scm 8.0.0 introduced `version_file` as a replacement
for `write_to` in setup.py schemes to specify the location of
the version file.
  • Loading branch information
mferrera committed Sep 21, 2023
1 parent 0e2ee18 commit 6ae7586
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,11 @@
CMDCLASS = {"clean": setuputils.CleanUp}


def src(anypath):
root = os.path.dirname(__file__)
return os.path.abspath(os.path.join(root, anypath))


skbuild.setup(
name="xtgeo",
description="XTGeo is a Python library for 3D grids, surfaces, wells, etc",
use_scm_version={
"root": src(""),
"write_to": src("src/xtgeo/_theversion.py"),
"version_file": "src/xtgeo/_theversion.py",
},
long_description=README + "\n\n" + HISTORY,
long_description_content_type="text/markdown",
Expand Down Expand Up @@ -107,8 +101,7 @@ def src(anypath):
setuptools_setup( # use setuptools version of setup
name="xtgeo",
use_scm_version={
"root": src(""),
"write_to": src("src/xtgeo/_theversion.py"),
"version_file": "src/xtgeo/_theversion.py",
},
packages=setuptools.find_packages(where="src"),
package_dir={"": "src"},
Expand Down

0 comments on commit 6ae7586

Please sign in to comment.