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

Merge commit '8bfef2e6'

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