mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 06:34:09 +00:00 
			
		
		
		
	Avoid importing pip
pip doesn't have a stable Python API and shouldn't be `import`ed. `pkg_resources` is provided by setuptools.
This commit is contained in:
		
							
								
								
									
										4
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								setup.py
									
									
									
									
									
								
							| @@ -1,10 +1,10 @@ | ||||
| #!/usr/bin/env python | ||||
| from setuptools import setup, find_packages | ||||
| import pip | ||||
| import pkg_resources | ||||
| import sys | ||||
| import os | ||||
|  | ||||
| if int(pip.__version__.split('.')[0]) < 6: | ||||
| if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6: | ||||
|     print('pip older than 6.0 not supported, please upgrade pip with:\n\n' | ||||
|           '    pip install -U pip') | ||||
|     sys.exit(-1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user