Nuitka-winsvc 2.3.3__cp311-cp311-win_amd64.whl → 2.3.9__cp311-cp311-win_amd64.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.

Potentially problematic release.


This version of Nuitka-winsvc might be problematic. Click here for more details.

Files changed (50) hide show
  1. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/METADATA +1 -1
  2. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/RECORD +50 -29
  3. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/WHEEL +1 -1
  4. nuitka/Options.py +1 -1
  5. nuitka/PythonFlavors.py +15 -0
  6. nuitka/Version.py +1 -1
  7. nuitka/build/include/nuitka/compiled_function.h +2 -0
  8. nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
  9. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
  10. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
  11. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
  12. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
  13. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
  14. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
  15. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
  16. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
  17. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
  18. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
  19. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
  20. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
  21. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
  22. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
  23. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
  24. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
  25. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
  26. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
  27. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
  28. nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
  29. nuitka/build/static_src/CompiledFrameType.c +2 -5
  30. nuitka/build/static_src/CompiledFunctionType.c +43 -4
  31. nuitka/build/static_src/HelpersAllocator.c +0 -2
  32. nuitka/build/static_src/MainProgram.c +17 -0
  33. nuitka/build/static_src/MetaPathBasedLoader.c +75 -46
  34. nuitka/code_generation/templates/CodeTemplatesModules.py +1 -10
  35. nuitka/freezer/DllDependenciesCommon.py +28 -3
  36. nuitka/freezer/DllDependenciesWin32.py +6 -1
  37. nuitka/importing/Importing.py +5 -1
  38. nuitka/nodes/ModuleNodes.py +3 -4
  39. nuitka/plugins/PluginBase.py +11 -3
  40. nuitka/plugins/standard/KivyPlugin.py +10 -0
  41. nuitka/plugins/standard/standard.nuitka-package.config.yml +213 -20
  42. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +27 -2
  43. nuitka/tools/testing/Common.py +22 -2
  44. nuitka/utils/FileOperations.py +38 -1
  45. nuitka/utils/SharedLibraries.py +1 -1
  46. {Nuitka_winsvc-2.3.3.data → Nuitka_winsvc-2.3.9.data}/scripts/nuitka-run.bat +0 -0
  47. {Nuitka_winsvc-2.3.3.data → Nuitka_winsvc-2.3.9.data}/scripts/nuitka.bat +0 -0
  48. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/LICENSE.txt +0 -0
  49. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/entry_points.txt +0 -0
  50. {Nuitka_winsvc-2.3.3.dist-info → Nuitka_winsvc-2.3.9.dist-info}/top_level.txt +0 -0
@@ -166,8 +166,26 @@ NUITKA_MAY_BE_UNUSED static PyObject *MAKE_RELATIVE_PATH_FROM_NAME(char const *n
166
166
  return result;
167
167
  }
168
168
 
169
- static PyObject *loadModuleFromCodeObject(PyObject *module, PyCodeObject *code_object, char const *name,
170
- bool is_package) {
169
+ static PyObject *_makeDunderPathObject(PyThreadState *tstate, PyObject *module_path_entry) {
170
+ CHECK_OBJECT(module_path_entry);
171
+
172
+ PyObject *path_list = MAKE_LIST_EMPTY(tstate, 1);
173
+ if (unlikely(path_list == NULL)) {
174
+ return NULL;
175
+ }
176
+
177
+ int res = PyList_SetItem(path_list, 0, module_path_entry);
178
+ if (unlikely(res != 0)) {
179
+ return NULL;
180
+ }
181
+ Py_INCREF(module_path_entry);
182
+
183
+ CHECK_OBJECT(path_list);
184
+ return path_list;
185
+ }
186
+
187
+ static PyObject *loadModuleFromCodeObject(PyThreadState *tstate, PyObject *module, PyCodeObject *code_object,
188
+ char const *name, bool is_package) {
171
189
  assert(code_object != NULL);
172
190
 
173
191
  {
@@ -200,20 +218,9 @@ static PyObject *loadModuleFromCodeObject(PyObject *module, PyCodeObject *code_o
200
218
 
201
219
  if (is_package) {
202
220
  /* Set __path__ properly, unlike frozen module importer does. */
203
- NUITKA_MAY_BE_UNUSED PyThreadState *tstate = PyThreadState_GET();
204
-
205
- PyObject *path_list = MAKE_LIST_EMPTY(tstate, 1);
206
- if (unlikely(path_list == NULL)) {
207
- return NULL;
208
- }
221
+ PyObject *path_list = _makeDunderPathObject(tstate, module_path_entry);
209
222
 
210
- int res = PyList_SetItem(path_list, 0, module_path_entry);
211
- if (unlikely(res != 0)) {
212
- return NULL;
213
- }
214
- Py_INCREF(module_path_entry);
215
-
216
- res = PyObject_SetAttr(module, const_str_plain___path__, path_list);
223
+ int res = PyObject_SetAttr(module, const_str_plain___path__, path_list);
217
224
  if (unlikely(res != 0)) {
218
225
  return NULL;
219
226
  }
@@ -461,7 +468,8 @@ static bool scanModuleInPackagePath(PyThreadState *tstate, PyObject *module_name
461
468
  return result;
462
469
  }
463
470
 
464
- static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full_name, const filename_char_t *filename);
471
+ static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full_name, const filename_char_t *filename,
472
+ bool is_package);
465
473
 
466
474
  static PyObject *callIntoInstalledExtensionModule(PyThreadState *tstate, PyObject *module_name,
467
475
  PyObject *extension_module_filename) {
@@ -479,7 +487,9 @@ static PyObject *callIntoInstalledExtensionModule(PyThreadState *tstate, PyObjec
479
487
  char const *extension_module_filename_str = Nuitka_String_AsString(extension_module_filename);
480
488
  #endif
481
489
 
482
- return callIntoExtensionModule(tstate, Nuitka_String_AsString(module_name), extension_module_filename_str);
490
+ // TODO: The value of "is_package" is guessed, maybe infer from filename being
491
+ // a "__init__.so" and the like.
492
+ return callIntoExtensionModule(tstate, Nuitka_String_AsString(module_name), extension_module_filename_str, false);
483
493
  }
484
494
 
485
495
  #endif
@@ -675,8 +685,27 @@ static void _fillExtensionModuleDllEntryFunctionName(PyThreadState *tstate, char
675
685
  #endif
676
686
  }
677
687
 
678
- static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full_name,
679
- const filename_char_t *filename) {
688
+ #ifdef _NUITKA_STANDALONE
689
+ // Append the the entry name from full path module name with dots,
690
+ // and translate these into directory separators.
691
+ static void _makeModuleCFilenameValue(filename_char_t *filename, size_t filename_size, char const *module_name_cstr,
692
+ PyObject *module_name) {
693
+ #ifdef _WIN32
694
+ appendWStringSafeW(filename, getBinaryDirectoryWideChars(true), filename_size);
695
+ appendCharSafeW(filename, SEP, filename_size);
696
+ appendModuleNameAsPathW(filename, module_name, filename_size);
697
+ appendStringSafeW(filename, ".pyd", filename_size);
698
+ #else
699
+ appendStringSafe(filename, getBinaryDirectoryHostEncoded(true), filename_size);
700
+ appendCharSafe(filename, SEP, filename_size);
701
+ appendModuleNameAsPath(filename, module_name_cstr, filename_size);
702
+ appendStringSafe(filename, ".so", filename_size);
703
+ #endif
704
+ }
705
+ #endif
706
+
707
+ static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full_name, const filename_char_t *filename,
708
+ bool is_package) {
680
709
  // Determine the package name and basename of the module to load.
681
710
  char const *dot = strrchr(full_name, '.');
682
711
  char const *name;
@@ -836,7 +865,10 @@ static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full
836
865
 
837
866
  PyObject *full_name_obj = Nuitka_String_FromString(full_name);
838
867
 
839
- PyObject *spec_value = createModuleSpec(tstate, full_name_obj, NULL, false);
868
+ PyObject *origin = Nuitka_String_FromFilename(filename);
869
+
870
+ PyObject *spec_value = createModuleSpec(tstate, full_name_obj, origin, is_package);
871
+ CHECK_OBJECT(spec_value);
840
872
 
841
873
  module = PyModule_FromDefAndSpec(def, spec_value);
842
874
 
@@ -848,16 +880,25 @@ static PyObject *callIntoExtensionModule(PyThreadState *tstate, char const *full
848
880
  return NULL;
849
881
  }
850
882
 
851
- setModuleFileValue(tstate, module, filename);
852
- PyObject_SetAttrString((PyObject *)spec_value, "origin",
853
- LOOKUP_ATTRIBUTE(tstate, module, const_str_plain___file__));
854
883
  SET_ATTRIBUTE(tstate, module, const_str_plain___spec__, spec_value);
855
884
 
885
+ setModuleFileValue(tstate, module, filename);
886
+
887
+ /* Set __path__ properly, unlike frozen module importer does. */
888
+ PyObject *path_list = _makeDunderPathObject(tstate, origin);
889
+
890
+ int res = PyObject_SetAttr(module, const_str_plain___path__, path_list);
891
+ if (unlikely(res != 0)) {
892
+ return NULL;
893
+ }
894
+
895
+ Py_DECREF(path_list);
896
+
856
897
  Nuitka_SetModule(full_name_obj, module);
857
898
  Py_DECREF(full_name_obj);
858
899
 
859
900
  SET_ATTRIBUTE(tstate, spec_value, const_str_plain__initializing, Py_True);
860
- int res = PyModule_ExecDef(module, def);
901
+ res = PyModule_ExecDef(module, def);
861
902
  SET_ATTRIBUTE(tstate, spec_value, const_str_plain__initializing, Py_False);
862
903
 
863
904
  Py_DECREF(spec_value);
@@ -1011,35 +1052,22 @@ static PyObject *loadModule(PyThreadState *tstate, PyObject *module, PyObject *m
1011
1052
  struct Nuitka_MetaPathBasedLoaderEntry const *entry) {
1012
1053
  #ifdef _NUITKA_STANDALONE
1013
1054
  if ((entry->flags & NUITKA_EXTENSION_MODULE_FLAG) != 0) {
1014
- // Append the the entry name from full path module name with dots,
1015
- // and translate these into directory separators.
1016
- #ifdef _WIN32
1017
- wchar_t filename[MAXPATHLEN + 1] = {0};
1018
-
1019
- appendWStringSafeW(filename, getBinaryDirectoryWideChars(true), sizeof(filename) / sizeof(wchar_t));
1020
- appendCharSafeW(filename, SEP, sizeof(filename) / sizeof(wchar_t));
1021
- appendModuleNameAsPathW(filename, module_name, sizeof(filename) / sizeof(wchar_t));
1022
- appendStringSafeW(filename, ".pyd", sizeof(filename) / sizeof(wchar_t));
1023
- #else
1024
- char filename[MAXPATHLEN + 1] = {0};
1025
-
1026
- appendStringSafe(filename, getBinaryDirectoryHostEncoded(true), sizeof(filename));
1027
- appendCharSafe(filename, SEP, sizeof(filename));
1028
- appendModuleNameAsPath(filename, entry->name, sizeof(filename));
1029
- appendStringSafe(filename, ".so", sizeof(filename));
1030
-
1031
- #endif
1055
+ filename_char_t filename[MAXPATHLEN + 1] = {0};
1056
+ _makeModuleCFilenameValue(filename, sizeof(filename) / sizeof(filename_char_t), entry->name, module_name);
1032
1057
 
1033
1058
  // Set "__spec__" and "__file__", some modules expect it early.
1034
1059
  setModuleFileValue(tstate, module, filename);
1060
+
1061
+ bool is_package = (entry->flags & NUITKA_PACKAGE_FLAG) != 0;
1062
+
1035
1063
  #if PYTHON_VERSION >= 0x350
1036
- PyObject *spec_value =
1037
- createModuleSpec(tstate, module_name, LOOKUP_ATTRIBUTE(tstate, module, const_str_plain___file__), false);
1064
+ PyObject *spec_value = createModuleSpec(tstate, module_name,
1065
+ LOOKUP_ATTRIBUTE(tstate, module, const_str_plain___file__), is_package);
1038
1066
 
1039
1067
  SET_ATTRIBUTE(tstate, module, const_str_plain___spec__, spec_value);
1040
1068
  #endif
1041
1069
 
1042
- callIntoExtensionModule(tstate, entry->name, filename);
1070
+ callIntoExtensionModule(tstate, entry->name, filename, is_package);
1043
1071
  } else
1044
1072
  #endif
1045
1073
  if ((entry->flags & NUITKA_BYTECODE_FLAG) != 0) {
@@ -1055,7 +1083,8 @@ static PyObject *loadModule(PyThreadState *tstate, PyObject *module, PyObject *m
1055
1083
  abort();
1056
1084
  }
1057
1085
 
1058
- return loadModuleFromCodeObject(module, code_object, entry->name, (entry->flags & NUITKA_PACKAGE_FLAG) != 0);
1086
+ return loadModuleFromCodeObject(tstate, module, code_object, entry->name,
1087
+ (entry->flags & NUITKA_PACKAGE_FLAG) != 0);
1059
1088
  } else {
1060
1089
  assert((entry->flags & NUITKA_EXTENSION_MODULE_FLAG) == 0);
1061
1090
  assert(entry->python_initfunc);
@@ -149,16 +149,7 @@ static PyObject *_reduce_compiled_function(PyObject *self, PyObject *args, PyObj
149
149
  return NULL;
150
150
  }
151
151
 
152
- PyObject *code_object_desc = MAKE_TUPLE_EMPTY(tstate, 6);
153
- PyTuple_SET_ITEM0(code_object_desc, 0, function->m_code_object->co_filename);
154
- PyTuple_SET_ITEM0(code_object_desc, 1, function->m_code_object->co_name);
155
- PyTuple_SET_ITEM(code_object_desc, 2, PyLong_FromLong(function->m_code_object->co_firstlineno));
156
- PyTuple_SET_ITEM0(code_object_desc, 3, function->m_code_object->co_varnames);
157
- PyTuple_SET_ITEM(code_object_desc, 4, PyLong_FromLong(function->m_code_object->co_argcount));
158
- PyTuple_SET_ITEM(code_object_desc, 5, PyLong_FromLong(function->m_code_object->co_flags));
159
-
160
- CHECK_OBJECT_DEEP(code_object_desc);
161
-
152
+ PyObject *code_object_desc = Nuitka_Function_ExtractCodeObjectDescription(tstate, function);
162
153
 
163
154
  PyObject *result = MAKE_TUPLE_EMPTY(tstate, 8);
164
155
  PyTuple_SET_ITEM(result, 0, PyLong_FromLong(offset));
@@ -8,6 +8,7 @@ import os
8
8
  from nuitka.containers.OrderedSets import OrderedSet
9
9
  from nuitka.importing.Importing import locateModule
10
10
  from nuitka.plugins.Plugins import Plugins
11
+ from nuitka.Tracing import inclusion_logger
11
12
  from nuitka.utils.FileOperations import getSubDirectoriesWithDlls
12
13
  from nuitka.utils.ModuleNames import ModuleName
13
14
 
@@ -22,7 +23,12 @@ def getLdLibraryPath(package_name, python_rpaths, original_dir):
22
23
  if python_rpaths:
23
24
  ld_library_path.update(python_rpaths)
24
25
 
25
- ld_library_path.update(getPackageSpecificDLLDirectories(package_name))
26
+ ld_library_path.update(
27
+ getPackageSpecificDLLDirectories(
28
+ package_name=package_name,
29
+ consider_plugins=True,
30
+ )
31
+ )
26
32
  if original_dir is not None:
27
33
  ld_library_path.add(original_dir)
28
34
 
@@ -31,7 +37,9 @@ def getLdLibraryPath(package_name, python_rpaths, original_dir):
31
37
  return _ld_library_cache[key]
32
38
 
33
39
 
34
- def getPackageSpecificDLLDirectories(package_name, consider_plugins=True):
40
+ def getPackageSpecificDLLDirectories(
41
+ package_name, consider_plugins, allow_not_found=False
42
+ ):
35
43
  scan_dirs = OrderedSet()
36
44
 
37
45
  if package_name is not None:
@@ -39,6 +47,17 @@ def getPackageSpecificDLLDirectories(package_name, consider_plugins=True):
39
47
  module_name=package_name, parent_package=None, level=0
40
48
  )[1]
41
49
 
50
+ if package_dir is None:
51
+ if allow_not_found:
52
+ return scan_dirs
53
+
54
+ inclusion_logger.sysexit(
55
+ """\
56
+ Error, failed to locate package '%s' while trying to look up DLL dependencies, \
57
+ that should not happen. Please report the issue."""
58
+ % package_name
59
+ )
60
+
42
61
  if os.path.isdir(package_dir):
43
62
  scan_dirs.add(package_dir)
44
63
  scan_dirs.update(getSubDirectoriesWithDlls(package_dir))
@@ -51,7 +70,13 @@ def getPackageSpecificDLLDirectories(package_name, consider_plugins=True):
51
70
 
52
71
  # TODO: Move this to plugins DLLs section.
53
72
  if package_name == "torchvision" and consider_plugins:
54
- scan_dirs.update(getPackageSpecificDLLDirectories(ModuleName("torch")))
73
+ scan_dirs.update(
74
+ getPackageSpecificDLLDirectories(
75
+ package_name=ModuleName("torch"),
76
+ consider_plugins=True,
77
+ allow_not_found=True,
78
+ )
79
+ )
55
80
 
56
81
  return scan_dirs
57
82
 
@@ -103,7 +103,12 @@ def _getScanDirectories(package_name, original_dir):
103
103
  scan_dirs = [os.path.dirname(sys.executable), getSystemPrefixPath()]
104
104
 
105
105
  if package_name is not None:
106
- scan_dirs.extend(getPackageSpecificDLLDirectories(package_name))
106
+ scan_dirs.extend(
107
+ getPackageSpecificDLLDirectories(
108
+ package_name=package_name,
109
+ consider_plugins=False,
110
+ )
111
+ )
107
112
 
108
113
  if original_dir is not None:
109
114
  scan_dirs.append(original_dir)
@@ -599,7 +599,11 @@ def _findModuleInPath2(package_name, module_name, search_path):
599
599
  if (
600
600
  found_candidate.module_type == "C_EXTENSION"
601
601
  and isMacOS()
602
- and not hasUniversalOrMatchingMacOSArchitecture(found_candidate.full_path)
602
+ and not hasUniversalOrMatchingMacOSArchitecture(
603
+ getPackageDirFilename(found_candidate.full_path)
604
+ if os.path.isdir(found_candidate.full_path)
605
+ else found_candidate.full_path
606
+ )
603
607
  ):
604
608
  # Not usable for target architecture.
605
609
  raise ImportError
@@ -20,7 +20,7 @@ from nuitka.PythonVersions import python_version
20
20
  from nuitka.SourceCodeReferences import fromFilename
21
21
  from nuitka.tree.SourceHandling import parsePyIFile, readSourceCodeFromFilename
22
22
  from nuitka.utils.CStrings import encodePythonIdentifierToC
23
- from nuitka.utils.Importing import getSharedLibrarySuffix
23
+ from nuitka.utils.Importing import getPackageDirFilename
24
24
  from nuitka.utils.ModuleNames import ModuleName
25
25
 
26
26
  from .ChildrenHavingMixins import (
@@ -1008,9 +1008,8 @@ class PythonExtensionModule(PythonModuleBase):
1008
1008
  self.used_modules = None
1009
1009
 
1010
1010
  if os.path.isdir(module_filename):
1011
- module_filename = os.path.join(
1012
- module_filename, "__init__" + getSharedLibrarySuffix(preferred=False)
1013
- )
1011
+ module_filename = getPackageDirFilename(module_filename)
1012
+
1014
1013
  self.module_filename = module_filename
1015
1014
 
1016
1015
  def finalize(self):
@@ -52,7 +52,11 @@ from nuitka.Options import (
52
52
  shallMakeModule,
53
53
  shallShowExecutedCommands,
54
54
  )
55
- from nuitka.PythonFlavors import isAnacondaPython, isDebianPackagePython
55
+ from nuitka.PythonFlavors import (
56
+ isAnacondaPython,
57
+ isDebianPackagePython,
58
+ isNuitkaPython,
59
+ )
56
60
  from nuitka.PythonVersions import (
57
61
  getTestExecutionPythonVersions,
58
62
  python_version,
@@ -131,6 +135,7 @@ def _getEvaluationContext():
131
135
  "anaconda": isAnacondaPython(),
132
136
  "is_conda_package": isDistributionCondaPackage,
133
137
  "debian_python": isDebianPackagePython(),
138
+ "nuitka_python": isNuitkaPython(),
134
139
  "standalone": isStandaloneMode(),
135
140
  "module_mode": shallMakeModule(),
136
141
  "deployment": isDeploymentMode(),
@@ -195,8 +200,11 @@ def _getEvaluationContext():
195
200
  _context_dict["before_python3"] = python_version < 0x300
196
201
  _context_dict["python3_or_higher"] = python_version >= 0x300
197
202
 
198
- _context_dict["extension_std_suffix"] = getSharedLibrarySuffix(preferred=True)
199
- _context_dict["extension_suffix"] = getSharedLibrarySuffix(preferred=False)
203
+ if not isNuitkaPython():
204
+ _context_dict["extension_std_suffix"] = getSharedLibrarySuffix(
205
+ preferred=True
206
+ )
207
+ _context_dict["extension_suffix"] = getSharedLibrarySuffix(preferred=False)
200
208
 
201
209
  return _context_dict
202
210
 
@@ -6,6 +6,7 @@
6
6
 
7
7
  from nuitka.Options import isStandaloneMode
8
8
  from nuitka.plugins.PluginBase import NuitkaPluginBase
9
+ from nuitka.utils.Utils import isMacOS, isWin32Windows
9
10
 
10
11
 
11
12
  class NuitkaPluginKivy(NuitkaPluginBase):
@@ -88,10 +89,19 @@ except ImportError:
88
89
  yield "kivy.graphics.cgl_backend"
89
90
  elif full_name == "kivy.graphics.cgl_backend":
90
91
  yield "kivy.graphics.cgl_backend.cgl_glew"
92
+ yield "kivy.graphics.cgl_backend.cgl_sdl2"
91
93
  elif full_name == "kivy.graphics.cgl_backend.cgl_glew":
92
94
  yield "kivy.graphics.cgl_backend.cgl_gl"
93
95
  elif full_name == "kivymd.app":
94
96
  yield self.locateModules("kivymd.uix")
97
+ elif full_name == "kivy.core.clipboard":
98
+ if isWin32Windows():
99
+ yield "kivy.core.clipboard.clipboard_winctypes"
100
+ if isMacOS():
101
+ if self.locateModule("pyobjus"):
102
+ yield "kivy.core.clipboard.clipboard_nspaste"
103
+ else:
104
+ yield "kivy.core.clipboard.clipboard_sdl2"
95
105
 
96
106
  def getExtraDlls(self, module):
97
107
  """Copy extra shared libraries or data for this installation.