aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_scripts/main.py5
-rw-r--r--build_scripts/options.py1
-rw-r--r--coin_build_instructions.py3
-rw-r--r--setup.py4
4 files changed, 13 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index b424aa8e4..579cfeae3 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -51,6 +51,11 @@ setup_py_path = os.path.join(setup_script_dir, "setup.py")
@memoize
def get_package_timestamp():
+ """ In a Coin CI build the returned timestamp will be the
+ Coin integration id timestamp. For regular builds it's
+ just the current timestamp or a user provided one."""
+ if OPTION_PACKAGE_TIMESTAMP:
+ return OPTION_PACKAGE_TIMESTAMP
return int(time.time())
@memoize
diff --git a/build_scripts/options.py b/build_scripts/options.py
index d7174feff..fd8b0718e 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -81,3 +81,4 @@ OPTION_VERBOSE_BUILD = has_option("verbose-build")
OPTION_SANITIZE_ADDRESS = has_option("sanitize-address")
OPTION_SNAPSHOT_BUILD = has_option("snapshot-build")
OPTION_LIMITED_API = option_value("limited-api")
+OPTION_PACKAGE_TIMESTAMP = option_value("package-timestamp")
diff --git a/coin_build_instructions.py b/coin_build_instructions.py
index c9d59a0a6..aee0bf265 100644
--- a/coin_build_instructions.py
+++ b/coin_build_instructions.py
@@ -55,6 +55,7 @@ CI_HOST_OS_VER = option_value("osVer")
CI_ENV_INSTALL_DIR = option_value("instdir")
CI_ENV_AGENT_DIR = option_value("agentdir")
CI_COMPILER = option_value("compiler")
+CI_INTEGRATION_ID = option_value("coinIntegrationId")
CI_FEATURES = []
_ci_features = option_value("features")
if _ci_features is not None:
@@ -118,6 +119,8 @@ def call_setup(python_ver):
if is_snapshot_build():
cmd += ["--snapshot-build"]
+ cmd += ["--package-timestamp=" + CI_INTEGRATION_ID]
+
run_instruction(cmd, "Failed to run setup.py")
def run_build_instructions():
diff --git a/setup.py b/setup.py
index a24e656e5..42d74ca77 100644
--- a/setup.py
+++ b/setup.py
@@ -140,6 +140,10 @@ using `setup.py build`:
--skip-docs skip the documentation generation.
--limited-api=yes|no default yes if applicable
Set or clear the limited API flag. Ignored for Python 2.
+ --package-timestamp allows specifying the timestamp that will be
+ used as part of the version number for a snapshot package.
+ For example given --package-timestamp=1529646276
+ the package version will be 5.x.y.dev1529646276.
REQUIREMENTS: