mirror of
				https://github.com/python/cpython.git
				synced 2025-10-25 18:54:53 +00:00 
			
		
		
		
	Py3k: update OSX installer-generator
This update makes sure that the installer won't write files in /usr/local/bin by default. The installer also won't replace /Library/Frameworks/Python.framework/Version/Current. Both to ensure that the installer doens't break an existing install of python 2.x.
This commit is contained in:
		
							parent
							
								
									2160015915
								
							
						
					
					
						commit
						360e98ca31
					
				
					 2 changed files with 16 additions and 2 deletions
				
			
		|  | @ -184,6 +184,7 @@ def getFullVersion(): | ||||||
|             wrappers for lots of Mac OS X API's. |             wrappers for lots of Mac OS X API's. | ||||||
|         """, |         """, | ||||||
|         postflight="scripts/postflight.framework", |         postflight="scripts/postflight.framework", | ||||||
|  |         selected='selected', | ||||||
|     ), |     ), | ||||||
|     dict( |     dict( | ||||||
|         name="PythonApplications", |         name="PythonApplications", | ||||||
|  | @ -197,6 +198,7 @@ def getFullVersion(): | ||||||
|             It also installs a number of examples and demos. |             It also installs a number of examples and demos. | ||||||
|             """, |             """, | ||||||
|         required=False, |         required=False, | ||||||
|  |         selected='selected', | ||||||
|     ), |     ), | ||||||
|     dict( |     dict( | ||||||
|         name="PythonUnixTools", |         name="PythonUnixTools", | ||||||
|  | @ -208,6 +210,7 @@ def getFullVersion(): | ||||||
|             is not necessary to use MacPython. |             is not necessary to use MacPython. | ||||||
|             """, |             """, | ||||||
|         required=False, |         required=False, | ||||||
|  |         selected='unselected', | ||||||
|     ), |     ), | ||||||
|     dict( |     dict( | ||||||
|         name="PythonDocumentation", |         name="PythonDocumentation", | ||||||
|  | @ -222,6 +225,7 @@ def getFullVersion(): | ||||||
|             """, |             """, | ||||||
|         postflight="scripts/postflight.documentation", |         postflight="scripts/postflight.documentation", | ||||||
|         required=False, |         required=False, | ||||||
|  |         selected='selected', | ||||||
|     ), |     ), | ||||||
|     dict( |     dict( | ||||||
|         name="PythonProfileChanges", |         name="PythonProfileChanges", | ||||||
|  | @ -239,6 +243,7 @@ def getFullVersion(): | ||||||
|         topdir="/Library/Frameworks/Python.framework", |         topdir="/Library/Frameworks/Python.framework", | ||||||
|         source="/empty-dir", |         source="/empty-dir", | ||||||
|         required=False, |         required=False, | ||||||
|  |         selected='unselected', | ||||||
|     ), |     ), | ||||||
|     dict( |     dict( | ||||||
|         name="PythonSystemFixes", |         name="PythonSystemFixes", | ||||||
|  | @ -252,6 +257,7 @@ def getFullVersion(): | ||||||
|         topdir="/Library/Frameworks/Python.framework", |         topdir="/Library/Frameworks/Python.framework", | ||||||
|         source="/empty-dir", |         source="/empty-dir", | ||||||
|         required=False, |         required=False, | ||||||
|  |         selected='unselected', | ||||||
|     ) |     ) | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
|  | @ -650,6 +656,8 @@ def buildPython(): | ||||||
|     frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework') |     frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework') | ||||||
|     gid = grp.getgrnam('admin').gr_gid |     gid = grp.getgrnam('admin').gr_gid | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     for dirpath, dirnames, filenames in os.walk(frmDir): |     for dirpath, dirnames, filenames in os.walk(frmDir): | ||||||
|         for dn in dirnames: |         for dn in dirnames: | ||||||
|             os.chmod(os.path.join(dirpath, dn), 0775) |             os.chmod(os.path.join(dirpath, dn), 0775) | ||||||
|  | @ -696,6 +704,11 @@ def buildPython(): | ||||||
| 
 | 
 | ||||||
|     os.chdir(curdir) |     os.chdir(curdir) | ||||||
| 
 | 
 | ||||||
|  |     # Remove the 'Current' link, that way we don't accidently mess with an already installed | ||||||
|  |     # version of python | ||||||
|  |     os.unlink(os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework', 'Versions', 'Current')) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def patchFile(inPath, outPath): | def patchFile(inPath, outPath): | ||||||
|  | @ -830,7 +843,7 @@ def makeMpkgPlist(path): | ||||||
|             IFPkgFlagPackageList=[ |             IFPkgFlagPackageList=[ | ||||||
|                 dict( |                 dict( | ||||||
|                     IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()), |                     IFPkgFlagPackageLocation='%s-%s.pkg'%(item['name'], getVersion()), | ||||||
|                     IFPkgFlagPackageSelection='selected' |                     IFPkgFlagPackageSelection=item['selected'], | ||||||
|                 ) |                 ) | ||||||
|                 for item in PKG_RECIPES |                 for item in PKG_RECIPES | ||||||
|             ], |             ], | ||||||
|  |  | ||||||
|  | @ -16,4 +16,5 @@ See the ReadMe file for more information.\ | ||||||
| \ | \ | ||||||
| 
 | 
 | ||||||
| \b NOTE:  | \b NOTE:  | ||||||
| \b0 This package will by default update your shell profile to ensure that this version of Python is on the search path of your shell. Please deselect the "Shell profile updater" package on the package customization screen  if you want to avoid this modification. } | \b0 This package will by default update not your shell profile, and will also not install\ | ||||||
|  | files in /usr/local. } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ronald Oussoren
						Ronald Oussoren