Skip to content

Commit

Permalink
Use scm dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Feb 4, 2024
1 parent 5608e5d commit db964cc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion batoid/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ._version import __version__, __version_info__
from ._version import __version__

from .rayVector import RayVector, concatenateRayVectors

Expand Down
7 changes: 0 additions & 7 deletions batoid/_version.py

This file was deleted.

4 changes: 2 additions & 2 deletions docsrc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import batoid

project = 'batoid'
copyright = '2017-2021, Josh Meyers'
copyright = '2017-2024, Josh Meyers'
author = 'Josh Meyers'

# The short X.Y version
version = '.'.join(map(str, batoid.__version_info__[:2]))
version = '.'.join(map(str, batoid.__version_tuple__[:3]))
# The full version, including alpha/beta/rc tags
release = batoid.__version__

Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
requires = ["setuptools>=40.8.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "batoid/_version.py"
10 changes: 0 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext

VERSIONFILE="batoid/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
version = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))


class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Expand Down Expand Up @@ -61,7 +52,6 @@ def build_extension(self, ext):

setup(
name='batoid',
version=version,
author='Josh Meyers',
author_email='[email protected]',
url='https://github.com/jmeyers314/batoid',
Expand Down

0 comments on commit db964cc

Please sign in to comment.