Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit cdcd0f1

Browse files
authored
Merge pull request #60 from deajan/master
Fix hinted compilation did drop all packages
2 parents d0ad628 + c6ecc1f commit cdcd0f1

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

hinted-compilation/hinted-mods.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2019-2020, Jorj McKie, mailto:<jorj.x.mckie@outlook.de>
2-
# Copyright 2019-2020, Orsiris de Jong, mailto:<ozy@netpower.fr>
2+
# Copyright 2019-2021, Orsiris de Jong, mailto:<ozy@netpower.fr>
33
#
44
# Part of "Nuitka", an optimizing Python compiler that is compatible and
55
# integrates with CPython, but also works on its own.
@@ -86,11 +86,12 @@ def get_checklist(full_name):
8686
"""
8787
if not full_name: # guard against nonsense
8888
return []
89-
checklist = [full_name] # full name is always looked up first
89+
checklist = [full_name.asString(), full_name.asString() + '.*'] # full name is always looked up first
9090
m0 = ""
9191
while True: # generate *-import names
9292
pkg, full_name = full_name.splitPackageName()
93-
if not pkg: break
93+
if not pkg:
94+
break
9495
m = pkg.asString()
9596
m0 += "." + m if m0 else m
9697
checklist.append(m0 + ".*")
@@ -374,7 +375,7 @@ def onModuleEncounter(self, module_filename, module_name, module_kind):
374375
self.info(ignore_msg)
375376
return False, "dropped by plugin " + plugin.plugin_name
376377

377-
if full_name == "cv2":
378+
if full_name.asString() == "cv2":
378379
return True, "needed by OpenCV"
379380

380381
if str(full_name.getTopLevelPackageName()).startswith("pywin"):
@@ -385,7 +386,7 @@ def onModuleEncounter(self, module_filename, module_name, module_kind):
385386
if m in checklist:
386387
return True, "module is hinted to" # ok
387388

388-
if check_dependents(full_name, self.import_files) is True:
389+
if check_dependents(full_name.asString(), self.import_files) is True:
389390
return True, "parent of recursed-to module"
390391

391392
# next we ask if implicit imports knows our candidate

hinted-compilation/nuitka-hints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
# Copyright 2019-2020, Jorj McKie, mailto:<jorj.x.mckie@outlook.de>
5-
# Copyright 2019-2020, Orsiris de Jong, mailto:<ozy@netpower.fr>
5+
# Copyright 2019-2021, Orsiris de Jong, mailto:<ozy@netpower.fr>
66
#
77
# Part of "Nuitka", an optimizing Python compiler that is compatible and
88
# integrates with CPython, but also works on its own.
@@ -44,8 +44,8 @@
4444

4545
# TODO: Provide a comparison/check method in the nuitka.Version module, maybe for 0.6.10
4646

47-
if not nuitka_version >= (0,6,9):
48-
sys.exit("This needs Nuitka version 0.6.9 or higher, this is %s" % getNuitkaVersion())
47+
if not nuitka_version >= (0,6,11):
48+
sys.exit("This needs Nuitka version 0.6.11 or higher, this is %s" % getNuitkaVersion())
4949

5050
python_version = sys.version.split()[0]
5151
this_dir = os.path.dirname(os.path.abspath(__file__))

0 commit comments

Comments
 (0)