diff --git a/.github/workflows/bindings.yml b/.github/workflows/bindings.yml index bb1cc520..179f3564 100644 --- a/.github/workflows/bindings.yml +++ b/.github/workflows/bindings.yml @@ -69,7 +69,7 @@ jobs: submodules: recursive - uses: ilammy/msvc-dev-cmd@v1 - name: Build wheels - uses: pypa/cibuildwheel@v2.3.1 + uses: pypa/cibuildwheel@v2.4.0 - uses: actions/upload-artifact@v2 with: path: ./wheelhouse/*.whl diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c761951..bc586470 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14...3.22) project(ddsim LANGUAGES CXX - VERSION 1.11.2 + VERSION 1.11.3 DESCRIPTION "DDSIM - A JKQ quantum simulator based on decision diagrams" ) @@ -11,6 +11,8 @@ option(COVERAGE "Configure for coverage report generation") option(BINDINGS "Configure for building Python bindings") option(DEPLOY "Configure for deployment") +message("-- Generator is set to ${CMAKE_GENERATOR}") + if (DEFINED ENV{DEPLOY}) set(DEPLOY $ENV{DEPLOY} CACHE BOOL "Use deployment configuration from environment" FORCE) message(STATUS "Setting deployment configuration to '${DEPLOY}' from environment") diff --git a/MANIFEST.in b/MANIFEST.in index 42b0788b..799b41b2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,9 @@ include include/* include apps/* graft jkq/* graft mqt/* +global-exclude __pycache__/ +global-exclude *.py[cod] +global-exclude *.so # Include relevant files from other JKQ projects include extern/qfr/CMakeLists.txt @@ -17,6 +20,9 @@ graft extern/qfr/extern/dd_package/include graft extern/qfr/extern/json prune extern/qfr/extern/json/doc prune extern/qfr/extern/json/test +prune extern/qfr/extern/json/benchmarks +prune extern/qfr/extern/json/third_party +prune extern/qfr/extern/json/include graft extern/qfr/extern/pybind11 prune extern/qfr/extern/pybind11/docs @@ -28,5 +34,13 @@ prune extern/qfr/extern/pybind11_json/test graft extern/taskflow prune extern/taskflow/docs prune extern/taskflow/image +prune extern/taskflow/benchmarks +prune extern/taskflow/doxygen +prune extern/taskflow/3rd-party +prune extern/taskflow/tfprof +prune extern/taskflow/sandbox +prune extern/taskflow/unittests +prune extern/taskflow/examples graft extern/cxxopts +prune extern/cxxopts/test diff --git a/pyproject.toml b/pyproject.toml index e93778a4..38da741d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,15 @@ [build-system] -requires = ["setuptools", "wheel", "cmake"] +requires = [ + "setuptools>=45", + "wheel>=0.37", + "ninja>=1.10; sys_platform != 'win32'", + "cmake>=3.14", +] build-backend = "setuptools.build_meta" [tool.cibuildwheel] build = "cp3*" -skip = "*-win32 *-musllinux_i686 *-manylinux_i686" +archs = "auto64" test-skip = "*_arm64 *-musllinux_x86_64 *_universal2:arm64" test-command = "python -c \"from mqt import ddsim\"" test-requires = ["qiskit-terra"] diff --git a/setup.py b/setup.py index d7e8dc29..57621910 100644 --- a/setup.py +++ b/setup.py @@ -16,16 +16,6 @@ def __init__(self, name, sourcedir='', namespace=''): class CMakeBuild(build_ext): - def run(self): - try: - subprocess.check_output(['cmake', '--version']) - except OSError: - raise RuntimeError("CMake must be installed to build the following extensions: " + - ", ".join(e.name for e in self.extensions)) - - for ext in self.extensions: - self.build_extension(ext) - def build_extension(self, ext): extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.namespace+ext.name))) # required for auto-detection of auxiliary "native" libs @@ -35,6 +25,15 @@ def build_extension(self, ext): cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, '-DPYTHON_EXECUTABLE=' + sys.executable, '-DBINDINGS=ON'] + if self.compiler.compiler_type != "msvc": + # Using Ninja-build since it a) is available as a wheel and b) + # multithreads automatically. MSVC would require all variables be + # exported for Ninja to pick it up, which is a little tricky to do. + # Users can override the generator with CMAKE_GENERATOR in CMake + # 3.15+. + cmake_generator = os.environ.get("CMAKE_GENERATOR", "") + if not cmake_generator: + cmake_args += ["-GNinja"] cfg = 'Debug' if self.debug else 'Release' build_args = ['--config', cfg] @@ -75,18 +74,19 @@ def build_extension(self, ext): setup( name='mqt.ddsim', - version='1.11.2', + version='1.11.3', author='Stefan Hillmich', author_email='stefan.hillmich@jku.at', description='MQT DDSIM - A quantum simulator based on decision diagrams written in C++', long_description=README, long_description_content_type='text/markdown', license='MIT', - url='https://iic.jku.at/eda/research/quantum_simulation/', + url='https://www.cda.cit.tum.de/research/quantum_simulation/', ext_modules=[CMakeExtension('pyddsim', namespace='mqt.ddsim.')], - cmdclass=dict(build_ext=CMakeBuild), + cmdclass={"build_ext": CMakeBuild}, zip_safe=False, packages=find_namespace_packages(include=['mqt.*']), + python_requires=">=3.7", classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3', @@ -103,7 +103,7 @@ def build_extension(self, ext): project_urls={ 'Source': 'https://github.com/cda-tum/ddsim/', 'Tracker': 'https://github.com/cda-tum/ddsim/issues', - 'Research': 'https://iic.jku.at/eda/research/quantum_simulation/', + 'Research': 'https://www.cda.cit.tum.de/research/quantum_simulation/', }, extras_require={ "tnflow": ["sparse", "opt-einsum", "quimb", "pandas", "numpy"]