Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
06a54018
Unverified
Commit
06a54018
authored
Oct 29, 2020
by
Henry Schreiner
Committed by
GitHub
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: min macos (#2622)
parent
139c05da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
pybind11/setup_helpers.py
+9
-4
No files found.
pybind11/setup_helpers.py
View file @
06a54018
...
@@ -45,6 +45,7 @@ import shutil
...
@@ -45,6 +45,7 @@ import shutil
import
sys
import
sys
import
tempfile
import
tempfile
import
threading
import
threading
import
platform
import
warnings
import
warnings
try
:
try
:
...
@@ -177,10 +178,14 @@ class Pybind11Extension(_Extension):
...
@@ -177,10 +178,14 @@ class Pybind11Extension(_Extension):
if
MACOS
and
"MACOSX_DEPLOYMENT_TARGET"
not
in
os
.
environ
:
if
MACOS
and
"MACOSX_DEPLOYMENT_TARGET"
not
in
os
.
environ
:
# C++17 requires a higher min version of macOS. An earlier version
# C++17 requires a higher min version of macOS. An earlier version
# can be set manually via environment variable if you are careful
# (10.12 or 10.13) can be set manually via environment variable if
# in your feature usage, but 10.14 is the safest setting for
# you are careful in your feature usage, but 10.14 is the safest
# general use.
# setting for general use. However, never set higher than the
macosx_min
=
"-mmacosx-version-min="
+
(
"10.9"
if
level
<
17
else
"10.14"
)
# current macOS version!
current_macos
=
tuple
(
int
(
x
)
for
x
in
platform
.
mac_ver
()[
0
]
.
split
(
"."
)[:
2
])
desired_macos
=
(
10
,
9
)
if
level
<
17
else
(
10
,
14
)
macos_string
=
"."
.
join
(
str
(
x
)
for
x
in
min
(
current_macos
,
desired_macos
))
macosx_min
=
"-mmacosx-version-min="
+
macos_string
self
.
extra_compile_args
.
append
(
macosx_min
)
self
.
extra_compile_args
.
append
(
macosx_min
)
self
.
extra_link_args
.
append
(
macosx_min
)
self
.
extra_link_args
.
append
(
macosx_min
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment