Skip to content
Snippets Groups Projects
Commit 8bfef2e6 authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Squashed 'moose-core/' changes from ed5f015..343cb02

343cb02 Fixes to  VERSION issue BhallaLab/moose#200.
835bf9a Added a version file.

git-subtree-dir: moose-core
git-subtree-split: 343cb02705b0874ad0035eea648019420475f7ed
parent 6c8f2012
No related branches found
No related tags found
No related merge requests found
......@@ -17,25 +17,30 @@ include(FindPkgConfig)
# If from command line, version info is not passed, use the git to generate a
# version file. If GIT fails, use the previous known version.
set(VERSION_FILE ${CMAKE_SOURCE_DIRECTORY}/VERSION)
set(VERSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
find_program(GIT_EXEC "git")
message( STATUS "Looking for git ${GIT_EXEC}" )
if( (NOT VERSION) AND GITEXEC)
if( (NOT MOOSE_VERSION) AND GIT_EXEC)
execute_process(
COMMAND ${GIT_EXEC} describe --tags --long
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_VERSION_OUTPUT
OUTPUT_VARIABLE MOOSE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
file(WRITE ${VERSION_FILE} ${GIT_VERSION_OUTPUT})
add_definitions( -DMOOSE_VERSION="${GIT_VERSION_OUTPUT}")
elseif( (NOT VERSION) AND (NOT GIT_EXEC) )
file( READ ${VERSION_FILE} GIT_VERSION_OUTPUT )
add_definitions( -DMOOSE_VERSION="${GIT_VERSION_OUTPUT}")
message(STATUS "+ Writing ${MOOSE_VERSION} to ${VERSION_FILE}" )
file(WRITE ${VERSION_FILE} ${MOOSE_VERSION})
elseif( (NOT MOOSE_VERSION) AND (NOT GIT_EXEC) )
message(STATUS "+ Reading ${VERSION_FILE}" )
file(READ ${VERSION_FILE} GIT_VERSION_OUTPUT )
elseif(MOOSE_VERSION)
message(STATUS "+ Using user VERSION ${MOOSE_VERSION}" )
file(WRITE ${VERSION_FILE} ${MOOSE_VERSION})
else()
add_definitions( -DMOOSE_VERSION="${VERSION}")
message(FATAL_ERROR "Could not determine MOOSE_VERSION" )
endif( )
add_definitions( -DMOOSE_VERSION="${MOOSE_VERSION}")
message( STATUS "MOOSE Version ${MOOSE_VERSION}" )
# This snippet is from LLVM project.
# Sanity check our source directory to make sure that we are not trying to
......
3.1.0-119-g835bf9a
\ No newline at end of file
......@@ -31,6 +31,9 @@ __status__ = "Development"
import os
from distutils.core import setup
with open( '../../VERSION', 'r' ) as f:
version = f.read( )
try:
import importlib.machinery
suffix = importlib.machinery.EXTENSION_SUFFIXES[0]
......@@ -39,21 +42,23 @@ except Exception as e:
setup(
name='moose',
version='3.0.2',
version=version,
description='MOOSE python scripting module.',
author='Dilwar Singh',
author_email='dilawars@ncbs.res.in',
author='MOOSERes',
author_email='bhalla@ncbs.res.in',
maintainer='Dilawar Singh',
maintainer_email='dilawars@ncbs.res.in',
url='http://moose.ncbs.res.in',
packages=[
'rdesigneur'
, 'moose'
, 'moose.SBML'
, 'moose.neuroml'
, 'moose.genesis'
],
package_dir = {
'moose' : 'moose'
, 'rdesigneur' : 'rdesigneur'
, 'genesis' : 'genesis'
},
package_data = { 'moose' : ['_moose' + suffix] },
)
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