Skip to content

Commit dcf80c7

Browse files
committed
do not create install files for Python < 3.7
1 parent 88929c1 commit dcf80c7

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

cicd/generate-tox-ini.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ def get_supported_versions(root):
5454
out = set()
5555
for ver in glob.glob(os.path.join(root, 'swat', 'lib', '*', '_py*swat*.*')):
5656
ver = re.match(r'_py(\d*)swat', os.path.basename(ver)).group(1) or '27'
57+
if (ver[0] == '2'):
58+
# print_err("get_supported_versions: skipping {}".format(ver))
59+
continue
60+
if ((int(ver[1:]) < 7) and (ver[0] == '3')):
61+
# print_err("get_supported_versions: skipping {}".format(ver))
62+
continue
5763
out.add('{}.{}'.format(ver[0], ver[1:]))
5864
return list(sorted(out))
5965

cicd/tar2conda.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,13 @@ def main(url, args):
261261
# Anaconda doesn't do narrow character builds; just use _pyswatw for 2.7
262262
if m.group(2).split('.')[0] == '_pyswat':
263263
continue
264+
265+
if ((m.group(3) == '') or (int(m.group(3)) < 37)):
266+
# Don't create wheel file for Python 2.7, 3.5, or 3.6
267+
msg = "tar2conda.main : m.group(3) {} is empty or < 37, skipping"
268+
print_err(msg.format(m.group(3)))
269+
continue
270+
264271
platform = m.group(1)
265272
pvlist = list(m.group(3) or '27')
266273
if len(pvlist) < 2:

cicd/tar2wheel.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,19 @@ def main(url, args):
404404
for name in names:
405405
m = re.search(r'(\w+)[\\/](_py(\d*)swat(w?)\.\w+)$', name)
406406
if m:
407+
if ((m.group(3) == '') or (int(m.group(3)) < 37)):
408+
# Don't create wheel file for Python 2.7, 3.5, or 3.6
409+
msg = "tar2wheel.main : m.group(3) {} is empty or < 37, skipping"
410+
print_err(msg.format(m.group(3)))
411+
continue
412+
407413
platform = m.group(1)
408414
versions.append(dict(extension=m.group(2),
409-
pyversion='cp%s' % (m.group(3) or '27'),
410-
abi='cp%sm%s' % ((m.group(3) or '27'),
411-
m.group(4) and 'u' or '')))
415+
pyversion='cp%s' % (m.group(3)),
416+
abi='cp%sm' % (m.group(3))))
417+
# special handling for python 2.7, no longer needed
418+
# abi='cp%sm%s' % ((m.group(3) or '27'),
419+
# m.group(4) and 'u' or '')))
412420
if int(versions[-1]['pyversion'].replace('cp', '')) >= 38:
413421
versions[-1]['abi'] = versions[-1]['abi'].replace('m', '')
414422

0 commit comments

Comments
 (0)