diff --git a/debian/changelog b/debian/changelog
index 868f14252e851689682d3b02b09bf5ea4e80f91d..ffcf1b920a495f3a32152ec4dea36f2f0935918c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,7 +23,7 @@ python-defaults (2.7.2-11) UNRELEASED; urgency=low
     - Add appropriage Breaks/Replaces
 
   [ Piotr Ożarowski ]
-  * dh_python2: make comparison of X(S)-Python-Version field names
+  * dh_python2, pyversions: make comparison of X(S)-Python-Version field names
     case-insensitive (Closes: #676224)
 
  -- Scott Kitterman <scott@kitterman.com>  Wed, 16 May 2012 14:58:09 -0400
diff --git a/debian/pyversions.py b/debian/pyversions.py
index 249a8e2b63623d9a3669e63bca42ec3092856c9d..1aaaa01c9fd81bdfb09e5a631a0f4059c22f8b70 100644
--- a/debian/pyversions.py
+++ b/debian/pyversions.py
@@ -261,12 +261,12 @@ def extract_pyversion_attribute(fn, pkg):
             section = 'Source'
         elif line.startswith('Package: ' + pkg):
             section = pkg
-        elif line.startswith('XS-Python-Version:') or line.startswith('X-Python-Version:'):
+        elif line.lower().startswith(('xs-python-version:', 'x-python-version:')):
             if section != 'Source':
                 raise ValueError, \
                       'attribute X(S)-Python-Version not in Source section'
             sversion = line.split(':', 1)[1].strip()
-        elif line.startswith('XB-Python-Version:'):
+        elif line.lower().startswith('xb-python-version:'):
             if section == pkg:
                 version = line.split(':', 1)[1].strip()
     if section == None: