Bug 1196253 - update in-tree psutil to 3.1.1. r=gps

This commit is contained in:
Joel Maher
2015-08-20 08:03:31 -04:00
parent e27f1455ab
commit 6fabf5a7a3
73 changed files with 6544 additions and 3863 deletions

View File

@@ -14,29 +14,17 @@
import datetime
import os
import sys
if sys.version_info >= (3, ):
def u(s):
return s
else:
def u(s):
if not isinstance(s, unicode): # NOQA
s = unicode(s, "unicode_escape") # NOQA
return s
PROJECT_NAME = u("psutil")
AUTHOR = u("Giampaolo Rodola'")
PROJECT_NAME = "psutil"
AUTHOR = "Giampaolo Rodola'"
THIS_YEAR = str(datetime.datetime.now().year)
HERE = os.path.abspath(os.path.dirname(__file__))
def get_version():
INIT = os.path.abspath(os.path.join(HERE, '../psutil/__init__.py'))
f = open(INIT, 'r')
try:
with open(INIT, 'r') as f:
for line in f:
if line.startswith('__version__'):
ret = eval(line.strip().split(' = ')[1])
@@ -46,8 +34,6 @@ def get_version():
return ret
else:
raise ValueError("couldn't find version string")
finally:
f.close()
VERSION = get_version()
@@ -77,7 +63,7 @@ master_doc = 'index'
# General information about the project.
project = PROJECT_NAME
copyright = u('2009-%s, %s' % (THIS_YEAR, AUTHOR))
copyright = '2009-%s, %s' % (THIS_YEAR, AUTHOR)
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -223,7 +209,7 @@ htmlhelp_basename = '%s-doc' % PROJECT_NAME
# [howto/manual]).
latex_documents = [
('index', '%s.tex' % PROJECT_NAME,
u('%s documentation') % PROJECT_NAME, AUTHOR),
'%s documentation' % PROJECT_NAME, AUTHOR),
]
# The name of an image file (relative to this directory) to place at
@@ -255,7 +241,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', PROJECT_NAME, u('%s documentation') % PROJECT_NAME, [AUTHOR], 1)
('index', PROJECT_NAME, '%s documentation' % PROJECT_NAME, [AUTHOR], 1)
]
# If true, show URL addresses after external links.