mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	Keep working if pip isn't installed
This might be installed by invoking setup.py directly.
This commit is contained in:
		
							
								
								
									
										11
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								setup.py
									
									
									
									
									
								
							| @@ -4,10 +4,13 @@ import pkg_resources | |||||||
| import sys | import sys | ||||||
| import os | import os | ||||||
|  |  | ||||||
| if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6: | try: | ||||||
|     print('pip older than 6.0 not supported, please upgrade pip with:\n\n' |     if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6: | ||||||
|           '    pip install -U pip') |         print('pip older than 6.0 not supported, please upgrade pip with:\n\n' | ||||||
|     sys.exit(-1) |               '    pip install -U pip') | ||||||
|  |         sys.exit(-1) | ||||||
|  | except pkg_resources.DistributionNotFound: | ||||||
|  |     pass | ||||||
|  |  | ||||||
| if os.environ.get('CONVERT_README'): | if os.environ.get('CONVERT_README'): | ||||||
|     import pypandoc |     import pypandoc | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user