File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,11 @@ def finalize_options(self):
160160 if isinstance (self .include_dirs , str ):
161161 self .include_dirs = self .include_dirs .split (os .pathsep )
162162
163+ # If in a virtualenv, add its include directory
164+ # Issue 16116
165+ if sys .exec_prefix != sys .base_exec_prefix :
166+ self .include_dirs .append (os .path .join (sys .exec_prefix , 'include' ))
167+
163168 # Put the Python "system" include dir at the end, so that
164169 # any local include dirs take precedence.
165170 self .include_dirs .append (py_include )
@@ -190,6 +195,8 @@ def finalize_options(self):
190195 # must be the *native* platform. But we don't really support
191196 # cross-compiling via a binary install anyway, so we let it go.
192197 self .library_dirs .append (os .path .join (sys .exec_prefix , 'libs' ))
198+ if sys .base_exec_prefix != sys .prefix : # Issue 16116
199+ self .library_dirs .append (os .path .join (sys .base_exec_prefix , 'libs' ))
193200 if self .debug :
194201 self .build_temp = os .path .join (self .build_temp , "Debug" )
195202 else :
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ Core and Builtins
4646Library
4747-------
4848
49+ - Issue #16116: Fix include and library paths to be correctwhen building C
50+ extensions in venvs.
51+
4952- Issue #16245: Fix the value of a few entities in html.entities.html5.
5053
5154- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
You can’t perform that action at this time.
0 commit comments