@@ -50,6 +50,15 @@ def sha256sum(filename):
50
50
for block in iter (lambda : f .read (65536 ), b"" ):
51
51
hash .update (block )
52
52
return hash .hexdigest ()
53
+
54
+ # TODO:
55
+ # * check that GAP is available
56
+ # * run `gap -h` once to see it starts
57
+ # * also, determine from that if --nointeract resp. --quitonbreak resp. --norepl are supported
58
+ # * check/fix how --quitonbreak interacts with -T / --nobreakloop
59
+ gap_supports_nointeract = False
60
+ gap_supports_quitonbreak = False
61
+
53
62
#
54
63
# def mkdir_p(path):
55
64
# try:
@@ -66,6 +75,7 @@ def report_progress(count, block_size, total_size):
66
75
67
76
def read_package_info (pkginfo ):
68
77
# TODO: pass --quitonbreak if supported
78
+ # TODO: pass --nointeract ? etc.
69
79
cmd = ['gap' , '-A' , '-q' , '-b' ]
70
80
process = subprocess .Popen (cmd , stdin = subprocess .PIPE , stdout = subprocess .PIPE )
71
81
output ,err = process .communicate ('''
@@ -97,7 +107,9 @@ if __name__ == '__main__':
97
107
98
108
# TODO: allow URL of a PackageInfo.g as optional command line argument
99
109
# (allow omitting the final '/PackageInfo.g' part); if given, just
100
- # download from there, don't look for a local file
110
+ # download from there, don't look for a local file;
111
+ # OR the path to a PackageInfo.g file
112
+
101
113
if not os .path .isfile ("PackageInfo.g" ):
102
114
error ('no PackageInfo.g found' )
103
115
@@ -140,8 +152,12 @@ if __name__ == '__main__':
140
152
# TODO: extract the archive, call ValidatePackageInfo() on it
141
153
notice ("Validating " + archive_path )
142
154
143
- # TODO: add more checks
144
-
155
+ # TODO: add more checks:
156
+ # - check PackageDoc entries
157
+ # - check PackageWWWHome, README_URL, IssueTrackerURL, ArchiveURL
158
+ # - download the various archives, extract them, check content
159
+ # - check for bad absolute paths in HTML files
160
+
145
161
# tempdir_path = tempfile.mkdtemp()
146
162
# try:
147
163
#
0 commit comments