Skip to content

Commit

Permalink
Merge branch 'master' into fix-common-typos
Browse files Browse the repository at this point in the history
  • Loading branch information
pavoljuhas committed Jan 24, 2024
2 parents 1a440e6 + 5d5e34a commit 35bf00b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cirq-core~=1.0
numpy~=1.16
pybind11
typing_extensions
setuptools
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion


class CMakeExtension(Extension):
Expand All @@ -27,10 +26,12 @@ def run(self):
)

if platform.system() == "Windows":
cmake_version = LooseVersion(
from packaging.version import parse

cmake_version = parse(
re.search(r"version\s*([\d.]+)", out.decode()).group(1)
)
if cmake_version < "3.1.0":
if cmake_version < parse("3.1.0"):
raise RuntimeError("CMake >= 3.1.0 is required on Windows")

for ext in self.extensions:
Expand Down Expand Up @@ -116,6 +117,7 @@ def build_extension(self, ext):
author_email="[email protected]",
python_requires=">=3.7.0,<3.12.0",
install_requires=requirements,
setup_requires=["packaging"],
extras_require={
"dev": dev_requirements,
},
Expand Down

0 comments on commit 35bf00b

Please sign in to comment.