@@ -16,16 +16,6 @@ def __init__(self, name, sourcedir='', namespace=''):
1616
1717
1818class CMakeBuild (build_ext ):
19- def run (self ):
20- try :
21- subprocess .check_output (['cmake' , '--version' ])
22- except OSError :
23- raise RuntimeError ("CMake must be installed to build the following extensions: " +
24- ", " .join (e .name for e in self .extensions ))
25-
26- for ext in self .extensions :
27- self .build_extension (ext )
28-
2919 def build_extension (self , ext ):
3020 extdir = os .path .abspath (os .path .dirname (self .get_ext_fullpath (ext .namespace + ext .name )))
3121 # required for auto-detection of auxiliary "native" libs
@@ -35,6 +25,15 @@ def build_extension(self, ext):
3525 cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir ,
3626 '-DPYTHON_EXECUTABLE=' + sys .executable ,
3727 '-DBINDINGS=ON' ]
28+ if self .compiler .compiler_type != "msvc" :
29+ # Using Ninja-build since it a) is available as a wheel and b)
30+ # multithreads automatically. MSVC would require all variables be
31+ # exported for Ninja to pick it up, which is a little tricky to do.
32+ # Users can override the generator with CMAKE_GENERATOR in CMake
33+ # 3.15+.
34+ cmake_generator = os .environ .get ("CMAKE_GENERATOR" , "" )
35+ if not cmake_generator :
36+ cmake_args += ["-GNinja" ]
3837
3938 cfg = 'Debug' if self .debug else 'Release'
4039 build_args = ['--config' , cfg ]
@@ -75,18 +74,19 @@ def build_extension(self, ext):
7574
7675setup (
7776 name = 'mqt.ddsim' ,
78- version = '1.11.2 ' ,
77+ version = '1.11.3 ' ,
7978 author = 'Stefan Hillmich' ,
8079 author_email = 'stefan.hillmich@jku.at' ,
8180 description = 'MQT DDSIM - A quantum simulator based on decision diagrams written in C++' ,
8281 long_description = README ,
8382 long_description_content_type = 'text/markdown' ,
8483 license = 'MIT' ,
85- url = 'https://iic.jku.at/eda /research/quantum_simulation/' ,
84+ url = 'https://www.cda.cit.tum.de /research/quantum_simulation/' ,
8685 ext_modules = [CMakeExtension ('pyddsim' , namespace = 'mqt.ddsim.' )],
87- cmdclass = dict ( build_ext = CMakeBuild ) ,
86+ cmdclass = { " build_ext" : CMakeBuild } ,
8887 zip_safe = False ,
8988 packages = find_namespace_packages (include = ['mqt.*' ]),
89+ python_requires = ">=3.7" ,
9090 classifiers = [
9191 'Development Status :: 4 - Beta' ,
9292 'Programming Language :: Python :: 3' ,
@@ -103,7 +103,7 @@ def build_extension(self, ext):
103103 project_urls = {
104104 'Source' : 'https://github.com/cda-tum/ddsim/' ,
105105 'Tracker' : 'https://github.com/cda-tum/ddsim/issues' ,
106- 'Research' : 'https://iic.jku.at/eda /research/quantum_simulation/' ,
106+ 'Research' : 'https://www.cda.cit.tum.de /research/quantum_simulation/' ,
107107 },
108108 extras_require = {
109109 "tnflow" : ["sparse" , "opt-einsum" , "quimb" , "pandas" , "numpy" ]
0 commit comments