Skip to content

Commit

Permalink
ARROW-8182 [Packaging] Increment the version number detected from the…
Browse files Browse the repository at this point in the history
… latest git tag

The packaging artifacts are tagged with the following version number format by setuptools_scm: `{latest-tag}.dev{distance}` (0.16.0.dev1, 0.16.0.dev2...)

Once we make nightly artifacts available for development purposes depending on the package manager `0.16.0` may be considered newer than `0.16.0.dev1`. For example to install a nightly wheel via pip the user must pin the exact version of the produced wheel, there are no options to prefer `0.16.0.devN` over `0.16.0`.

One way to resolve this to increment the version number's minor component, so instead of generating `0.16.0.devN` version number after the `0.16` tag, create `0.16.1.devN` version which will be considered newer than `0.16.0`.

Closes #6683 from kszucs/increment-version

Authored-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
kszucs authored and wesm committed Mar 22, 2020
1 parent 00266d1 commit 968a11a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev/tasks/crossbow.py
Expand Up @@ -36,6 +36,7 @@
import click
import toolz
from setuptools_scm.git import parse as parse_git_version
from setuptools_scm.version import guess_next_version
from ruamel.yaml import YAML

try:
Expand Down Expand Up @@ -758,7 +759,8 @@ def get_version(root, **kwargs):
"""
kwargs['describe_command'] =\
'git describe --dirty --tags --long --match "apache-arrow-[0-9].*"'
return parse_git_version(root, **kwargs)
version = parse_git_version(root, **kwargs)
return version.format_next_version(guess_next_version)


class Serializable:
Expand Down Expand Up @@ -802,7 +804,7 @@ def from_repo(cls, repo, head=None, branch=None, remote=None, version=None,
if remote is None:
remote = repo.remote_url
if version is None:
version = get_version(repo.path).format_with('{tag}.dev{distance}')
version = get_version(repo.path)
if email is None:
email = repo.user_email

Expand Down

0 comments on commit 968a11a

Please sign in to comment.