@@ -31,7 +31,7 @@ def __str__(self):
3131 def from_text (self , text ):
3232 match = re .match (self .PATTERN_OLD , text ) or re .match (self .PATTERN , text )
3333 if not match :
34- raise ValueError ("Text does not match expected pattern" )
34+ raise ValueError ("Text does not match expected pattern: " + text )
3535 self .name , self .url , self .version , self .description = match .groups ()
3636
3737 def to_wiki (self ):
@@ -45,6 +45,7 @@ class PackageIndex:
4545 WINPYTHON_PATTERN = r"\#\# WinPython\-*[0-9b-t]* ([0-9\.a-zA-Z]*)"
4646 TOOLS_LINE = "### Tools"
4747 PYTHON_PACKAGES_LINE = "### Python packages"
48+ WHEELHOUSE_PACKAGES_LINE = "### WheelHouse packages"
4849 HEADER_LINE1 = "Name | Version | Description"
4950 HEADER_LINE2 = "-----|---------|------------"
5051
@@ -55,6 +56,7 @@ def __init__(self, version, basedir=None, flavor="", architecture=64):
5556 self .architecture = architecture
5657 self .other_packages = {}
5758 self .python_packages = {}
59+ self .wheelhouse_packages = {}
5860 self .from_file (basedir )
5961
6062 def from_file (self , basedir ):
@@ -67,24 +69,29 @@ def from_file(self, basedir):
6769 def from_text (self , text ):
6870 version = re .match (self .WINPYTHON_PATTERN + self .flavor , text ).groups ()[0 ]
6971 assert version == self .version
70- tools_flag = python_flag = False
72+ tools_flag = python_flag = wheelhouse_flag = False
7173 for line in text .splitlines ():
7274 if line :
7375 if line == self .TOOLS_LINE :
74- tools_flag , python_flag = True , False
76+ tools_flag , python_flag , wheelhouse_flag = True , False , False
7577 continue
7678 elif line == self .PYTHON_PACKAGES_LINE :
77- tools_flag , python_flag = False , True
79+ tools_flag , python_flag , wheelhouse_flag = False , True , False
80+ continue
81+ elif line == self .WHEELHOUSE_PACKAGES_LINE :
82+ tools_flag , python_flag , wheelhouse_flag = False , False , True
7883 continue
7984 elif line in (self .HEADER_LINE1 , self .HEADER_LINE2 , "<details>" , "</details>" ):
8085 continue
81- if tools_flag or python_flag :
86+ if tools_flag or python_flag or wheelhouse_flag :
8287 package = Package ()
8388 package .from_text (line )
8489 if tools_flag :
8590 self .other_packages [package .name ] = package
86- else :
91+ elif python_flag :
8792 self .python_packages [package .name ] = package
93+ else :
94+ self .wheelhouse_packages [package .name ] = package
8895
8996def diff_package_dicts (old_packages , new_packages ):
9097 """Return difference between package old and package new"""
@@ -141,6 +148,10 @@ def compare_package_indexes(version2, version1=None, basedir=None, flavor="", fl
141148 if py_text :
142149 text += PackageIndex .PYTHON_PACKAGES_LINE + "\r \n \r \n " + py_text
143150
151+ py_text = diff_package_dicts (pi1 .wheelhouse_packages , pi2 .wheelhouse_packages )
152+ if py_text :
153+ text += PackageIndex .WHEELHOUSE_PACKAGES_LINE + "\r \n \r \n " + py_text
154+
144155 text += "\r \n </details>\r \n * * *\r \n "
145156 return text
146157
0 commit comments