mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
[SF bug 620364]
In build_extensions(), don't proceed if srcdir is None. Probably somebody who tried this on Windows. :-)
This commit is contained in:
parent
5357c6511d
commit
e0fea6c4ed
1 changed files with 3 additions and 0 deletions
3
setup.py
3
setup.py
|
@ -86,6 +86,9 @@ class PyBuildExt(build_ext):
|
|||
# Fix up the autodetected modules, prefixing all the source files
|
||||
# with Modules/ and adding Python's include directory to the path.
|
||||
(srcdir,) = sysconfig.get_config_vars('srcdir')
|
||||
if not srcdir:
|
||||
# Maybe running on Windows but not using CYGWIN?
|
||||
raise ValueError("No source directory; cannot proceed.")
|
||||
|
||||
# Figure out the location of the source code for extension modules
|
||||
moddir = os.path.join(os.getcwd(), srcdir, 'Modules')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue