2015-07-01 07:37:41 +05:30
|
|
|
#!/usr/bin/env python
|
2015-04-08 18:15:49 +02:00
|
|
|
from setuptools import setup, find_packages
|
2016-06-28 21:48:06 -07:00
|
|
|
import pkg_resources
|
2015-07-04 11:55:28 -03:00
|
|
|
import sys
|
2015-07-27 23:31:06 +03:00
|
|
|
import os
|
2017-08-21 11:32:23 +02:00
|
|
|
import fastentrypoints
|
|
|
|
|
2015-04-08 18:15:49 +02:00
|
|
|
|
2016-06-28 21:50:06 -07:00
|
|
|
try:
|
|
|
|
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)
|
|
|
|
except pkg_resources.DistributionNotFound:
|
|
|
|
pass
|
2016-02-12 20:11:08 +03:00
|
|
|
|
2015-07-27 23:31:06 +03:00
|
|
|
if os.environ.get('CONVERT_README'):
|
2015-07-27 23:23:26 +03:00
|
|
|
import pypandoc
|
|
|
|
|
|
|
|
long_description = pypandoc.convert('README.md', 'rst')
|
2015-07-27 23:31:06 +03:00
|
|
|
else:
|
|
|
|
long_description = ''
|
2015-07-27 23:23:26 +03:00
|
|
|
|
2015-07-26 23:47:56 +05:30
|
|
|
version = sys.version_info[:2]
|
|
|
|
if version < (2, 7):
|
2015-07-07 16:39:21 +03:00
|
|
|
print('thefuck requires Python version 2.7 or later' +
|
2015-07-26 23:47:56 +05:30
|
|
|
' ({}.{} detected).'.format(*version))
|
2015-07-01 07:37:41 +05:30
|
|
|
sys.exit(-1)
|
2019-12-16 21:55:19 +01:00
|
|
|
elif (3, 0) < version < (3, 5):
|
|
|
|
print('thefuck requires Python version 3.5 or later' +
|
2015-07-26 23:47:56 +05:30
|
|
|
' ({}.{} detected).'.format(*version))
|
2015-07-01 07:37:41 +05:30
|
|
|
sys.exit(-1)
|
2015-04-08 18:15:49 +02:00
|
|
|
|
2021-06-09 21:50:44 +02:00
|
|
|
VERSION = '3.31'
|
2015-04-21 22:30:15 +02:00
|
|
|
|
2017-08-25 11:44:07 +02:00
|
|
|
install_requires = ['psutil', 'colorama', 'six', 'decorator', 'pyte']
|
2016-05-12 17:17:17 +02:00
|
|
|
extras_require = {':python_version<"3.4"': ['pathlib2'],
|
2017-08-26 06:20:52 +02:00
|
|
|
':python_version<"3.3"': ['backports.shutil_get_terminal_size'],
|
2021-04-17 14:51:18 +02:00
|
|
|
':python_version<="2.7"': ['decorator<5'],
|
2015-12-01 20:15:27 +08:00
|
|
|
":sys_platform=='win32'": ['win_unicode_console']}
|
2015-04-21 22:30:15 +02:00
|
|
|
|
2015-04-08 18:15:49 +02:00
|
|
|
setup(name='thefuck',
|
2015-04-21 22:30:15 +02:00
|
|
|
version=VERSION,
|
2015-04-08 18:19:01 +02:00
|
|
|
description="Magnificent app which corrects your previous console command",
|
2015-07-27 23:23:26 +03:00
|
|
|
long_description=long_description,
|
2015-04-08 18:19:01 +02:00
|
|
|
author='Vladimir Iakovlev',
|
|
|
|
author_email='nvbn.rm@gmail.com',
|
|
|
|
url='https://github.com/nvbn/thefuck',
|
|
|
|
license='MIT',
|
2015-04-21 22:30:15 +02:00
|
|
|
packages=find_packages(exclude=['ez_setup', 'examples',
|
2016-01-22 13:47:31 +01:00
|
|
|
'tests', 'tests.*', 'release']),
|
2015-04-08 18:15:49 +02:00
|
|
|
include_package_data=True,
|
|
|
|
zip_safe=False,
|
2015-07-04 12:24:09 -03:00
|
|
|
install_requires=install_requires,
|
2015-07-17 18:37:49 +02:00
|
|
|
extras_require=extras_require,
|
2015-04-08 18:15:49 +02:00
|
|
|
entry_points={'console_scripts': [
|
2017-09-02 09:30:03 +02:00
|
|
|
'thefuck = thefuck.entrypoints.main:main',
|
|
|
|
'fuck = thefuck.entrypoints.not_configured:main']})
|