diff --git a/build.sh b/build.sh index 831b5b3a94..3d868a53e7 100644 --- a/build.sh +++ b/build.sh @@ -9,4 +9,8 @@ cp -R ${SRC_DIR}/input/* rmgdatabase/ # Create rmgrc file that points to this folder in site-packages/rmgpy directory cd ${SP_DIR} mkdir rmgpy -echo 'database.directory: ' ${PREFIX}/share/rmgdatabase > ${SP_DIR}/rmgpy/rmgrc \ No newline at end of file +echo 'database.directory: ' ${PREFIX}/share/rmgdatabase > ${SP_DIR}/rmgpy/rmgrc + +# Save version number stored in version.py +$PYTHON -c 'exec(open('version.py').read()); print __version__' > ${SRC_DIR}/__conda_version__.txt + diff --git a/meta.yaml b/meta.yaml index 66b94cdafb..a7e969dc82 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,14 +1,14 @@ # For conda build package: name: rmgdatabase - version: "1.0.1" + version: "0" # set by build.sh, which gets it from version.py file source: path: . build: - number: 1 - + number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} # number of commits since last git tag (which should be last change to __version__) + requirements: build: - python diff --git a/setup.py b/setup.py index 347f5854e5..e3d2e8afe7 100644 --- a/setup.py +++ b/setup.py @@ -42,9 +42,11 @@ scripts = ['scripts/' + scriptName for scriptName in scripts] +# Read the version number +exec(open('version.py').read()) # Initiate the build and/or installation setup(name='RMG-database', - version='1.0.0', + version=__version__, description='Reaction Mechanism Generator Database', author='William H. Green and the RMG Team', author_email='rmg_dev@mit.edu', diff --git a/version.py b/version.py new file mode 100644 index 0000000000..2637849f2e --- /dev/null +++ b/version.py @@ -0,0 +1,3 @@ +# This file describes the version + +__version__ = '1.0.1' \ No newline at end of file