Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
830caf97
G
glances
项目概览
蜕变的菜鸟
/
glances
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
glances
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
830caf97
编写于
5月 23, 2016
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Drop Python 2.6 support #300
上级
d1f9d30a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
25 deletion
+21
-25
NEWS
NEWS
+2
-2
README.rst
README.rst
+7
-1
glances/__init__.py
glances/__init__.py
+6
-9
glances/compat.py
glances/compat.py
+2
-7
setup.py
setup.py
+4
-6
未找到文件。
NEWS
浏览文件 @
830caf97
...
...
@@ -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
=============
...
...
README.rst
浏览文件 @
830caf97
...
...
@@ -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
============
...
...
glances/__init__.py
浏览文件 @
830caf97
...
...
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
# Copyright (C) 201
5
Nicolargo <nicolas@nicolargo.com>
# Copyright (C) 201
6
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
)
...
...
glances/compat.py
浏览文件 @
830caf97
...
...
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
# Copyright (C) 201
5
Nicolargo <nicolas@nicolargo.com>
# Copyright (C) 201
6
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
setup.py
浏览文件 @
830caf97
...
...
@@ -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'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录