Nuitka-winsvc 2.4.11__cp311-cp311-win_amd64.whl → 2.5.6__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.
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/METADATA +56 -109
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/RECORD +304 -280
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +31 -0
- nuitka/HardImportRegistry.py +8 -0
- nuitka/MainControl.py +9 -4
- nuitka/OptionParsing.py +108 -54
- nuitka/Options.py +69 -13
- nuitka/OutputDirectories.py +7 -2
- nuitka/PostProcessing.py +69 -38
- nuitka/Progress.py +16 -1
- nuitka/PythonVersions.py +2 -1
- nuitka/Serialization.py +4 -2
- nuitka/Tracing.py +69 -1
- nuitka/Version.py +2 -2
- nuitka/build/Backend.scons +45 -5
- nuitka/build/CCompilerVersion.scons +6 -0
- nuitka/build/Onefile.scons +6 -0
- nuitka/build/SconsCaching.py +4 -0
- nuitka/build/SconsCompilerSettings.py +14 -3
- nuitka/build/SconsInterface.py +3 -0
- nuitka/build/SconsUtils.py +5 -0
- nuitka/build/include/nuitka/allocator.h +124 -1
- nuitka/build/include/nuitka/calling.h +6 -6
- nuitka/build/include/nuitka/compiled_asyncgen.h +10 -7
- nuitka/build/include/nuitka/compiled_frame.h +2 -1
- nuitka/build/include/nuitka/constants.h +8 -0
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/exceptions.h +264 -121
- nuitka/build/include/nuitka/helper/attributes.h +0 -4
- nuitka/build/include/nuitka/helper/calling_generated.h +52 -52
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
- nuitka/build/include/nuitka/helper/dictionaries.h +75 -31
- nuitka/build/include/nuitka/helper/ints.h +86 -37
- nuitka/build/include/nuitka/helper/iterators.h +82 -34
- nuitka/build/include/nuitka/helper/operations.h +3 -0
- nuitka/build/include/nuitka/helper/operations_binary_add.h +6 -0
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +6 -0
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +3 -0
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +3 -0
- nuitka/build/include/nuitka/helper/raising.h +47 -28
- nuitka/build/include/nuitka/helper/richcomparisons.h +7 -0
- nuitka/build/include/nuitka/helper/tuples.h +12 -0
- nuitka/build/include/nuitka/helpers.h +12 -2
- nuitka/build/include/nuitka/prelude.h +36 -25
- nuitka/build/include/nuitka/printing.h +9 -7
- nuitka/build/include/nuitka/threading.h +15 -1
- nuitka/build/include/nuitka/type_aliases.h +3 -0
- nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
- nuitka/build/inline_copy/stubgen/six.py +998 -0
- nuitka/build/inline_copy/stubgen/stubgen.py +307 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +45 -39
- nuitka/build/static_src/CompiledCellType.c +6 -4
- nuitka/build/static_src/CompiledCodeHelpers.c +106 -40
- nuitka/build/static_src/CompiledCoroutineType.c +41 -31
- nuitka/build/static_src/CompiledFrameType.c +110 -79
- nuitka/build/static_src/CompiledFunctionType.c +173 -151
- nuitka/build/static_src/CompiledGeneratorType.c +51 -49
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +433 -46
- nuitka/build/static_src/CompiledMethodType.c +6 -12
- nuitka/build/static_src/HelpersAllocator.c +266 -28
- nuitka/build/static_src/HelpersAttributes.c +0 -21
- nuitka/build/static_src/HelpersBuiltin.c +23 -14
- nuitka/build/static_src/HelpersCalling.c +7 -7
- nuitka/build/static_src/HelpersCallingGenerated.c +70 -70
- nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
- nuitka/build/static_src/HelpersComparisonEq.c +18 -4
- nuitka/build/static_src/HelpersComparisonGe.c +18 -4
- nuitka/build/static_src/HelpersComparisonGt.c +18 -4
- nuitka/build/static_src/HelpersComparisonLe.c +18 -4
- nuitka/build/static_src/HelpersComparisonLt.c +18 -4
- nuitka/build/static_src/HelpersComparisonNe.c +18 -4
- nuitka/build/static_src/HelpersConsole.c +34 -8
- nuitka/build/static_src/HelpersConstantsBlob.c +4 -2
- nuitka/build/static_src/HelpersDeepcopy.c +1 -0
- nuitka/build/static_src/HelpersDictionaries.c +195 -36
- nuitka/build/static_src/HelpersDictionariesGenerated.c +12 -107
- nuitka/build/static_src/HelpersExceptions.c +24 -50
- nuitka/build/static_src/HelpersFiles.c +79 -5
- nuitka/build/static_src/HelpersImport.c +13 -9
- nuitka/build/static_src/HelpersImportHard.c +23 -46
- nuitka/build/static_src/HelpersLists.c +98 -9
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +224 -6
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +3 -0
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +5 -5
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +8 -2
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +14 -8
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +36 -36
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -0
- nuitka/build/static_src/HelpersOperationBinaryMod.c +22 -10
- nuitka/build/static_src/HelpersOperationBinaryMult.c +17 -7
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +14 -8
- nuitka/build/static_src/HelpersOperationBinaryPow.c +24 -24
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +4 -4
- nuitka/build/static_src/HelpersOperationBinarySub.c +229 -8
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +8 -2
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +162 -10
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +5 -5
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +20 -20
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -0
- nuitka/build/static_src/HelpersOperationInplaceMod.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceMult.c +11 -6
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +11 -6
- nuitka/build/static_src/HelpersOperationInplacePow.c +20 -20
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +4 -4
- nuitka/build/static_src/HelpersOperationInplaceSub.c +163 -10
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +6 -1
- nuitka/build/static_src/HelpersProfiling.c +1 -1
- nuitka/build/static_src/HelpersRaising.c +255 -310
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +2 -2
- nuitka/build/static_src/HelpersTypes.c +98 -2
- nuitka/build/static_src/MainProgram.c +132 -28
- nuitka/build/static_src/MetaPathBasedLoader.c +18 -19
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +134 -11
- nuitka/build/static_src/OnefileBootstrap.c +6 -1
- nuitka/code_generation/AsyncgenCodes.py +2 -6
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +269 -167
- nuitka/code_generation/BuiltinCodes.py +9 -1
- nuitka/code_generation/CallCodes.py +16 -16
- nuitka/code_generation/CodeGeneration.py +14 -2
- nuitka/code_generation/CodeHelperSelection.py +1 -1
- nuitka/code_generation/CodeHelpers.py +4 -1
- nuitka/code_generation/CodeObjectCodes.py +2 -2
- nuitka/code_generation/ComparisonCodes.py +13 -2
- nuitka/code_generation/ComparisonHelperDefinitions.py +23 -8
- nuitka/code_generation/Contexts.py +28 -16
- nuitka/code_generation/CoroutineCodes.py +2 -6
- nuitka/code_generation/DictCodes.py +3 -3
- nuitka/code_generation/ErrorCodes.py +34 -50
- nuitka/code_generation/ExceptionCodes.py +165 -96
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +25 -10
- nuitka/code_generation/FrameCodes.py +4 -11
- nuitka/code_generation/FunctionCodes.py +2 -6
- nuitka/code_generation/GeneratorCodes.py +2 -6
- nuitka/code_generation/GlobalConstants.py +8 -2
- nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
- nuitka/code_generation/IteratorCodes.py +67 -54
- nuitka/code_generation/LineNumberCodes.py +1 -3
- nuitka/code_generation/ModuleCodes.py +28 -4
- nuitka/code_generation/OperationCodes.py +51 -20
- nuitka/code_generation/PackageResourceCodes.py +37 -0
- nuitka/code_generation/RaisingCodes.py +164 -90
- nuitka/code_generation/Reports.py +13 -5
- nuitka/code_generation/ReturnCodes.py +2 -16
- nuitka/code_generation/TryCodes.py +12 -24
- nuitka/code_generation/TypeAliasCodes.py +48 -0
- nuitka/code_generation/VariableCodes.py +99 -40
- nuitka/code_generation/VariableDeclarations.py +8 -8
- nuitka/code_generation/YieldCodes.py +1 -1
- nuitka/code_generation/c_types/CTypeBases.py +10 -2
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +3 -0
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +3 -4
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +70 -25
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +16 -6
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesConstants.py +11 -3
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +15 -16
- nuitka/code_generation/templates/CodeTemplatesFrames.py +18 -10
- nuitka/code_generation/templates/CodeTemplatesFunction.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -35
- nuitka/code_generation/templates/CodeTemplatesModules.py +34 -4
- nuitka/code_generation/templates/CodeTemplatesVariables.py +76 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +3 -3
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +3 -3
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +4 -106
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -2
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +9 -9
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -4
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +31 -31
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
- nuitka/containers/Namedtuples.py +6 -0
- nuitka/containers/OrderedSets.py +105 -5
- nuitka/distutils/Build.py +14 -0
- nuitka/distutils/DistutilCommands.py +50 -10
- nuitka/finalizations/Finalization.py +3 -3
- nuitka/finalizations/FinalizeMarkups.py +10 -14
- nuitka/freezer/DependsExe.py +5 -2
- nuitka/freezer/DllDependenciesMacOS.py +18 -1
- nuitka/freezer/DllDependenciesWin32.py +26 -12
- nuitka/freezer/ImportDetection.py +6 -0
- nuitka/freezer/IncludedDataFiles.py +37 -6
- nuitka/freezer/Onefile.py +1 -0
- nuitka/freezer/Standalone.py +72 -18
- nuitka/importing/Importing.py +33 -6
- nuitka/importing/Recursion.py +5 -2
- nuitka/importing/StandardLibrary.py +57 -59
- nuitka/nodes/AsyncgenNodes.py +3 -6
- nuitka/nodes/BuiltinIteratorNodes.py +2 -2
- nuitka/nodes/BuiltinRefNodes.py +14 -30
- nuitka/nodes/ChildrenHavingMixins.py +439 -46
- nuitka/nodes/ConditionalNodes.py +3 -2
- nuitka/nodes/CoroutineNodes.py +3 -6
- nuitka/nodes/DictionaryNodes.py +1 -1
- nuitka/nodes/ExceptionNodes.py +102 -26
- nuitka/nodes/ExpressionBasesGenerated.py +288 -4
- nuitka/nodes/FrameNodes.py +22 -11
- nuitka/nodes/FunctionNodes.py +3 -3
- nuitka/nodes/GeneratorNodes.py +3 -6
- nuitka/nodes/HardImportNodesGenerated.py +182 -0
- nuitka/nodes/ImportNodes.py +2 -2
- nuitka/nodes/NodeBases.py +28 -1
- nuitka/nodes/NodeMakingHelpers.py +71 -50
- nuitka/nodes/OperatorNodesUnary.py +128 -3
- nuitka/nodes/OsSysNodes.py +37 -6
- nuitka/nodes/OutlineNodes.py +2 -2
- nuitka/nodes/StatementBasesGenerated.py +0 -2
- nuitka/nodes/StatementNodes.py +8 -7
- nuitka/nodes/SubscriptNodes.py +1 -1
- nuitka/nodes/TypeNodes.py +28 -1
- nuitka/nodes/VariableAssignNodes.py +2 -1
- nuitka/nodes/shapes/BuiltinTypeShapes.py +24 -7
- nuitka/nodes/shapes/IteratorShapes.py +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +18 -0
- nuitka/nodes/shapes/StandardShapes.py +47 -44
- nuitka/optimizations/BytecodeDemotion.py +2 -1
- nuitka/plugins/PluginBase.py +64 -22
- nuitka/plugins/Plugins.py +16 -3
- nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
- nuitka/plugins/standard/DllFilesPlugin.py +78 -2
- nuitka/plugins/standard/ImplicitImports.py +5 -15
- nuitka/plugins/standard/KivyPlugin.py +3 -12
- nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
- nuitka/plugins/standard/OptionsNannyPlugin.py +5 -4
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
- nuitka/plugins/standard/TkinterPlugin.py +23 -3
- nuitka/plugins/standard/TransformersPlugin.py +70 -275
- nuitka/plugins/standard/standard.nuitka-package.config.yml +413 -30
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +35 -2
- nuitka/reports/CompilationReportReader.py +12 -0
- nuitka/reports/Reports.py +11 -0
- nuitka/specs/BuiltinParameterSpecs.py +5 -1
- nuitka/specs/HardImportSpecs.py +7 -0
- nuitka/specs/ParameterSpecs.py +4 -4
- nuitka/tools/environments/Virtualenv.py +13 -5
- nuitka/tools/general/dll_report/__main__.py +10 -1
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/podman/__main__.py +4 -2
- nuitka/tools/specialize/CTypeDescriptions.py +158 -9
- nuitka/tools/specialize/SpecializeC.py +218 -56
- nuitka/tools/testing/Common.py +69 -62
- nuitka/tools/testing/compare_with_cpython/__main__.py +3 -1
- nuitka/tools/testing/measure_construct_performance/__main__.py +1 -8
- nuitka/tools/testing/run_nuitka_tests/__main__.py +77 -11
- nuitka/tools/watch/AutoStage.py +1 -0
- nuitka/tree/Building.py +10 -37
- nuitka/tree/ComplexCallHelperFunctions.py +4 -0
- nuitka/tree/ReformulationAssertStatements.py +31 -14
- nuitka/tree/ReformulationAssignmentStatements.py +5 -1
- nuitka/tree/ReformulationClasses3.py +94 -19
- nuitka/tree/ReformulationDictionaryCreation.py +1 -0
- nuitka/tree/ReformulationFunctionStatements.py +1 -1
- nuitka/tree/ReformulationMatchStatements.py +3 -1
- nuitka/tree/ReformulationYieldExpressions.py +23 -5
- nuitka/utils/CommandLineOptions.py +27 -3
- nuitka/utils/Download.py +2 -2
- nuitka/utils/Execution.py +36 -31
- nuitka/utils/FileOperations.py +18 -39
- nuitka/utils/Hashing.py +5 -1
- nuitka/utils/Importing.py +2 -14
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +9 -4
- nuitka/utils/Json.py +2 -2
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/SharedLibraries.py +24 -0
- nuitka/utils/Signing.py +9 -1
- nuitka/utils/Utils.py +1 -0
- {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka-run.cmd +0 -0
- {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka.cmd +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/top_level.txt +0 -0
nuitka/utils/Importing.py
CHANGED
|
@@ -12,6 +12,7 @@ import sys
|
|
|
12
12
|
from nuitka.PythonVersions import python_version
|
|
13
13
|
from nuitka.Tracing import general
|
|
14
14
|
|
|
15
|
+
from .InlineCopies import getInlineCopyFolder
|
|
15
16
|
from .ModuleNames import ModuleName
|
|
16
17
|
from .Utils import withNoDeprecationWarning
|
|
17
18
|
|
|
@@ -156,20 +157,7 @@ _deleted_modules = {}
|
|
|
156
157
|
def importFromInlineCopy(module_name, must_exist, delete_module=False):
|
|
157
158
|
"""Import a module from the inline copy stage."""
|
|
158
159
|
|
|
159
|
-
folder_name =
|
|
160
|
-
os.path.join(
|
|
161
|
-
os.path.dirname(__file__), "..", "build", "inline_copy", module_name
|
|
162
|
-
)
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
candidate_27 = folder_name + "_27"
|
|
166
|
-
candidate_35 = folder_name + "_35"
|
|
167
|
-
|
|
168
|
-
# Use specific versions if needed.
|
|
169
|
-
if python_version < 0x300 and os.path.exists(candidate_27):
|
|
170
|
-
folder_name = candidate_27
|
|
171
|
-
elif python_version < 0x360 and os.path.exists(candidate_35):
|
|
172
|
-
folder_name = candidate_35
|
|
160
|
+
folder_name = getInlineCopyFolder(module_name)
|
|
173
161
|
|
|
174
162
|
module = _importFromFolder(
|
|
175
163
|
module_name=module_name,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
""" Policies for locating inline copies."""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
|
|
8
|
+
from nuitka.PythonVersions import python_version
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _getInlineCopyBaseFolder():
|
|
12
|
+
"""Base folder for inline copies."""
|
|
13
|
+
return os.path.normpath(
|
|
14
|
+
os.path.join(os.path.dirname(__file__), "..", "build", "inline_copy")
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def getInlineCopyFolder(module_name):
|
|
19
|
+
"""Get the inline copy folder for a given name."""
|
|
20
|
+
folder_name = os.path.join(_getInlineCopyBaseFolder(), module_name)
|
|
21
|
+
|
|
22
|
+
candidate_27 = folder_name + "_27"
|
|
23
|
+
candidate_35 = folder_name + "_35"
|
|
24
|
+
|
|
25
|
+
# Use specific versions if needed.
|
|
26
|
+
if python_version < 0x300 and os.path.exists(candidate_27):
|
|
27
|
+
folder_name = candidate_27
|
|
28
|
+
elif python_version < 0x360 and os.path.exists(candidate_35):
|
|
29
|
+
folder_name = candidate_35
|
|
30
|
+
|
|
31
|
+
return folder_name
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def getDownloadCopyFolder():
|
|
35
|
+
"""Get the inline copy folder for a given name."""
|
|
36
|
+
return os.path.join(_getInlineCopyBaseFolder(), "downloads", "pip")
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
40
|
+
# integrates with CPython, but also works on its own.
|
|
41
|
+
#
|
|
42
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
43
|
+
# you may not use this file except in compliance with the License.
|
|
44
|
+
# You may obtain a copy of the License at
|
|
45
|
+
#
|
|
46
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
47
|
+
#
|
|
48
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
49
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
50
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
51
|
+
# See the License for the specific language governing permissions and
|
|
52
|
+
# limitations under the License.
|
nuitka/utils/InstalledPythons.py
CHANGED
|
@@ -195,10 +195,15 @@ def findPythons(python_version, module_name=None, module_version=None):
|
|
|
195
195
|
_installed_pythons[python_version] = result
|
|
196
196
|
|
|
197
197
|
return tuple(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
sorted(
|
|
199
|
+
(
|
|
200
|
+
candidate
|
|
201
|
+
for candidate in _installed_pythons[python_version]
|
|
202
|
+
if candidate.checkUsability(
|
|
203
|
+
module_name=module_name, module_version=module_version
|
|
204
|
+
)
|
|
205
|
+
),
|
|
206
|
+
key=lambda c: c.getPythonExe(),
|
|
202
207
|
)
|
|
203
208
|
)
|
|
204
209
|
|
nuitka/utils/Json.py
CHANGED
|
@@ -19,9 +19,9 @@ def loadJsonFromFilename(filename):
|
|
|
19
19
|
return None
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
def writeJsonToFilename(filename, contents):
|
|
22
|
+
def writeJsonToFilename(filename, contents, indent=2):
|
|
23
23
|
with openTextFile(filename, "w") as output:
|
|
24
|
-
json.dump(contents, output)
|
|
24
|
+
json.dump(contents, output, indent=indent)
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
""" Access package data. """
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import pkgutil
|
|
8
|
+
|
|
9
|
+
from nuitka.importing.Importing import locateModule
|
|
10
|
+
|
|
11
|
+
from .FileOperations import getFileContents
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def getPackageData(package_name, resource):
|
|
15
|
+
"""Get the package data, but without loading the code, i.e. we try and avoids its loader.
|
|
16
|
+
|
|
17
|
+
If it's absolutely necessary, we fallback to "pkgutil.get_data" but
|
|
18
|
+
only if we absolutely cannot find it easily.
|
|
19
|
+
"""
|
|
20
|
+
package_directory = locateModule(package_name, None, 0)[1]
|
|
21
|
+
|
|
22
|
+
if package_directory is not None:
|
|
23
|
+
resource_filename = os.path.join(package_directory, resource)
|
|
24
|
+
|
|
25
|
+
if os.path.exists(resource_filename):
|
|
26
|
+
return getFileContents(resource_filename, mode="rb")
|
|
27
|
+
|
|
28
|
+
return pkgutil.get_data(package_name, resource)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
32
|
+
# integrates with CPython, but also works on its own.
|
|
33
|
+
#
|
|
34
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
35
|
+
# you may not use this file except in compliance with the License.
|
|
36
|
+
# You may obtain a copy of the License at
|
|
37
|
+
#
|
|
38
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
39
|
+
#
|
|
40
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
41
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
42
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
43
|
+
# See the License for the specific language governing permissions and
|
|
44
|
+
# limitations under the License.
|
nuitka/utils/SharedLibraries.py
CHANGED
|
@@ -258,6 +258,29 @@ def _getMacOSArchOption():
|
|
|
258
258
|
return ()
|
|
259
259
|
|
|
260
260
|
|
|
261
|
+
# TODO: Use this for more output filters.
|
|
262
|
+
def _filterOutputByLine(output, filter_func):
|
|
263
|
+
non_errors = []
|
|
264
|
+
|
|
265
|
+
for line in output.splitlines():
|
|
266
|
+
if line and not filter_func(line):
|
|
267
|
+
non_errors.append(line)
|
|
268
|
+
|
|
269
|
+
output = b"\n".join(non_errors)
|
|
270
|
+
|
|
271
|
+
return (0 if non_errors else None), output
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def _filterOtoolErrorOutput(stderr):
|
|
275
|
+
def isNonErrorExit(line):
|
|
276
|
+
if b"missing from root that overrides" in line:
|
|
277
|
+
return True
|
|
278
|
+
|
|
279
|
+
return False
|
|
280
|
+
|
|
281
|
+
return _filterOutputByLine(stderr, isNonErrorExit)
|
|
282
|
+
|
|
283
|
+
|
|
261
284
|
def _getOToolCommandOutput(otool_option, filename):
|
|
262
285
|
filename = os.path.abspath(filename)
|
|
263
286
|
|
|
@@ -272,6 +295,7 @@ def _getOToolCommandOutput(otool_option, filename):
|
|
|
272
295
|
_otool_output_cache[cache_key] = executeToolChecked(
|
|
273
296
|
logger=postprocessing_logger,
|
|
274
297
|
command=command,
|
|
298
|
+
stderr_filter=_filterOtoolErrorOutput,
|
|
275
299
|
absence_message="The 'otool' is used to analyze dependencies on macOS and required to be found.",
|
|
276
300
|
)
|
|
277
301
|
|
nuitka/utils/Signing.py
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from nuitka.Options import (
|
|
9
|
+
getMacOSSignedAppName,
|
|
9
10
|
getMacOSSigningIdentity,
|
|
10
11
|
shallUseSigningForNotarization,
|
|
11
12
|
)
|
|
@@ -104,9 +105,16 @@ def addMacOSCodeSignature(filenames):
|
|
|
104
105
|
"--force",
|
|
105
106
|
"--deep",
|
|
106
107
|
"--preserve-metadata=entitlements",
|
|
107
|
-
# ,
|
|
108
108
|
]
|
|
109
109
|
|
|
110
|
+
macos_signed_app_name = getMacOSSignedAppName()
|
|
111
|
+
|
|
112
|
+
if macos_signed_app_name is not None:
|
|
113
|
+
command += [
|
|
114
|
+
"-i",
|
|
115
|
+
macos_signed_app_name,
|
|
116
|
+
]
|
|
117
|
+
|
|
110
118
|
if shallUseSigningForNotarization():
|
|
111
119
|
command.append("--options=runtime")
|
|
112
120
|
|
nuitka/utils/Utils.py
CHANGED
|
@@ -324,6 +324,7 @@ def encodeNonAscii(var_name):
|
|
|
324
324
|
else:
|
|
325
325
|
# Using a escaping here, because that makes it safe in terms of not
|
|
326
326
|
# to occur in the encoding escape sequence for unicode use.
|
|
327
|
+
# spell-checker: ignore xmlcharrefreplace
|
|
327
328
|
var_name = var_name.replace("$$", "$_$")
|
|
328
329
|
|
|
329
330
|
var_name = var_name.encode("ascii", "xmlcharrefreplace")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|