Skip to content

Commit 5a787ff

Browse files
author
Teseo Schneider
committed
updated polyfem without spectra
1 parent 35a988c commit 5a787ff

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

cmake/PolyfemPythonDownloadExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endfunction()
2727
function(polyfem_python_download_polyfem)
2828
polyfem_python_download_project(polyfem
2929
GIT_REPOSITORY https://github.com/polyfem/polyfem.git
30-
GIT_TAG d6808d27d30b897d7ca8104f38e90773efd48aaa
30+
GIT_TAG f35a6448d63ae450eb9b35a4462f49f6df704db3
3131
)
3232
endfunction()
3333

setup.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,50 @@ def run(self):
2929

3030
# self.debug = True
3131

32-
cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1))
32+
cmake_version = LooseVersion(
33+
re.search(r'version\s*([\d.]+)', out.decode()).group(1))
3334
if cmake_version < '3.1.0':
3435
raise RuntimeError("CMake >= 3.1.0 is required")
3536

3637
for ext in self.extensions:
3738
self.build_extension(ext)
3839

39-
4040
def build_extension(self, ext):
41-
extdir = os.path.join(os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))),"polyfempy")
41+
extdir = os.path.join(os.path.abspath(os.path.dirname(
42+
self.get_ext_fullpath(ext.name))), "polyfempy")
4243

4344
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
4445
'-DPYTHON_EXECUTABLE=' + sys.executable,
4546
'-DPOLYFEM_WITH_PARDISO=OFF',
4647
'-DPOLYFEM_NO_UI=ON',
4748
'-DPOLYFEM_WITH_APPS=OFF',
48-
'-DPOLYFEM_WITH_MISC=OFF']
49-
49+
'-DPOLYFEM_WITH_MISC=OFF',
50+
'-DPOLYFEM_WITH_SPECTRA=OFF']
5051

5152
cfg = 'Debug' if self.debug else 'Release'
5253
build_args = ['--config', cfg]
5354
cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg]
5455

5556
if platform.system() == "Windows":
56-
cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]
57+
cmake_args += [
58+
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)]
5759
if sys.maxsize > 2**32:
5860
cmake_args += ['-A', 'x64']
5961
build_args += ['--', '/m']
6062
else:
6163
build_args += ['--', '-j2']
6264

6365
env = os.environ.copy()
64-
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),self.distribution.get_version())
66+
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(
67+
env.get('CXXFLAGS', ''), self.distribution.get_version())
6568

6669
if not os.path.exists(self.build_temp):
6770
os.makedirs(self.build_temp)
68-
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
71+
subprocess.check_call(['cmake', ext.sourcedir] +
72+
cmake_args, cwd=self.build_temp, env=env)
6973

70-
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
74+
subprocess.check_call(['cmake', '--build', '.'] +
75+
build_args, cwd=self.build_temp)
7176

7277
print() # Add an empty line for cleaner output
7378

@@ -78,7 +83,7 @@ def build_extension(self, ext):
7883

7984
setup(
8085
name="polyfempy",
81-
version="0.4",
86+
version="0.5",
8287
author="Teseo Schneider",
8388
author_email="",
8489
description="Polyfem Python Bindings",

0 commit comments

Comments
 (0)