diff --git a/doc/source/whatsnew/v1.2.1.rst b/doc/source/whatsnew/v1.2.1.rst index 37562be17f02e..649b17e255f3d 100644 --- a/doc/source/whatsnew/v1.2.1.rst +++ b/doc/source/whatsnew/v1.2.1.rst @@ -41,7 +41,7 @@ I/O Other ~~~~~ -- +- Fixed build failure on MacOS 11 in Python 3.9.1 (:issue:`38766`) - .. --------------------------------------------------------------------------- diff --git a/setup.py b/setup.py index a25fe95e025b3..f9c4a1158fee0 100755 --- a/setup.py +++ b/setup.py @@ -435,7 +435,7 @@ def run(self): "MACOSX_DEPLOYMENT_TARGET", current_system ) if ( - LooseVersion(python_target) < "10.9" + LooseVersion(str(python_target)) < "10.9" and LooseVersion(current_system) >= "10.9" ): os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.9"