Skip to content

Commit 4746ec4

Browse files
author
Dilawar Singh
committed
testing is required.
1 parent d2ddaf7 commit 4746ec4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pymoose/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ else(APPLE)
111111
endif()
112112

113113
add_custom_command(TARGET _moose POST_BUILD
114-
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/setup.py bdist --skip-build
114+
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/setup.py bdist_dumb
115+
-d ${CMAKE_BINARY_DIR} --format=gztar --skip-build --quiet
115116
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
116117
VERBATIM)
117118

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
import sys
88
import subprocess
9+
import datetime
910

1011
#### TEST IF REQUIRED TOOLS EXISTS.
1112
if sys.version_info[0] < 3:
@@ -16,9 +17,8 @@
1617
try:
1718
cmakeVersion = subprocess.check_output(["cmake", "--version"])
1819
print("[INFO ] CMake found: %s" % cmakeVersion.decode('utf8'))
19-
2020
except Exception as e:
21-
print(f"[ERROR] cmake is not found. Please install cmake.", file=sys.stderr)
21+
print("[ERROR] cmake is not found. Please install cmake.")
2222
quit(-1)
2323

2424

@@ -31,8 +31,9 @@
3131

3232
# Global variables.
3333

34-
sdir_ = Path().absolute()
35-
builddir_ = sdir_ / '_build'
34+
sdir_ = Path(__file__).parent.absolute()
35+
stamp = datetime.datetime.now().strftime('%Y%m%d')
36+
builddir_ = sdir_ / ('_build_%s' % stamp)
3637
builddir_.mkdir(parents=True, exist_ok=True)
3738

3839
numCores_ = os.cpu_count() - 1

0 commit comments

Comments
 (0)