Commit 7683fcab authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Set tweak version in setup.py

Annoyingly, PEP440 and semantic versioning conflict with each other.
This creates a new variable to overcome that which will automatically
synchronize the two.
parent 3d89d777
......@@ -13,7 +13,7 @@ from setuptools import find_packages, setup
# The most basic setup possible to be able to use setup.py develop
setup(
name='mantid',
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@',
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@@VERSION_TWEAK_PY@',
packages=find_packages(exclude=['*.test', 'plugins*']),
package_data={'': ['*.ui']},
@SETUPTOOLS_BUILD_COMMANDS_USE@
......
......@@ -9,7 +9,19 @@ set ( VERSION_MINOR 0 )
set ( VERSION_PATCH 0 )
# The tweak is mean to keep in line with the pre-release numbering.
# https://semver.org/
# examples: First release cadidate for tweak 1 is "-1-rc.1"
# Second release cadidate for tweak 1 is "-1-rc.2"
# Actual tweak release is "-1"
set ( VERSION_TWEAK "-1-rc.1" )
# pep440 is incompatible with semantic versioning
# https://www.python.org/dev/peps/pep-0440/
# example: First release cadidate for tweak 1 is ".1rc.1"
string ( REPLACE "-rc."
"rc"
VERSION_TWEAK_PY
${VERSION_TWEAK})
string ( REPLACE "-"
"."
VERSION_TWEAK_PY
${VERSION_TWEAK_PY})
......@@ -13,7 +13,7 @@ from setuptools import find_packages, setup
# The most basic setup possible to be able to use setup.py develop/install
setup(
name='MantidWorkbench', # probably the wrong name if someone wants to include it
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@',
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@@VERSION_TWEAK_PY@',
install_requires=['mantidqt'],
packages=find_packages(exclude=['*.test']),
package_data={'': ['*.ui']},
......
......@@ -13,7 +13,7 @@ from setuptools import find_packages, setup
setup(
name='mantidqt', # must match what is required by workbench setup.py
install_requires=['mantid'],
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@',
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@@VERSION_TWEAK_PY@',
packages=find_packages(exclude=['*.test']),
package_data={'': ['*.ui']},
@SETUPTOOLS_BUILD_COMMANDS_USE@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment