Skip to content

Commit

Permalink
teaking scm again v5
Browse files Browse the repository at this point in the history
  • Loading branch information
cudmore committed Feb 14, 2024
1 parent 0bd2dad commit a57d195
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "brightest_path_lib/_version.py"
#version_scheme = "post-release"
#version_scheme = "release-branch-semver"
#local_scheme = "dirty-tag"
local_scheme = "no-local-version"

Expand Down
16 changes: 15 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ def create_extensions():
with open(os.path.abspath(_thisPath+"/README.md")) as f:
long_description = f.read()

def myversion():
from setuptools_scm.version import SEMVER_MINOR, guess_next_simple_semver, release_branch_semver_version

def my_release_branch_semver_version(version):
v = release_branch_semver_version(version)
if v == version.format_next_version(guess_next_simple_semver, retain=SEMVER_MINOR):
# return version.format_next_version(guess_next_simple_semver, fmt="{guessed}") # , retain=SEMVER_MINOR)
return version.format_next_version(guess_next_simple_semver, fmt="{guessed}", retain=SEMVER_MINOR)
return v

return {
'version_scheme': my_release_branch_semver_version,
'local_scheme': 'no-local-version',
}
setup(
name="brightest-path-lib",
description="A library of path-finding algorithms to find the brightest path between points in an image.",
Expand All @@ -75,7 +89,7 @@ def create_extensions():
#packages=["brightest_path_lib"],
#packages=find_packages(),
packages=packages,
use_scm_version=True,
use_scm_version=myversion, #True,
setup_requires=setup_requires,
install_requires=["numpy", "transonic"],
extras_require={
Expand Down

0 comments on commit a57d195

Please sign in to comment.