Skip to content

Commit

Permalink
use tag info and git hash as version number
Browse files Browse the repository at this point in the history
  • Loading branch information
dingzhaohan committed Dec 12, 2023
1 parent 2978f17 commit 4b87aca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion backend/openmm_dmff_plugin/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ execute_process(
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git describe --tags
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE GIT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)

# Compile the Python module.
add_custom_target(PythonInstall DEPENDS "${WRAP_FILE}")
Expand All @@ -36,4 +42,3 @@ add_custom_command(TARGET PythonInstall
COMMAND "${PYTHON_EXECUTABLE}" setup.py install
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)

2 changes: 1 addition & 1 deletion backend/openmm_dmff_plugin/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


setup(name='OpenMMDMFFPlugin',
version="@GIT_HASH@",
version="@GIT_VERSION@".lstrip('v').replace('-', ''),
ext_modules=[extension],
packages=['OpenMMDMFFPlugin', "OpenMMDMFFPlugin.tests"],
package_data={"OpenMMDMFFPlugin":['data/lj_fluid/*.pb', 'data/lj_fluid/variables/variables.index', 'data/lj_fluid/variables/variables.data-00000-of-00001', 'data/lj_fluid_gpu/*.pb', 'data/lj_fluid_gpu/variables/variables.index', 'data/lj_fluid_gpu/variables/variables.data-00000-of-00001', 'data/*.pdb']},
Expand Down

0 comments on commit 4b87aca

Please sign in to comment.