mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Fixed the library extension when distutils build_ext is used inplace
This commit is contained in:
		
							parent
							
								
									5605416100
								
							
						
					
					
						commit
						fcc7f039ec
					
				
					 3 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -649,7 +649,8 @@ def get_ext_fullpath(self, ext_name):
 | 
			
		|||
            base = modpath[-1]
 | 
			
		||||
            build_py = self.get_finalized_command('build_py')
 | 
			
		||||
            package_dir = os.path.abspath(build_py.get_package_dir(package))
 | 
			
		||||
            return os.path.join(package_dir, base)
 | 
			
		||||
            filename = self.get_ext_filename(ext_name)
 | 
			
		||||
            return os.path.join(package_dir, filename)
 | 
			
		||||
        else:
 | 
			
		||||
            filename = self.get_ext_filename(ext_name)
 | 
			
		||||
            return os.path.join(self.build_lib, filename)
 | 
			
		||||
| 
						 | 
				
			
			@ -663,12 +664,11 @@ def get_ext_fullname(self, ext_name):
 | 
			
		|||
        else:
 | 
			
		||||
            return self.package + '.' + ext_name
 | 
			
		||||
 | 
			
		||||
    def get_ext_filename (self, ext_name):
 | 
			
		||||
    def get_ext_filename(self, ext_name):
 | 
			
		||||
        r"""Convert the name of an extension (eg. "foo.bar") into the name
 | 
			
		||||
        of the file from which it will be loaded (eg. "foo/bar.so", or
 | 
			
		||||
        "foo\bar.pyd").
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        from distutils.sysconfig import get_config_var
 | 
			
		||||
        ext_path = string.split(ext_name, '.')
 | 
			
		||||
        # OS/2 has an 8 character module (extension) limit :-(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue