Skip to content

Commit

Permalink
Put setuptools_scm config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
olebole committed Mar 29, 2024
1 parent 7f70053 commit ffd836c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pyraf = "pyraf:main"
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_file = "pyraf/version.py"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-s"
Expand Down
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@

from setuptools import setup, Extension

modules = []
modules = None

# On a Mac, xutil is not required since the graphics is done directly with Aqua.
# If one still wants to include it, the parameters
# library_dirs="/usr/X11/libs"
# include_dirs="/usr/X11/include"
# need to be added to the Extension
if platform.system() not in ('Darwin', 'Windows'):
modules.append(Extension('pyraf.xutil', ['pyraf/xutil.c'],
libraries=['X11']))
if platform.system() not in ("Darwin", "Windows"):
modules = [Extension("pyraf.xutil", ["pyraf/xutil.c"], libraries=["X11"])]

setup(ext_modules=modules,
use_scm_version={'write_to': os.path.join('pyraf', 'version.py')})
setup(ext_modules=modules)

0 comments on commit ffd836c

Please sign in to comment.