mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-11 12:47:14 +03:00
Drop Python 2.6 support #300
This commit is contained in:
parent
d1f9d30aae
commit
830caf9703
4
NEWS
4
NEWS
@ -26,8 +26,8 @@ Bugs corrected:
|
||||
|
||||
Deprecated:
|
||||
|
||||
* Python 2.6 is no longer supported
|
||||
* Monitoring process list module is replaced by AMP
|
||||
* Drop Python 2.6 support (issue #300)
|
||||
* Monitoring process list module is replaced by AMP (see issue #780)
|
||||
|
||||
Version 2.6.1
|
||||
=============
|
||||
|
@ -30,7 +30,7 @@ written in Python.
|
||||
Requirements
|
||||
============
|
||||
|
||||
- ``python >= 2.6`` or ``>= 3.3`` (tested with version 2.6, 2.7, 3.3, 3.4, 3.5)
|
||||
- ``python >= 2.7`` or ``>= 3.3`` (tested with version 2.7, 3.3, 3.4, 3.5)
|
||||
- ``psutil >= 2.0.0``
|
||||
- ``setuptools``
|
||||
|
||||
@ -54,6 +54,12 @@ Optional dependencies:
|
||||
- ``py-cpuinfo`` (for the Quicklook CPU info module)
|
||||
- ``scandir`` (for the Folders plugin) [Only for Python < 3.5]
|
||||
|
||||
Note for Python 2.6 users:
|
||||
|
||||
Glances 2.7 (or higher) no longer support Python 2.6. Please upgrade to
|
||||
Python 2.7/3.3+ or downgrade Glances to 2.6.2 (latest version with Python
|
||||
2.6 support).
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is part of Glances.
|
||||
#
|
||||
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
|
||||
# Copyright (C) 2016 Nicolargo <nicolas@nicolargo.com>
|
||||
#
|
||||
# Glances is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -49,16 +49,13 @@ except locale.Error:
|
||||
print("Warning: Unable to set locale. Expect encoding problems.")
|
||||
|
||||
# Check Python version
|
||||
if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3):
|
||||
print('Glances requires at least Python 2.6 or 3.3 to run.')
|
||||
sys.exit(1)
|
||||
|
||||
if sys.version_info[:2] == (2, 6):
|
||||
import warnings
|
||||
warnings.warn('Python 2.6 support will be dropped. Please switch '
|
||||
'to at least Python 2.7 or 3.3+ as soon as possible. '
|
||||
'See http://www.snarky.ca/stop-using-python-2-6 '
|
||||
'for more information.')
|
||||
warnings.warn('Python 2.6 support is dropped. Please switch to at '
|
||||
'least Python 2.7/3.3+ or downgrade to Glances 2.6.2.')
|
||||
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 3):
|
||||
print('Glances requires at least Python 2.7 or 3.3 to run.')
|
||||
sys.exit(1)
|
||||
|
||||
# Check PSutil version
|
||||
psutil_min_version = (2, 0, 0)
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is part of Glances.
|
||||
#
|
||||
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
|
||||
# Copyright (C) 2016 Nicolargo <nicolas@nicolargo.com>
|
||||
#
|
||||
# Glances is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -24,6 +24,7 @@
|
||||
import operator
|
||||
import sys
|
||||
import unicodedata
|
||||
from logging.config import dictConfig
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
@ -128,9 +129,3 @@ else:
|
||||
if isinstance(s, binary_type):
|
||||
return s
|
||||
return s.encode('utf-8', 'replace')
|
||||
|
||||
try:
|
||||
# Python 2.6
|
||||
from logutils.dictconfig import dictConfig
|
||||
except ImportError:
|
||||
from logging.config import dictConfig
|
||||
|
10
setup.py
10
setup.py
@ -5,8 +5,8 @@ import sys
|
||||
|
||||
from setuptools import setup, Command
|
||||
|
||||
if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 3):
|
||||
print('Glances requires at least Python 2.6 or 3.3 to run.')
|
||||
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 3):
|
||||
print('Glances requires at least Python 2.7 or 3.3 to run.')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@ -41,16 +41,15 @@ def get_data_files():
|
||||
|
||||
def get_requires():
|
||||
requires = ['psutil>=2.0.0']
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
requires += ['colorconsole']
|
||||
if sys.version_info[:2] == (2, 6):
|
||||
requires += ['argparse', 'logutils']
|
||||
|
||||
return requires
|
||||
|
||||
setup(
|
||||
name='Glances',
|
||||
version='2.6.1',
|
||||
version='2.7',
|
||||
description="A cross-platform curses-based monitoring tool",
|
||||
long_description=open('README.rst').read(),
|
||||
author='Nicolas Hennion',
|
||||
@ -89,7 +88,6 @@ setup(
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
|
Loading…
Reference in New Issue
Block a user