mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
simplified the fallback case
This commit is contained in:
parent
fbf50b8c7c
commit
7e48ff8e50
1 changed files with 3 additions and 4 deletions
|
@ -19,11 +19,10 @@ ALREADY_TESTED = False
|
|||
|
||||
def _get_source_filename():
|
||||
srcdir = sysconfig.get_config_var('srcdir')
|
||||
xxmodule = os.path.join(srcdir, 'Modules', 'xxmodule.c')
|
||||
if not os.path.exists(xxmodule):
|
||||
if srcdir is None:
|
||||
# local fallback
|
||||
xxmodule = os.path.join(os.path.dirname(__file__), 'xxmodule.c')
|
||||
return xxmodule
|
||||
return os.path.join(os.path.dirname(__file__), 'xxmodule.c')
|
||||
return os.path.join(srcdir, 'Modules', 'xxmodule.c')
|
||||
|
||||
class BuildExtTestCase(support.TempdirManager,
|
||||
support.LoggingSilencer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue