# HG changeset patch # User Paul Boddie # Date 1242595794 -7200 # Node ID 970c7d8a5b1b8f09db8a039b57b0c33e2f2c52bd # Parent 83f5e82fe033e2365b49e56a06a0dd369162d5f9 Fixed the get_number_of_cores function to work with /proc/cpuinfo where the "physical id" field is missing. Updated release information. diff -r 83f5e82fe033 -r 970c7d8a5b1b PKG-INFO --- a/PKG-INFO Sat Sep 06 00:30:13 2008 +0200 +++ b/PKG-INFO Sun May 17 23:29:54 2009 +0200 @@ -1,12 +1,12 @@ Metadata-Version: 1.1 Name: pprocess -Version: 0.4 +Version: 0.4.1 Author: Paul Boddie Author-email: paul at boddie org uk Maintainer: Paul Boddie Maintainer-email: paul at boddie org uk Home-page: http://www.boddie.org.uk/python/pprocess.html -Download-url: http://www.boddie.org.uk/python/downloads/pprocess-0.4.tar.gz +Download-url: http://www.boddie.org.uk/python/downloads/pprocess-0.4.1.tar.gz Summary: Elementary parallel programming for Python License: LGPL (version 3 or later) Description: The pprocess module provides elementary support for parallel diff -r 83f5e82fe033 -r 970c7d8a5b1b README.txt --- a/README.txt Sat Sep 06 00:30:13 2008 +0200 +++ b/README.txt Sun May 17 23:29:54 2009 +0200 @@ -145,6 +145,12 @@ This software depends on standard library features which are stated as being available only on "UNIX"; it has only been tested on a GNU/Linux system. +New in pprocess 0.4.1 (Changes since pprocess 0.4) +-------------------------------------------------- + + * Fixed the get_number_of_cores function to work with /proc/cpuinfo where + the "physical id" field is missing. + New in pprocess 0.4 (Changes since pprocess 0.3.1) -------------------------------------------------- @@ -235,7 +241,7 @@ Release Procedures ------------------ -Update the pprocess __version__ attribute. +Update the pprocess __version__ attribute and the setup.py file version field. Change the version number and package filename/directory in the documentation. Update the release notes (see above). Check the release information in the PKG-INFO file. diff -r 83f5e82fe033 -r 970c7d8a5b1b docs/COPYING.txt --- a/docs/COPYING.txt Sat Sep 06 00:30:13 2008 +0200 +++ b/docs/COPYING.txt Sun May 17 23:29:54 2009 +0200 @@ -1,7 +1,7 @@ Licence Agreement for parallel/pprocess --------------------------------------- -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free diff -r 83f5e82fe033 -r 970c7d8a5b1b packages/ubuntu-feisty/python-pprocess/debian/changelog --- a/packages/ubuntu-feisty/python-pprocess/debian/changelog Sat Sep 06 00:30:13 2008 +0200 +++ b/packages/ubuntu-feisty/python-pprocess/debian/changelog Sun May 17 23:29:54 2009 +0200 @@ -1,3 +1,10 @@ +pprocess (0.4.1-0ubuntu1) feisty; urgency=low + + * Fixed the get_number_of_cores function to work with + /proc/cpuinfo where the "physical id" field is missing. + + -- Paul Boddie Sun, 17 May 2009 23:28:27 +0200 + pprocess (0.4-0ubuntu1) feisty; urgency=low * Added support for persistent/background processes. diff -r 83f5e82fe033 -r 970c7d8a5b1b packages/ubuntu-feisty/python-pprocess/debian/copyright --- a/packages/ubuntu-feisty/python-pprocess/debian/copyright Sat Sep 06 00:30:13 2008 +0200 +++ b/packages/ubuntu-feisty/python-pprocess/debian/copyright Sun May 17 23:29:54 2009 +0200 @@ -15,7 +15,7 @@ Licence Agreement for parallel/pprocess --------------------------------------- -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free diff -r 83f5e82fe033 -r 970c7d8a5b1b packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/changelog --- a/packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/changelog Sat Sep 06 00:30:13 2008 +0200 +++ b/packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/changelog Sun May 17 23:29:54 2009 +0200 @@ -1,3 +1,10 @@ +parallel-pprocess (0.4.1-0ubuntu1) hoary; urgency=low + + * Fixed the get_number_of_cores function to work with + /proc/cpuinfo where the "physical id" field is missing. + + -- Paul Boddie Sun, 17 May 2009 23:28:59 +0200 + parallel-pprocess (0.4-0ubuntu1) hoary; urgency=low * Added support for persistent/background processes. diff -r 83f5e82fe033 -r 970c7d8a5b1b packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/copyright --- a/packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/copyright Sat Sep 06 00:30:13 2008 +0200 +++ b/packages/ubuntu-hoary/python2.4-parallel-pprocess/debian/copyright Sun May 17 23:29:54 2009 +0200 @@ -15,7 +15,7 @@ Licence Agreement for parallel/pprocess --------------------------------------- -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free diff -r 83f5e82fe033 -r 970c7d8a5b1b pprocess.py --- a/pprocess.py Sat Sep 06 00:30:13 2008 +0200 +++ b/pprocess.py Sun May 17 23:29:54 2009 +0200 @@ -4,7 +4,7 @@ A simple parallel processing API for Python, inspired somewhat by the thread module, slightly less by pypar, and slightly less still by pypvm. -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free @@ -20,7 +20,7 @@ with this program. If not, see . """ -__version__ = "0.4" +__version__ = "0.4.1" import os import sys @@ -816,7 +816,7 @@ # Utility functions. -_cpuinfo_fields = "physical id", "core id" +_cpuinfo_fields = "processor", "physical id", "core id" def _get_number_of_cores(): @@ -829,18 +829,31 @@ f = open("/proc/cpuinfo") try: processors = set() - processor = [None, None] + + # Use the _cpuinfo_field values as "digits" in a larger unique + # core identifier. + + processor = [None, None, None] for line in f.xreadlines(): for i, field in enumerate(_cpuinfo_fields): + + # Where the field is found, insert the value into the + # appropriate location in the processor identifier. + if line.startswith(field): t = line.split(":") processor[i] = int(t[1].strip()) break - else: - if line.startswith("processor") and processor[0] is not None: - processors.add(tuple(processor)) - processor = [None, None] + + # Where a new processor description is started, record the + # identifier. + + if line.startswith("processor") and processor[0] is not None: + processors.add(tuple(processor)) + processor = [None, None, None] + + # At the end of reading the file, add any unrecorded processors. if processor[0] is not None: processors.add(tuple(processor)) diff -r 83f5e82fe033 -r 970c7d8a5b1b setup.py --- a/setup.py Sat Sep 06 00:30:13 2008 +0200 +++ b/setup.py Sun May 17 23:29:54 2009 +0200 @@ -2,14 +2,12 @@ from distutils.core import setup -import pprocess - setup( name = "pprocess", description = "Elementary parallel programming for Python", author = "Paul Boddie", author_email = "paul@boddie.org.uk", url = "http://www.boddie.org.uk/python/pprocess.html", - version = pprocess.__version__, + version = "0.4.1", py_modules = ["pprocess"] )