File tree 2 files changed +7
-17
lines changed
2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -281,25 +281,9 @@ def get_config_h_filename():
281
281
282
282
283
283
284
- # Allow this value to be patched by pkgsrc. Ref pypa/distutils#16.
285
- _makefile_tmpl = 'config-{python_ver}{build_flags}{multiarch}'
286
-
287
-
288
284
def get_makefile_filename ():
289
285
"""Return full pathname of installed Makefile from the Python build."""
290
- if python_build :
291
- return os .path .join (_sys_home or project_base , "Makefile" )
292
- lib_dir = get_python_lib (plat_specific = 0 , standard_lib = 1 )
293
- multiarch = (
294
- '-%s' % sys .implementation ._multiarch
295
- if hasattr (sys .implementation , '_multiarch' ) else ''
296
- )
297
- config_file = _makefile_tmpl .format (
298
- python_ver = get_python_version (),
299
- build_flags = build_flags ,
300
- multiarch = multiarch ,
301
- )
302
- return os .path .join (lib_dir , config_file , 'Makefile' )
286
+ return sysconfig .get_makefile_filename ()
303
287
304
288
305
289
def parse_config_h (fp , g = None ):
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ def test_get_config_h_filename(self):
38
38
config_h = sysconfig .get_config_h_filename ()
39
39
self .assertTrue (os .path .isfile (config_h ), config_h )
40
40
41
+ @unittest .skipIf (sys .platform == 'win32' ,
42
+ 'Makefile only exists on Unix like systems' )
43
+ def test_get_makefile_filename (self ):
44
+ makefile = sysconfig .get_makefile_filename ()
45
+ self .assertTrue (os .path .isfile (makefile ), makefile )
46
+
41
47
def test_get_python_lib (self ):
42
48
# XXX doesn't work on Linux when Python was never installed before
43
49
#self.assertTrue(os.path.isdir(lib_dir), lib_dir)
You can’t perform that action at this time.
0 commit comments