Nuitka-winsvc 2.4.8__cp311-cp311-win_amd64.whl → 2.5.1__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.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/METADATA +2 -1
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/RECORD +294 -271
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +31 -0
- nuitka/HardImportRegistry.py +8 -0
- nuitka/MainControl.py +9 -4
- nuitka/OptionParsing.py +105 -52
- nuitka/Options.py +73 -16
- 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 +12 -2
- nuitka/build/SconsCompilerSettings.py +17 -6
- nuitka/build/SconsInterface.py +1 -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 +6 -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 +65 -29
- 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/helpers.h +12 -2
- nuitka/build/include/nuitka/prelude.h +35 -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 +104 -40
- nuitka/build/static_src/CompiledCoroutineType.c +40 -30
- 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 +424 -46
- nuitka/build/static_src/CompiledMethodType.c +10 -13
- nuitka/build/static_src/HelpersAllocator.c +270 -32
- nuitka/build/static_src/HelpersAttributes.c +0 -21
- nuitka/build/static_src/HelpersBuiltin.c +22 -13
- 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/HelpersComparisonEqUtils.c +1 -0
- 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 +10 -4
- nuitka/build/static_src/HelpersDictionaries.c +181 -34
- nuitka/build/static_src/HelpersDictionariesGenerated.c +0 -106
- 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/HelpersMatching.c +1 -1
- 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 +1 -1
- nuitka/build/static_src/HelpersTypes.c +98 -2
- nuitka/build/static_src/MainProgram.c +117 -29
- 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 +73 -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 +0 -105
- 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 +13 -3
- nuitka/freezer/DllDependenciesMacOS.py +18 -1
- nuitka/freezer/DllDependenciesWin32.py +26 -12
- nuitka/freezer/ImportDetection.py +3 -0
- nuitka/freezer/IncludedDataFiles.py +31 -8
- nuitka/freezer/IncludedEntryPoints.py +3 -2
- nuitka/freezer/Standalone.py +76 -18
- nuitka/importing/Importing.py +33 -6
- nuitka/importing/Recursion.py +12 -1
- nuitka/importing/StandardLibrary.py +57 -59
- nuitka/nodes/AsyncgenNodes.py +3 -6
- nuitka/nodes/BuiltinIteratorNodes.py +1 -1
- 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/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/shapes/BuiltinTypeShapes.py +24 -7
- nuitka/nodes/shapes/ShapeMixins.py +17 -0
- nuitka/nodes/shapes/StandardShapes.py +53 -1
- nuitka/optimizations/BytecodeDemotion.py +2 -1
- nuitka/plugins/PluginBase.py +64 -22
- nuitka/plugins/Plugins.py +6 -3
- nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
- nuitka/plugins/standard/ImplicitImports.py +1 -13
- nuitka/plugins/standard/KivyPlugin.py +3 -12
- nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
- nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
- nuitka/plugins/standard/TkinterPlugin.py +0 -56
- nuitka/plugins/standard/TransformersPlugin.py +70 -275
- nuitka/plugins/standard/standard.nuitka-package.config.yml +510 -28
- 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/general/dll_report/__main__.py +10 -1
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/specialize/CTypeDescriptions.py +158 -9
- nuitka/tools/specialize/SpecializeC.py +218 -56
- nuitka/tools/testing/Common.py +70 -63
- 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 +39 -54
- 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/Utils.py +17 -0
- {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka-run.cmd +0 -0
- {Nuitka_winsvc-2.4.8.data → Nuitka_winsvc-2.5.1.data}/scripts/nuitka.cmd +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.4.8.dist-info → Nuitka_winsvc-2.5.1.dist-info}/top_level.txt +0 -0
|
@@ -442,9 +442,10 @@ static PyObject *Nuitka_ResourceReaderFiles_absolute(struct Nuitka_ResourceReade
|
|
|
442
442
|
return Nuitka_ResourceReaderFiles_New(tstate, files->m_loader_entry, abspath);
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
-
static PyObject *Nuitka_ResourceReaderFiles_get_parent(
|
|
445
|
+
static PyObject *Nuitka_ResourceReaderFiles_get_parent(PyObject *self, void *data) {
|
|
446
446
|
PyThreadState *tstate = PyThreadState_GET();
|
|
447
447
|
|
|
448
|
+
struct Nuitka_ResourceReaderFilesObject *files = (struct Nuitka_ResourceReaderFilesObject *)self;
|
|
448
449
|
PyObject *path = _Nuitka_ResourceReaderFiles_GetPath(tstate, files);
|
|
449
450
|
|
|
450
451
|
PyObject *abspath = OS_PATH_ABSPATH(tstate, path);
|
|
@@ -462,7 +463,126 @@ static PyObject *Nuitka_ResourceReaderFiles_get_parent(struct Nuitka_ResourceRea
|
|
|
462
463
|
return Nuitka_ResourceReaderFiles_New(tstate, files->m_loader_entry, dirname);
|
|
463
464
|
}
|
|
464
465
|
|
|
465
|
-
static int Nuitka_ResourceReaderFiles_set_parent(
|
|
466
|
+
static int Nuitka_ResourceReaderFiles_set_parent(PyObject *self, PyObject *value, void *data) {
|
|
467
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
468
|
+
|
|
469
|
+
SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_AttributeError, "readonly attribute");
|
|
470
|
+
return -1;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
static PyObject *Nuitka_ResourceReaderFiles_get_suffix(PyObject *self, void *data) {
|
|
474
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
475
|
+
|
|
476
|
+
struct Nuitka_ResourceReaderFilesObject *files = (struct Nuitka_ResourceReaderFilesObject *)self;
|
|
477
|
+
PyObject *path = _Nuitka_ResourceReaderFiles_GetPath(tstate, files);
|
|
478
|
+
|
|
479
|
+
PyObject *basename = OS_PATH_BASENAME(tstate, path);
|
|
480
|
+
Py_DECREF(path);
|
|
481
|
+
|
|
482
|
+
PyObject *dot_index = UNICODE_RFIND2(tstate, basename, const_str_dot);
|
|
483
|
+
|
|
484
|
+
PyObject *result;
|
|
485
|
+
if (dot_index == Py_None) {
|
|
486
|
+
result = const_str_empty;
|
|
487
|
+
Py_INCREF_IMMORTAL(result);
|
|
488
|
+
} else {
|
|
489
|
+
result = PyUnicode_Substring(basename, PyLong_AsLong(dot_index), PyUnicode_GetLength(basename));
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
Py_DECREF(basename);
|
|
493
|
+
Py_DECREF(dot_index);
|
|
494
|
+
|
|
495
|
+
return result;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// TODO: Why don't we just share this method.
|
|
499
|
+
static int Nuitka_ResourceReaderFiles_set_suffix(PyObject *self, PyObject *value, void *data) {
|
|
500
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
501
|
+
|
|
502
|
+
SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_AttributeError, "readonly attribute");
|
|
503
|
+
return -1;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
static PyObject *Nuitka_ResourceReaderFiles_get_stem(PyObject *self, void *data) {
|
|
507
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
508
|
+
|
|
509
|
+
struct Nuitka_ResourceReaderFilesObject *files = (struct Nuitka_ResourceReaderFilesObject *)self;
|
|
510
|
+
PyObject *path = _Nuitka_ResourceReaderFiles_GetPath(tstate, files);
|
|
511
|
+
|
|
512
|
+
PyObject *basename = OS_PATH_BASENAME(tstate, path);
|
|
513
|
+
Py_DECREF(path);
|
|
514
|
+
|
|
515
|
+
PyObject *dot_index = UNICODE_RFIND2(tstate, basename, const_str_dot);
|
|
516
|
+
CHECK_OBJECT(dot_index);
|
|
517
|
+
|
|
518
|
+
PyObject *result;
|
|
519
|
+
|
|
520
|
+
if (dot_index == Py_None) {
|
|
521
|
+
result = const_str_empty;
|
|
522
|
+
Py_INCREF_IMMORTAL(result);
|
|
523
|
+
} else {
|
|
524
|
+
int dot_index_long = PyLong_AsLong(dot_index);
|
|
525
|
+
|
|
526
|
+
if (dot_index_long > 0 && dot_index_long < PyUnicode_GetLength(basename) - 1) {
|
|
527
|
+
result = PyUnicode_Substring(basename, 0, PyLong_AsLong(dot_index));
|
|
528
|
+
} else {
|
|
529
|
+
Py_INCREF(basename);
|
|
530
|
+
result = basename;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
Py_DECREF(basename);
|
|
535
|
+
Py_DECREF(dot_index);
|
|
536
|
+
|
|
537
|
+
CHECK_OBJECT(result);
|
|
538
|
+
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// TODO: Why don't we just share this method.
|
|
543
|
+
static int Nuitka_ResourceReaderFiles_set_stem(PyObject *self, PyObject *value, void *data) {
|
|
544
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
545
|
+
|
|
546
|
+
SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_AttributeError, "readonly attribute");
|
|
547
|
+
return -1;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
static PyObject *Nuitka_ResourceReaderFiles_get_suffixes(PyObject *self, void *data) {
|
|
551
|
+
PyThreadState *tstate = PyThreadState_GET();
|
|
552
|
+
|
|
553
|
+
struct Nuitka_ResourceReaderFilesObject *files = (struct Nuitka_ResourceReaderFilesObject *)self;
|
|
554
|
+
PyObject *path = _Nuitka_ResourceReaderFiles_GetPath(tstate, files);
|
|
555
|
+
|
|
556
|
+
PyObject *basename = OS_PATH_BASENAME(tstate, path);
|
|
557
|
+
Py_DECREF(path);
|
|
558
|
+
|
|
559
|
+
PyObject *result = MAKE_LIST_EMPTY(tstate, 0);
|
|
560
|
+
|
|
561
|
+
if (UNICODE_ENDSWITH2(tstate, basename, const_str_dot) == Py_True) {
|
|
562
|
+
return result;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
PyObject *current = UNICODE_LSTRIP2(tstate, basename, const_str_dot);
|
|
566
|
+
|
|
567
|
+
PyObject *parts = UNICODE_SPLIT2(tstate, current, const_str_dot);
|
|
568
|
+
Py_DECREF(current);
|
|
569
|
+
|
|
570
|
+
for (Py_ssize_t i = 1; i < PyList_GET_SIZE(parts); i++) {
|
|
571
|
+
current = const_str_dot;
|
|
572
|
+
Py_INCREF_IMMORTAL(current);
|
|
573
|
+
|
|
574
|
+
UNICODE_APPEND(tstate, ¤t, PyList_GET_ITEM(parts, i));
|
|
575
|
+
|
|
576
|
+
LIST_APPEND0(result, current);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
CHECK_OBJECT_DEEP(result);
|
|
580
|
+
|
|
581
|
+
return result;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// TODO: Why don't we just share this method.
|
|
585
|
+
static int Nuitka_ResourceReaderFiles_set_suffixes(PyObject *self, PyObject *value, void *data) {
|
|
466
586
|
PyThreadState *tstate = PyThreadState_GET();
|
|
467
587
|
|
|
468
588
|
SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_AttributeError, "readonly attribute");
|
|
@@ -495,9 +615,10 @@ static PyMethodDef Nuitka_ResourceReaderFiles_methods[] = {
|
|
|
495
615
|
// The base name of this object without any parent references.
|
|
496
616
|
// """
|
|
497
617
|
|
|
498
|
-
static PyObject *Nuitka_ResourceReaderFiles_get_name(
|
|
618
|
+
static PyObject *Nuitka_ResourceReaderFiles_get_name(PyObject *self, void *data) {
|
|
499
619
|
PyThreadState *tstate = PyThreadState_GET();
|
|
500
620
|
|
|
621
|
+
struct Nuitka_ResourceReaderFilesObject *files = (struct Nuitka_ResourceReaderFilesObject *)self;
|
|
501
622
|
PyObject *file_name = _Nuitka_ResourceReaderFiles_GetPath(tstate, files);
|
|
502
623
|
PyObject *result = OS_PATH_BASENAME(tstate, file_name);
|
|
503
624
|
Py_DECREF(file_name);
|
|
@@ -505,7 +626,7 @@ static PyObject *Nuitka_ResourceReaderFiles_get_name(struct Nuitka_ResourceReade
|
|
|
505
626
|
return result;
|
|
506
627
|
}
|
|
507
628
|
|
|
508
|
-
static int Nuitka_ResourceReaderFiles_set_name(
|
|
629
|
+
static int Nuitka_ResourceReaderFiles_set_name(PyObject *self, PyObject *value, void *data) {
|
|
509
630
|
PyThreadState *tstate = PyThreadState_GET();
|
|
510
631
|
|
|
511
632
|
SET_CURRENT_EXCEPTION_TYPE0_STR(tstate, PyExc_AttributeError, "readonly attribute");
|
|
@@ -513,7 +634,7 @@ static int Nuitka_ResourceReaderFiles_set_name(struct Nuitka_ResourceReaderFiles
|
|
|
513
634
|
}
|
|
514
635
|
|
|
515
636
|
static PyObject *Nuitka_ResourceReaderFiles_tp_richcompare(struct Nuitka_ResourceReaderFilesObject *files_a,
|
|
516
|
-
PyObject *other, int
|
|
637
|
+
PyObject *other, int op_id) {
|
|
517
638
|
PyObject *a = PyObject_Str((PyObject *)files_a);
|
|
518
639
|
CHECK_OBJECT(a);
|
|
519
640
|
|
|
@@ -523,17 +644,19 @@ static PyObject *Nuitka_ResourceReaderFiles_tp_richcompare(struct Nuitka_Resourc
|
|
|
523
644
|
return NULL;
|
|
524
645
|
}
|
|
525
646
|
|
|
526
|
-
PyObject *result = PyObject_RichCompare(a, b,
|
|
647
|
+
PyObject *result = PyObject_RichCompare(a, b, op_id);
|
|
527
648
|
|
|
528
649
|
Py_DECREF(b);
|
|
529
650
|
|
|
530
651
|
return result;
|
|
531
652
|
}
|
|
532
653
|
|
|
533
|
-
static PyGetSetDef
|
|
534
|
-
{(char *)"name",
|
|
535
|
-
{(char *)"parent",
|
|
536
|
-
|
|
654
|
+
static PyGetSetDef Nuitka_ResourceReaderFiles_tp_getset[] = {
|
|
655
|
+
{(char *)"name", Nuitka_ResourceReaderFiles_get_name, Nuitka_ResourceReaderFiles_set_name, NULL},
|
|
656
|
+
{(char *)"parent", Nuitka_ResourceReaderFiles_get_parent, Nuitka_ResourceReaderFiles_set_parent, NULL},
|
|
657
|
+
{(char *)"suffix", Nuitka_ResourceReaderFiles_get_suffix, Nuitka_ResourceReaderFiles_set_suffix, NULL},
|
|
658
|
+
{(char *)"stem", Nuitka_ResourceReaderFiles_get_stem, Nuitka_ResourceReaderFiles_set_stem, NULL},
|
|
659
|
+
{(char *)"suffixes", Nuitka_ResourceReaderFiles_get_suffixes, Nuitka_ResourceReaderFiles_set_suffixes, NULL},
|
|
537
660
|
{NULL}};
|
|
538
661
|
|
|
539
662
|
// Initialized during readying the type for nb_truediv
|
|
@@ -568,7 +691,7 @@ static PyTypeObject Nuitka_ResourceReaderFiles_Type = {
|
|
|
568
691
|
0, // tp_iternext
|
|
569
692
|
Nuitka_ResourceReaderFiles_methods, // tp_methods
|
|
570
693
|
0, // tp_members
|
|
571
|
-
|
|
694
|
+
Nuitka_ResourceReaderFiles_tp_getset, // tp_getset
|
|
572
695
|
};
|
|
573
696
|
|
|
574
697
|
#if PYTHON_VERSION >= 0x390
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
#include "HelpersFilesystemPaths.c"
|
|
107
107
|
#include "HelpersSafeStrings.c"
|
|
108
108
|
|
|
109
|
-
#if defined(_WIN32) && defined(_NUITKA_ATTACH_CONSOLE_WINDOW)
|
|
109
|
+
#if defined(_WIN32) && (defined(_NUITKA_ATTACH_CONSOLE_WINDOW) || defined(_NUITKA_HIDE_CONSOLE_WINDOW))
|
|
110
110
|
#include "HelpersConsole.c"
|
|
111
111
|
#endif
|
|
112
112
|
|
|
@@ -1067,6 +1067,9 @@ int wmain(int argc, wchar_t** argv)
|
|
|
1067
1067
|
int startup(int argc, wchar_t **argv) {
|
|
1068
1068
|
#else
|
|
1069
1069
|
int wmain(int argc, wchar_t **argv) {
|
|
1070
|
+
#if defined(_NUITKA_HIDE_CONSOLE_WINDOW)
|
|
1071
|
+
hideConsoleIfSpawned();
|
|
1072
|
+
#endif
|
|
1070
1073
|
#endif
|
|
1071
1074
|
#else
|
|
1072
1075
|
int main(int argc, char **argv) {
|
|
@@ -1317,6 +1320,8 @@ int main(int argc, char **argv) {
|
|
|
1317
1320
|
#endif
|
|
1318
1321
|
setEnvironmentVariable("NUITKA_ONEFILE_BINARY", binary_filename);
|
|
1319
1322
|
|
|
1323
|
+
setEnvironmentVariable("NUITKA_ORIGINAL_ARGV0", argv[0]);
|
|
1324
|
+
|
|
1320
1325
|
NUITKA_PRINT_TIMING("ONEFILE: Preparing forking of slave process.");
|
|
1321
1326
|
|
|
1322
1327
|
#if defined(_WIN32)
|
|
@@ -81,17 +81,13 @@ def getAsyncgenObjectCode(
|
|
|
81
81
|
|
|
82
82
|
if needs_exception_exit:
|
|
83
83
|
(
|
|
84
|
-
|
|
85
|
-
exception_value,
|
|
86
|
-
exception_tb,
|
|
84
|
+
exception_state_name,
|
|
87
85
|
_exception_lineno,
|
|
88
86
|
) = context.variable_storage.getExceptionVariableDescriptions()
|
|
89
87
|
|
|
90
88
|
generator_exit = template_asyncgen_exception_exit % {
|
|
91
89
|
"function_cleanup": indented(function_cleanup),
|
|
92
|
-
"
|
|
93
|
-
"exception_value": exception_value,
|
|
94
|
-
"exception_tb": exception_tb,
|
|
90
|
+
"exception_state_name": exception_state_name,
|
|
95
91
|
}
|
|
96
92
|
else:
|
|
97
93
|
generator_exit = template_asyncgen_noexception_exit % {
|