1#!/usr/bin/env python 2from setuptools import setup, find_packages 3import pkg_resources 4import sys 5import os 6import fastentrypoints 7 8 9try: 10 if int(pkg_resources.get_distribution("pip").version.split('.')[0]) < 6: 11 print('pip older than 6.0 not supported, please upgrade pip with:\n\n' 12 ' pip install -U pip') 13 sys.exit(-1) 14except pkg_resources.DistributionNotFound: 15 pass 16 17if os.environ.get('CONVERT_README'): 18 import pypandoc 19 20 long_description = pypandoc.convert('README.md', 'rst') 21else: 22 long_description = '' 23 24version = sys.version_info[:2] 25if version < (2, 7): 26 print('thefuck requires Python version 2.7 or later' + 27 ' ({}.{} detected).'.format(*version)) 28 sys.exit(-1) 29elif (3, 0) < version < (3, 5): 30 print('thefuck requires Python version 3.5 or later' + 31 ' ({}.{} detected).'.format(*version)) 32 sys.exit(-1) 33 34VERSION = '3.31' 35 36install_requires = ['psutil', 'colorama', 'six', 'decorator', 'pyte'] 37extras_require = {':python_version<"3.4"': ['pathlib2'], 38 ':python_version<"3.3"': ['backports.shutil_get_terminal_size'], 39 ':python_version<="2.7"': ['decorator<5'], 40 ":sys_platform=='win32'": ['win_unicode_console']} 41 42setup(name='thefuck', 43 version=VERSION, 44 description="Magnificent app which corrects your previous console command", 45 long_description=long_description, 46 author='Vladimir Iakovlev', 47 author_email='nvbn.rm@gmail.com', 48 url='https://github.com/nvbn/thefuck', 49 license='MIT', 50 packages=find_packages(exclude=['ez_setup', 'examples', 51 'tests', 'tests.*', 'release']), 52 include_package_data=True, 53 zip_safe=False, 54 install_requires=install_requires, 55 extras_require=extras_require, 56 entry_points={'console_scripts': [ 57 'thefuck = thefuck.entrypoints.main:main', 58 'fuck = thefuck.entrypoints.not_configured:main']}) 59