From 2b9269f4bbac801d812d31902cc2ac56684272f3 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Tue, 12 Jul 2022 10:23:29 -0700 Subject: [PATCH 1/9] sanity check --- .github/workflows/testing_wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing_wheels.yml b/.github/workflows/testing_wheels.yml index 95271dad1..34c815e19 100644 --- a/.github/workflows/testing_wheels.yml +++ b/.github/workflows/testing_wheels.yml @@ -20,18 +20,18 @@ jobs: - os: macos-10.15 name: mac cibw: - build: "cp36* cp37* cp38* cp39* cp310*" + build: "cp310*" - os: ubuntu-20.04 name: manylinux2014 cibw: arch: x86_64 - build: "cp36* cp37* cp38* cp39* cp310*" + build: "cp310*" manylinux_image: manylinux2014 - os: windows-2019 name: win_amd64 architecture: x64 cibw: - build: "cp36-win_amd64 cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64" + build: "cp310-win_amd64" env: CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" From 52ef965bd780ec04b03e81063e86b99755833455 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Tue, 12 Jul 2022 10:56:02 -0700 Subject: [PATCH 2/9] cibw to 2.2.2 --- .github/workflows/testing_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing_wheels.yml b/.github/workflows/testing_wheels.yml index 34c815e19..36f3b1c9a 100644 --- a/.github/workflows/testing_wheels.yml +++ b/.github/workflows/testing_wheels.yml @@ -51,7 +51,7 @@ jobs: - uses: actions/setup-python@v2 - name: Install cibuildwheel and twine - run: python -m pip install cibuildwheel==2.0.1 + run: python -m pip install cibuildwheel==2.2.2 - name: Run C++ tests run: bash build_tools/test_libs.sh From fa25c2928563a1196d499893182378a2fc7e8640 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Tue, 12 Jul 2022 12:55:48 -0700 Subject: [PATCH 3/9] Enforce numpy 1.16.5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0a95d64c7..5ef5ac53b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ absl-py cirq-core -numpy~=1.16 +numpy==1.16.5 pybind11 typing_extensions From c87f9c5eb4bb6bd8abe0f3e18bba18daa5ce9689 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:56:41 -0700 Subject: [PATCH 4/9] Bump numpy to 1.21+ --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5ef5ac53b..981f22a27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ absl-py cirq-core -numpy==1.16.5 +numpy~=1.21 pybind11 typing_extensions From b7c2137e4cbe78d5c09b54e82d489603376639c1 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:19:48 -0700 Subject: [PATCH 5/9] skip musllinux, add DMS_WIN64 --- .github/workflows/release_wheels.yml | 1 + .github/workflows/testing_wheels.yml | 1 + setup.py | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_wheels.yml b/.github/workflows/release_wheels.yml index 26ac79c2c..ec0d11a07 100644 --- a/.github/workflows/release_wheels.yml +++ b/.github/workflows/release_wheels.yml @@ -29,6 +29,7 @@ jobs: build: "cp36-win_amd64 cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64" env: CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" + CIBW_SKIP: "*musllinux*" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}" CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm" diff --git a/.github/workflows/testing_wheels.yml b/.github/workflows/testing_wheels.yml index 36f3b1c9a..a28896675 100644 --- a/.github/workflows/testing_wheels.yml +++ b/.github/workflows/testing_wheels.yml @@ -34,6 +34,7 @@ jobs: build: "cp310-win_amd64" env: CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" + CIBW_SKIP: "*musllinux*" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}" CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm" diff --git a/setup.py b/setup.py index 10c7aa158..74adddadb 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,7 @@ def build_extension(self, ext): ] if sys.maxsize > 2**32: cmake_args += ["-A", "x64"] + env["CXXFLAGS"] += " -DMS_WIN64" build_args += ["--", "/m"] else: cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] @@ -64,9 +65,7 @@ def build_extension(self, ext): ] env = os.environ.copy() - env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( - env.get("CXXFLAGS", ""), self.distribution.get_version() - ) + env["CXXFLAGS"] += f' -DVERSION_INFO=\\"{self.distribution.get_version()}\\"' if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) subprocess.check_call( From ec5d2ba399252772df3ce18d643b9a8941e2c44b Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:25:50 -0700 Subject: [PATCH 6/9] don't assume cxxflags exists --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 74adddadb..b064d51f7 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ def build_extension(self, ext): ] if sys.maxsize > 2**32: cmake_args += ["-A", "x64"] - env["CXXFLAGS"] += " -DMS_WIN64" + env["CXXFLAGS"] = f'{env.get("CXXFLAGS", "")} -DMS_WIN64' build_args += ["--", "/m"] else: cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] @@ -65,7 +65,9 @@ def build_extension(self, ext): ] env = os.environ.copy() - env["CXXFLAGS"] += f' -DVERSION_INFO=\\"{self.distribution.get_version()}\\"' + env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( + env.get("CXXFLAGS", ""), self.distribution.get_version() + ) if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) subprocess.check_call( From a5dc10de018c4b619d6cb0dbc655e4bfa37d5a76 Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 13 Jul 2022 09:47:48 -0700 Subject: [PATCH 7/9] get env before using it --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b064d51f7..95ff8741a 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ def build_extension(self, ext): cfg = "Debug" if self.debug else "Release" build_args = ["--config", cfg] + env = os.environ.copy() if platform.system() == "Windows": cmake_args += [ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir) @@ -64,7 +65,6 @@ def build_extension(self, ext): "-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++", ] - env = os.environ.copy() env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( env.get("CXXFLAGS", ""), self.distribution.get_version() ) From f673b56564d5481b7251c66246cbff945021a2ba Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:15:19 -0700 Subject: [PATCH 8/9] drop MS_WIN64 flag and bump pybind version --- requirements.txt | 2 +- setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 981f22a27..4ef4a1b99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ absl-py cirq-core numpy~=1.21 -pybind11 +pybind11~=2.8 typing_extensions diff --git a/setup.py b/setup.py index 95ff8741a..10c7aa158 100644 --- a/setup.py +++ b/setup.py @@ -46,14 +46,12 @@ def build_extension(self, ext): cfg = "Debug" if self.debug else "Release" build_args = ["--config", cfg] - env = os.environ.copy() if platform.system() == "Windows": cmake_args += [ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir) ] if sys.maxsize > 2**32: cmake_args += ["-A", "x64"] - env["CXXFLAGS"] = f'{env.get("CXXFLAGS", "")} -DMS_WIN64' build_args += ["--", "/m"] else: cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] @@ -65,6 +63,7 @@ def build_extension(self, ext): "-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++", ] + env = os.environ.copy() env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( env.get("CXXFLAGS", ""), self.distribution.get_version() ) From 561305b688a8c90124260baaef25907768023dfd Mon Sep 17 00:00:00 2001 From: Orion Martin <40585662+95-martin-orion@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:22:01 -0700 Subject: [PATCH 9/9] no, the other pybind --- pybind_interface/GetPybind11.cmake | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pybind_interface/GetPybind11.cmake b/pybind_interface/GetPybind11.cmake index f93c2bf61..e60d20daf 100644 --- a/pybind_interface/GetPybind11.cmake +++ b/pybind_interface/GetPybind11.cmake @@ -1,6 +1,6 @@ include(FetchContent) -set(MIN_PYBIND_VERSION "2.2.4") +set(MIN_PYBIND_VERSION "2.8.1") FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11 diff --git a/requirements.txt b/requirements.txt index 4ef4a1b99..981f22a27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ absl-py cirq-core numpy~=1.21 -pybind11~=2.8 +pybind11 typing_extensions