omdev 0.0.0.dev13__py3-none-any.whl → 0.0.0.dev15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omdev/amalg/amalg.py +53 -3
- omdev/{scripts/bracepy.py → bracepy.py} +14 -14
- omdev/exts/cmake.py +25 -9
- omdev/exts/importhook.py +84 -38
- omdev/findimports.py +88 -0
- omdev/{scripts/findmagic.py → findmagic.py} +24 -20
- omdev/precheck/__init__.py +0 -0
- omdev/precheck/__main__.py +4 -0
- omdev/precheck/precheck.py +316 -0
- omdev/pyproject/cli.py +3 -0
- omdev/pyproject/pkg.py +13 -2
- omdev/scripts/execrss.py +1 -0
- omdev/scripts/interp.py +2 -0
- omdev/scripts/pyproject.py +590 -184
- omdev/tools/revisions.py +65 -48
- omdev/{scripts → tools}/traceimport.py +3 -1
- {omdev-0.0.0.dev13.dist-info → omdev-0.0.0.dev15.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev13.dist-info → omdev-0.0.0.dev15.dist-info}/RECORD +21 -18
- omdev/scripts/findimports.py +0 -62
- {omdev-0.0.0.dev13.dist-info → omdev-0.0.0.dev15.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev13.dist-info → omdev-0.0.0.dev15.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev13.dist-info → omdev-0.0.0.dev15.dist-info}/top_level.txt +0 -0
omdev/tools/revisions.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
1
2
|
"""
|
|
2
3
|
TODO:
|
|
3
4
|
- omlish-lite, move to pyproject/
|
|
@@ -13,22 +14,56 @@ import tarfile
|
|
|
13
14
|
import typing as ta
|
|
14
15
|
import zipfile
|
|
15
16
|
|
|
17
|
+
from omlish.lite.cached import cached_nullary
|
|
16
18
|
from omlish.lite.logs import configure_standard_logging
|
|
17
19
|
from omlish.lite.logs import log
|
|
18
20
|
|
|
19
21
|
from ..wheelfile import WheelFile
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
##
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_git_revision() -> str:
|
|
28
|
+
has_untracked = bool(subprocess.check_output([
|
|
29
|
+
'git',
|
|
30
|
+
'ls-files',
|
|
31
|
+
'.',
|
|
32
|
+
'--exclude-standard',
|
|
33
|
+
'--others',
|
|
34
|
+
]).decode().strip())
|
|
35
|
+
|
|
36
|
+
dirty_rev = subprocess.check_output([
|
|
37
|
+
'git',
|
|
38
|
+
'describe',
|
|
39
|
+
'--match=NeVeRmAtCh',
|
|
40
|
+
'--always',
|
|
41
|
+
'--abbrev=40',
|
|
42
|
+
'--dirty',
|
|
43
|
+
]).decode().strip()
|
|
44
|
+
|
|
45
|
+
return dirty_rev + ('-untracked' if has_untracked else '')
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class GitRevisionAdder:
|
|
23
52
|
def __init__(
|
|
24
53
|
self,
|
|
25
|
-
revision: str,
|
|
54
|
+
revision: ta.Optional[str] = None,
|
|
26
55
|
output_suffix: ta.Optional[str] = None,
|
|
27
56
|
) -> None:
|
|
28
57
|
super().__init__()
|
|
29
|
-
self.
|
|
58
|
+
self._given_revision = revision
|
|
30
59
|
self._output_suffix = output_suffix
|
|
31
60
|
|
|
61
|
+
@cached_nullary
|
|
62
|
+
def revision(self) -> str:
|
|
63
|
+
if self._given_revision is not None:
|
|
64
|
+
return self._given_revision
|
|
65
|
+
return get_git_revision()
|
|
66
|
+
|
|
32
67
|
REVISION_ATTR = '__revision__'
|
|
33
68
|
|
|
34
69
|
def add_to_contents(self, dct: ta.Dict[str, bytes]) -> bool:
|
|
@@ -41,7 +76,7 @@ class RevisionAdder:
|
|
|
41
76
|
for i, l in enumerate(lines):
|
|
42
77
|
if l != f'{self.REVISION_ATTR} = None\n':
|
|
43
78
|
continue
|
|
44
|
-
lines[i] = f"{self.REVISION_ATTR} = '{self.
|
|
79
|
+
lines[i] = f"{self.REVISION_ATTR} = '{self.revision()}'\n"
|
|
45
80
|
changed = True
|
|
46
81
|
dct[n] = ''.join(lines).encode('utf-8')
|
|
47
82
|
return changed
|
|
@@ -106,6 +141,8 @@ class RevisionAdder:
|
|
|
106
141
|
self.add_to_tgz(f)
|
|
107
142
|
|
|
108
143
|
def add_to(self, tgt: str) -> None:
|
|
144
|
+
log.info('Using revision %s', self.revision())
|
|
145
|
+
|
|
109
146
|
if os.path.isfile(tgt):
|
|
110
147
|
self.add_to_file(tgt)
|
|
111
148
|
|
|
@@ -119,55 +156,35 @@ class RevisionAdder:
|
|
|
119
156
|
#
|
|
120
157
|
|
|
121
158
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
'--match=NeVeRmAtCh',
|
|
127
|
-
'--always',
|
|
128
|
-
'--abbrev=40',
|
|
129
|
-
'--dirty',
|
|
130
|
-
]).decode().strip()
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
#
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
def _add_cmd(args) -> None:
|
|
137
|
-
if (revision := args.revision) is None:
|
|
138
|
-
revision = get_revision()
|
|
139
|
-
log.info('Using revision %s', revision)
|
|
140
|
-
|
|
141
|
-
if not args.targets:
|
|
142
|
-
raise Exception('must specify targets')
|
|
143
|
-
|
|
144
|
-
ra = RevisionAdder(
|
|
145
|
-
revision,
|
|
146
|
-
output_suffix=args.suffix,
|
|
147
|
-
)
|
|
148
|
-
for tgt in args.targets:
|
|
149
|
-
ra.add_to(tgt)
|
|
150
|
-
|
|
159
|
+
if __name__ == '__main__':
|
|
160
|
+
def _add_cmd(args) -> None:
|
|
161
|
+
if not args.targets:
|
|
162
|
+
raise Exception('must specify targets')
|
|
151
163
|
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
ra = GitRevisionAdder(
|
|
165
|
+
args.revision,
|
|
166
|
+
output_suffix=args.suffix,
|
|
167
|
+
)
|
|
168
|
+
for tgt in args.targets:
|
|
169
|
+
ra.add_to(tgt)
|
|
154
170
|
|
|
155
|
-
|
|
171
|
+
def _main(argv=None) -> None:
|
|
172
|
+
configure_standard_logging('INFO')
|
|
156
173
|
|
|
157
|
-
|
|
174
|
+
parser = argparse.ArgumentParser()
|
|
158
175
|
|
|
159
|
-
|
|
160
|
-
parser_add.add_argument('-r', '--revision')
|
|
161
|
-
parser_add.add_argument('-s', '--suffix')
|
|
162
|
-
parser_add.add_argument('targets', nargs='*')
|
|
163
|
-
parser_add.set_defaults(func=_add_cmd)
|
|
176
|
+
subparsers = parser.add_subparsers()
|
|
164
177
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
178
|
+
parser_add = subparsers.add_parser('add')
|
|
179
|
+
parser_add.add_argument('-r', '--revision')
|
|
180
|
+
parser_add.add_argument('-s', '--suffix')
|
|
181
|
+
parser_add.add_argument('targets', nargs='*')
|
|
182
|
+
parser_add.set_defaults(func=_add_cmd)
|
|
170
183
|
|
|
184
|
+
args = parser.parse_args(argv)
|
|
185
|
+
if not getattr(args, 'func', None):
|
|
186
|
+
parser.print_help()
|
|
187
|
+
else:
|
|
188
|
+
args.func(args)
|
|
171
189
|
|
|
172
|
-
if __name__ == '__main__':
|
|
173
190
|
_main()
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# @omlish-script
|
|
3
|
+
# ruff: noqa: UP006 UP007
|
|
2
4
|
"""
|
|
3
5
|
TODO:
|
|
4
6
|
- hoist first stacktrace file to a full field
|
|
@@ -123,7 +125,7 @@ class StatsFactory:
|
|
|
123
125
|
|
|
124
126
|
@classmethod
|
|
125
127
|
def get_proc_status(cls) -> ta.Mapping[str, ta.Any]:
|
|
126
|
-
with open('/proc/self/status'
|
|
128
|
+
with open('/proc/self/status') as status_file:
|
|
127
129
|
status_block = status_file.read()
|
|
128
130
|
|
|
129
131
|
status_fields = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev15
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: ~=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish ==0.0.0.
|
|
15
|
+
Requires-Dist: omlish ==0.0.0.dev15
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
18
18
|
Requires-Dist: cffi ~=1.17 ; extra == 'all'
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
omdev/__about__.py,sha256=VuY8DTDYJifMW_xeF21JIhFM-MwVp1F0vWUhzIqomJA,784
|
|
2
2
|
omdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
omdev/bracepy.py,sha256=HwBK5XmlOsF_juTel25fRLJK9vHSJCWXuCc-OZlevRQ,2619
|
|
3
4
|
omdev/classdot.py,sha256=urN5Pzd2ooAwnfkH0z-muQxdO90IMo-sX2WB-A37lVU,1533
|
|
4
5
|
omdev/cmake.py,sha256=Diy2ry65806dQP125DAstD3w46z_wszMH7PwC2-6iik,4578
|
|
6
|
+
omdev/findimports.py,sha256=P8v4I1tm6g-PEWJiNwAKxErvWwL-Nop83vAuwq1kR5A,2246
|
|
7
|
+
omdev/findmagic.py,sha256=t8q1OoWVTFXTSDS36dr79ScTYLYk786Z9wFj8UObneQ,2170
|
|
5
8
|
omdev/tokens.py,sha256=GusxQ1Cd_eiScuR8XTTtc9QFhOgYviYGBZmFnn3Hj7s,756
|
|
6
9
|
omdev/wheelfile.py,sha256=yfupGcGkbFlmzGzKU64k_vmOKpaKnUlDWxeGn2KdekU,10005
|
|
7
10
|
omdev/amalg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
11
|
omdev/amalg/__main__.py,sha256=OE1udULO1g4McUbeg1CoHbSm4hbQ2kcE3ffEGxlnPh4,69
|
|
9
|
-
omdev/amalg/amalg.py,sha256=
|
|
12
|
+
omdev/amalg/amalg.py,sha256=YEyH097MZop-f1qobZJW__srtyLFS3rI7M2MaRtshKg,13057
|
|
10
13
|
omdev/exts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
14
|
omdev/exts/build.py,sha256=zViF1wYx6z5ACyifgNjlCAVoPAMCKpTr_VoAvwtmvtY,1013
|
|
12
|
-
omdev/exts/cmake.py,sha256=
|
|
13
|
-
omdev/exts/importhook.py,sha256=
|
|
15
|
+
omdev/exts/cmake.py,sha256=xv3VfDFXcHr6c5qS7buvV3zSvlpyRgr04YD12hZ0P3s,10120
|
|
16
|
+
omdev/exts/importhook.py,sha256=nljqEuPopuh10DPeSrIYKmkV4z-Wk5Q7WpUid1JEmkg,3530
|
|
14
17
|
omdev/exts/scan.py,sha256=ivk_Zh_AnOu8jHeaFZnITwMSwaQqOcHxwOjzsAyL1Gc,1640
|
|
15
18
|
omdev/exts/_distutils/__init__.py,sha256=c1zImtnPh3uY8BUTV4RLKtGKqTPx3c_pBbhA6tPtNsE,297
|
|
16
19
|
omdev/exts/_distutils/build_ext.py,sha256=STHl9Rq2KeWJ3dQ8j8LwIQ-vFc4-3XsYWQ8Qc5_VByU,13833
|
|
@@ -39,33 +42,33 @@ omdev/interp/system.py,sha256=UFHfMR0CHCEnNx5fhrze8esAwigpRrJUA33ftq6nA0I,3514
|
|
|
39
42
|
omdev/interp/types.py,sha256=lY0pDECxy4qtx2KI7Ve8r2quriiBi9px0Bull2zsYPw,2351
|
|
40
43
|
omdev/mypy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
44
|
omdev/mypy/debug.py,sha256=WcZw-3Z1njg_KFGqi3DB6RuqbBa3dLArJnjVCuY1Mn0,3003
|
|
45
|
+
omdev/precheck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
omdev/precheck/__main__.py,sha256=wKF_2KP2Yn1hKDEOCGR_fm5zu9UHMWCZtuEmWjpprrU,72
|
|
47
|
+
omdev/precheck/precheck.py,sha256=2yTjNGvjPYf3QxUBbCbehBYYuB8gDR_dYSTrlNCs9qU,8322
|
|
42
48
|
omdev/pyproject/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
43
49
|
omdev/pyproject/__main__.py,sha256=gFhR9DikwDZk0LqgdR3qq_aXQHThUOPllDmHDOfnFAU,67
|
|
44
|
-
omdev/pyproject/cli.py,sha256=
|
|
50
|
+
omdev/pyproject/cli.py,sha256=ywK2RyovwgwameZfXrvZylzZ87KQ0RDhzEAljKi7qv8,9918
|
|
45
51
|
omdev/pyproject/configs.py,sha256=MFHnmpMjlwxw74-SyX1Q1qNQ4ptwTXEzDGkeUcGY0mA,2822
|
|
46
52
|
omdev/pyproject/ext.py,sha256=x13piOOnNrYbA17qZLDVuR0p1sqhgEwpk4FtImX-klM,4281
|
|
47
|
-
omdev/pyproject/pkg.py,sha256=
|
|
53
|
+
omdev/pyproject/pkg.py,sha256=YrnqZK-b2qJh6kSkvYjZ19F39NU0kpbth1FYItpFZ80,5977
|
|
48
54
|
omdev/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
omdev/scripts/
|
|
50
|
-
omdev/scripts/
|
|
51
|
-
omdev/scripts/
|
|
52
|
-
omdev/scripts/findmagic.py,sha256=z_D9zzZJBuWPbR20NEh8i8NJBnCYWlttg2GTJpmDM4s,1994
|
|
53
|
-
omdev/scripts/interp.py,sha256=itY5pq1ahDjw8mYZcHec5qQRbAZezliPUyyZ1VD7zTg,63037
|
|
54
|
-
omdev/scripts/pyproject.py,sha256=NuWW0nu897jaydR-1f-Gz7pxl-zzTOjNwKiCK3uzjDY,119370
|
|
55
|
-
omdev/scripts/traceimport.py,sha256=JmUgLEQLY7r3QNQ14Agarqh5qtMyRNenCb_OF5EIikY,13392
|
|
55
|
+
omdev/scripts/execrss.py,sha256=HzDNmwXOO8fMwIRXw9q8CUnVfLFCQASyU2tfY_y2Vf8,324
|
|
56
|
+
omdev/scripts/interp.py,sha256=Xuj509nGwClnR4MvnB8CJJQ7KhfjdGmzN9ul17-SXjI,63069
|
|
57
|
+
omdev/scripts/pyproject.py,sha256=JwEjizuEdKH0TOzfqlfQ0NYkQ3KqzUg-8FtS6lR_-F8,134057
|
|
56
58
|
omdev/toml/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
57
59
|
omdev/toml/parser.py,sha256=84bn09uhYHwQGyfww6Rw6y1RxPAE_HDltODOSakcqDM,29186
|
|
58
60
|
omdev/toml/writer.py,sha256=StGYPvqgN__A2IxTI4rYeHMx8dLAFt8uogHG8dJdShs,2781
|
|
59
61
|
omdev/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
62
|
omdev/tools/dockertools.py,sha256=3844AhUst6kYo2xKNn-2Npi-f6r4rocxEOx0tHjE0dk,2063
|
|
61
63
|
omdev/tools/gittools.py,sha256=zPy2D5WDs-CbwT86_T_hbaq5yCuss5e-ouUccXC6xlg,578
|
|
62
|
-
omdev/tools/revisions.py,sha256=
|
|
64
|
+
omdev/tools/revisions.py,sha256=pJBHRdgImLnFSo9h6pPsdX-Xbam3UnFOapWrY4U49-A,5393
|
|
63
65
|
omdev/tools/sqlrepl.py,sha256=v9uVQ4nvquSXcQVYIFq34ikumSILvKqzD6lUKLcncCE,5646
|
|
66
|
+
omdev/tools/traceimport.py,sha256=oDry9CwIv5h96wSaTVKJ0qQ5vMGxYE5oBtfF-GYNLJs,13430
|
|
64
67
|
omdev/versioning/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
65
68
|
omdev/versioning/specifiers.py,sha256=6Odf9e6farwlPRsD_YqwTfYKG-BXn_dIcKtqfkhfodI,17432
|
|
66
69
|
omdev/versioning/versions.py,sha256=ei2eopEsJq3zSMJmezK1nzZgikgCdxFtnF3f69nCRZQ,12246
|
|
67
|
-
omdev-0.0.0.
|
|
68
|
-
omdev-0.0.0.
|
|
69
|
-
omdev-0.0.0.
|
|
70
|
-
omdev-0.0.0.
|
|
71
|
-
omdev-0.0.0.
|
|
70
|
+
omdev-0.0.0.dev15.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
71
|
+
omdev-0.0.0.dev15.dist-info/METADATA,sha256=IJ5mjDBhE_U1FPb334y41pHjcahk8npX1rbf9Zc1cMg,1126
|
|
72
|
+
omdev-0.0.0.dev15.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
|
|
73
|
+
omdev-0.0.0.dev15.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
74
|
+
omdev-0.0.0.dev15.dist-info/RECORD,,
|
omdev/scripts/findimports.py
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
TODO:
|
|
4
|
-
- multiple commands:
|
|
5
|
-
- dumb cmp (a = set(sys.modules); import ...; print(set(sys.modules) - a)
|
|
6
|
-
"""
|
|
7
|
-
import ast
|
|
8
|
-
import importlib.machinery
|
|
9
|
-
import importlib.util
|
|
10
|
-
import os.path
|
|
11
|
-
import sys
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_BUILTIN_MODULE_NAMES = frozenset([*sys.builtin_module_names, *sys.stdlib_module_names])
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def _main() -> None:
|
|
18
|
-
def handle(fp: str) -> None:
|
|
19
|
-
def rec(n):
|
|
20
|
-
nodes.append(n)
|
|
21
|
-
for c in ast.iter_child_nodes(n):
|
|
22
|
-
rec(c)
|
|
23
|
-
# if not os.path.isfile(os.path.join(os.path.dirname(fp), '__init__.py')):
|
|
24
|
-
# return
|
|
25
|
-
with open(fp, 'r') as f:
|
|
26
|
-
buf = f.read()
|
|
27
|
-
nodes: list[ast.AST] = []
|
|
28
|
-
rec(ast.parse(buf))
|
|
29
|
-
imps.update(na.name for i in nodes if isinstance(i, ast.Import) for na in i.names)
|
|
30
|
-
imps.update(i.module for i in nodes if isinstance(i, ast.ImportFrom) if i.module and not i.level)
|
|
31
|
-
|
|
32
|
-
imps: set[str] = set()
|
|
33
|
-
for rootp in sys.argv[1:]:
|
|
34
|
-
if os.path.isfile(rootp):
|
|
35
|
-
if rootp.endswith('.py'):
|
|
36
|
-
handle(os.path.join(os.path.dirname(rootp), os.path.basename(rootp)))
|
|
37
|
-
else:
|
|
38
|
-
for dp, dns, fns in os.walk(os.path.expanduser(rootp)): # noqa
|
|
39
|
-
for fn in fns:
|
|
40
|
-
if fn.endswith('.py'):
|
|
41
|
-
handle(os.path.join(dp, fn))
|
|
42
|
-
|
|
43
|
-
def whichmod(i: str) -> str:
|
|
44
|
-
try:
|
|
45
|
-
l = importlib.util.find_spec(i)
|
|
46
|
-
except (ImportError, ValueError):
|
|
47
|
-
return 'bad'
|
|
48
|
-
if not isinstance(l, importlib.machinery.ModuleSpec) or not l.origin:
|
|
49
|
-
return 'bad'
|
|
50
|
-
# if l.origin.startswith(sys.base_prefix) or l.origin == 'frozen':
|
|
51
|
-
# return 'builtin'
|
|
52
|
-
if i in _BUILTIN_MODULE_NAMES:
|
|
53
|
-
return 'builtin'
|
|
54
|
-
return 'dep'
|
|
55
|
-
|
|
56
|
-
eimps = {n for n in imps for n in [n.split('.')[0]] if n not in sys.builtin_module_names}
|
|
57
|
-
deps = {i for i in eimps if whichmod(i) != 'builtin'}
|
|
58
|
-
print(chr(10).join(sorted(deps)))
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if __name__ == '__main__':
|
|
62
|
-
_main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|