-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
41 lines (32 loc) · 1.07 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- coding: utf-8 -*-
#
# Copyright © 2012 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see winpython/__init__.py for details)
"""
Created on Thu Oct 04 11:02:40 2012
@author: Pierre Raybaut
"""
from __future__ import print_function
import sys
import os
import os.path as osp
import re
# Local imports
from winpython import utils, wppm
def test_python_packages(pyver):
"""Check if all Python packages are supported by WinPython"""
basedir = utils.get_basedir(pyver)
for suffix in ('src', 'win32', 'win-amd64'):
dirname = osp.join(basedir, 'packages.%s' % suffix)
for name in os.listdir(dirname):
if osp.isfile(osp.join(dirname, name)) \
and not re.match(r'python-([0-9\.]*)(\.amd64)?\.msi', name):
try:
print(wppm.Package(name))
print('')
except:
print('failed: %s' % name, file=sys.stderr)
if __name__ == '__main__':
test_python_packages('2.7')
test_python_packages('3.3')