Skip to content

Commit

Permalink
nt more
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed Apr 13, 2024
1 parent 5a7104f commit e7858b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pygfx/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def get_version_from_git_archive(version_info):
# variables not expanded during 'git archive'
return None

VTAG = "tag: v"
vtag = "tag: v"
refs = set(r.strip() for r in refnames.split(","))
version_tags = set(r[len(VTAG) :] for r in refs if r.startswith(VTAG))
version_tags = set(r[len(vtag) :] for r in refs if r.startswith(vtag))
if version_tags:
release, *_ = sorted(version_tags) # prefer e.g. "2.0" over "2.0rc1"
return Version(release, post=None, labels=None)
Expand Down Expand Up @@ -171,7 +171,7 @@ def get_cmdclass(pkg_source_path):
from setuptools.command.build_py import build_py as build_py_orig
from setuptools.command.sdist import sdist as sdist_orig

class _build_py(build_py_orig):
class _build_py(build_py_orig): # noqa
def run(self):
super().run()

Expand All @@ -183,7 +183,7 @@ def run(self):
path = pkg_source_path
_write_version(os.path.join(self.build_lib, path, STATIC_VERSION_FILE))

class _sdist(sdist_orig):
class _sdist(sdist_orig): # noqa
def make_release_tree(self, base_dir, files):
super().make_release_tree(base_dir, files)
_write_version(os.path.join(base_dir, pkg_source_path, STATIC_VERSION_FILE))
Expand Down

0 comments on commit e7858b5

Please sign in to comment.