@@ -19,6 +19,86 @@ test_go() {
19
19
}
20
20
21
21
test_python () {
22
+ echo " === PYTHON ENVIRONMENT DEBUG ==="
23
+ .venv/bin/python --version
24
+ echo " Python executable: $( .venv/bin/python -c ' import sys; print(sys.executable)' ) "
25
+ echo " Python path: $( .venv/bin/python -c ' import sys; print(sys.path)' ) "
26
+ echo " Site packages: $( .venv/bin/python -c ' import site; print(site.getsitepackages())' ) "
27
+ echo " User site: $( .venv/bin/python -c ' import site; print(site.getusersitepackages())' ) "
28
+ echo
29
+ echo " === SITE-PACKAGES INSPECTION ==="
30
+ echo " Contents of site-packages:"
31
+ ls -la .venv/lib/python* /site-packages/ | head -20
32
+ echo " Looking for typing_extensions:"
33
+ find .venv -name " *typing_extensions*" -type f 2> /dev/null || echo " No typing_extensions found"
34
+ echo " Looking for coglet:"
35
+ find .venv -name " *coglet*" -type d 2> /dev/null || echo " No coglet found"
36
+ echo " Looking for cog:"
37
+ find .venv -name " cog" -type d 2> /dev/null || echo " No cog found"
38
+ echo
39
+ echo " === TYPING_EXTENSIONS CHECK ==="
40
+ .venv/bin/python -c "
41
+ try:
42
+ import typing_extensions
43
+ print('typing_extensions imported successfully')
44
+ print('typing_extensions location:', getattr(typing_extensions, '__file__', 'NO __file__'))
45
+ print('typing_extensions version:', getattr(typing_extensions, '__version__', 'NO __version__'))
46
+ print('typing_extensions dir:', [x for x in dir(typing_extensions) if 'Param' in x])
47
+
48
+ # Test ParamSpec specifically
49
+ try:
50
+ from typing_extensions import ParamSpec
51
+ print('ParamSpec import: SUCCESS')
52
+ except ImportError as pe:
53
+ print('ParamSpec import FAILED:', pe)
54
+
55
+ except ImportError as e:
56
+ print('typing_extensions FAILED:', e)
57
+ "
58
+ echo
59
+ echo " === PACKAGE INSTALLATION CHECK ==="
60
+ .venv/bin/python -c "
61
+ import pkg_resources
62
+ try:
63
+ dist = pkg_resources.get_distribution('typing_extensions')
64
+ print('typing_extensions pkg_resources:', dist.version, 'at', dist.location)
65
+ except:
66
+ print('typing_extensions not found in pkg_resources')
67
+
68
+ try:
69
+ dist = pkg_resources.get_distribution('coglet')
70
+ print('coglet pkg_resources:', dist.version, 'at', dist.location)
71
+ except:
72
+ print('coglet not found in pkg_resources')
73
+ "
74
+ echo
75
+ echo " === COGLET IMPORT TEST ==="
76
+ .venv/bin/python -c "
77
+ try:
78
+ print('Importing coglet...')
79
+ import coglet
80
+ print('SUCCESS: coglet imported')
81
+
82
+ print('Importing coglet.api...')
83
+ import coglet.api
84
+ print('SUCCESS: coglet.api imported')
85
+
86
+ print('Importing cog...')
87
+ import cog
88
+ print('SUCCESS: cog imported')
89
+
90
+ print('Importing cog.coder...')
91
+ import cog.coder
92
+ print('SUCCESS: cog.coder imported')
93
+
94
+ except Exception as e:
95
+ print('IMPORT FAILED:', type(e).__name__, ':', e)
96
+ import traceback
97
+ traceback.print_exc()
98
+ "
99
+ echo
100
+ echo " === RUNNING TESTS ==="
101
+ exit 0
22
102
.venv/bin/pytest " $@ " -vv
23
103
}
24
104
0 commit comments