1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00
thefuck/setup.py

71 lines
2.4 KiB
Python
Raw Permalink Normal View History

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