Nuitka-winsvc 2.3.9__cp311-cp311-win_amd64.whl → 2.4.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.3.9.data/scripts/nuitka-run.bat → Nuitka_winsvc-2.4.1.data/scripts/nuitka-run.cmd +1 -1
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/METADATA +1 -1
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/RECORD +213 -210
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/WHEEL +1 -1
- nuitka/CacheCleanup.py +6 -1
- nuitka/HardImportRegistry.py +29 -2
- nuitka/MainControl.py +62 -35
- nuitka/ModuleRegistry.py +11 -3
- nuitka/OptionParsing.py +78 -39
- nuitka/Options.py +142 -35
- nuitka/OutputDirectories.py +5 -0
- nuitka/PostProcessing.py +23 -14
- nuitka/PythonFlavors.py +22 -4
- nuitka/PythonVersions.py +18 -0
- nuitka/Tracing.py +26 -23
- nuitka/TreeXML.py +6 -3
- nuitka/Version.py +1 -1
- nuitka/__main__.py +55 -10
- nuitka/build/Backend.scons +6 -1
- nuitka/build/CCompilerVersion.scons +1 -0
- nuitka/build/Onefile.scons +4 -0
- nuitka/build/SconsCaching.py +1 -0
- nuitka/build/SconsCompilerSettings.py +1 -0
- nuitka/build/SconsHacks.py +5 -1
- nuitka/build/SconsInterface.py +2 -0
- nuitka/build/SconsUtils.py +5 -2
- nuitka/build/include/nuitka/allocator.h +27 -5
- nuitka/build/include/nuitka/calling.h +1 -1
- nuitka/build/include/nuitka/compiled_frame.h +23 -23
- nuitka/build/include/nuitka/compiled_method.h +1 -1
- nuitka/build/include/nuitka/exception_groups.h +0 -2
- nuitka/build/include/nuitka/helper/attributes.h +7 -1
- nuitka/build/include/nuitka/helper/subscripts.h +1 -1
- nuitka/build/include/nuitka/helpers.h +7 -4
- nuitka/build/include/nuitka/prelude.h +6 -10
- nuitka/build/include/nuitka/printing.h +2 -0
- nuitka/build/include/nuitka/unfreezing.h +5 -5
- nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +4 -1
- nuitka/build/static_src/CompiledAsyncgenType.c +2 -4
- nuitka/build/static_src/CompiledCellType.c +7 -7
- nuitka/build/static_src/CompiledCodeHelpers.c +51 -36
- nuitka/build/static_src/CompiledCoroutineType.c +2 -4
- nuitka/build/static_src/CompiledFrameType.c +109 -82
- nuitka/build/static_src/CompiledFunctionType.c +36 -9
- nuitka/build/static_src/CompiledGeneratorType.c +12 -10
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2 -2
- nuitka/build/static_src/CompiledMethodType.c +14 -13
- nuitka/build/static_src/HelpersAttributes.c +13 -15
- nuitka/build/static_src/HelpersBuiltin.c +18 -9
- nuitka/build/static_src/HelpersCalling.c +13 -13
- nuitka/build/static_src/HelpersCallingGenerated.c +22 -22
- nuitka/build/static_src/HelpersComparisonEq.c +110 -110
- nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
- nuitka/build/static_src/HelpersComparisonGe.c +110 -110
- nuitka/build/static_src/HelpersComparisonGt.c +110 -110
- nuitka/build/static_src/HelpersComparisonLe.c +110 -110
- nuitka/build/static_src/HelpersComparisonLt.c +110 -110
- nuitka/build/static_src/HelpersComparisonNe.c +110 -110
- nuitka/build/static_src/HelpersConstantsBlob.c +480 -481
- nuitka/build/static_src/HelpersDictionaries.c +9 -0
- nuitka/build/static_src/HelpersFiles.c +2 -2
- nuitka/build/static_src/HelpersFilesystemPaths.c +28 -13
- nuitka/build/static_src/HelpersHeapStorage.c +4 -0
- nuitka/build/static_src/HelpersImport.c +1 -1
- nuitka/build/static_src/HelpersLists.c +5 -1
- nuitka/build/static_src/HelpersMatching.c +95 -35
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +23 -23
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -0
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +11 -11
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +11 -11
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +11 -11
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +17 -17
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +9 -9
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +10 -10
- nuitka/build/static_src/HelpersOperationInplaceMod.c +47 -47
- nuitka/build/static_src/HelpersOperationInplaceMult.c +28 -28
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +17 -17
- nuitka/build/static_src/HelpersOperationInplacePow.c +17 -17
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +9 -9
- nuitka/build/static_src/HelpersOperationInplaceSub.c +17 -17
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +17 -17
- nuitka/build/static_src/HelpersSequences.c +1 -1
- nuitka/build/static_src/HelpersTypes.c +8 -4
- nuitka/build/static_src/MainProgram.c +28 -9
- nuitka/build/static_src/MetaPathBasedLoader.c +126 -110
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +13 -4
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +30 -1
- nuitka/build/static_src/OnefileBootstrap.c +34 -6
- nuitka/code_generation/AttributeCodes.py +12 -10
- nuitka/code_generation/CodeGeneration.py +6 -7
- nuitka/code_generation/ConstantCodes.py +53 -10
- nuitka/code_generation/GlobalConstants.py +6 -6
- nuitka/code_generation/Indentation.py +3 -4
- nuitka/code_generation/LoaderCodes.py +3 -0
- nuitka/code_generation/LocalsDictCodes.py +36 -14
- nuitka/code_generation/MatchCodes.py +23 -4
- nuitka/code_generation/ModuleCodes.py +0 -7
- nuitka/code_generation/Namify.py +2 -0
- nuitka/code_generation/PackageResourceCodes.py +5 -1
- nuitka/code_generation/templates/CodeTemplatesConstants.py +6 -4
- nuitka/code_generation/templates/CodeTemplatesLoader.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesModules.py +3 -3
- nuitka/code_generation/templates/CodeTemplatesVariables.py +16 -2
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +2 -2
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +7 -7
- nuitka/freezer/DependsExe.py +3 -1
- nuitka/freezer/DllDependenciesMacOS.py +28 -14
- nuitka/freezer/IncludedDataFiles.py +12 -3
- nuitka/freezer/IncludedEntryPoints.py +8 -2
- nuitka/freezer/Onefile.py +6 -1
- nuitka/freezer/Standalone.py +9 -2
- nuitka/importing/Importing.py +14 -5
- nuitka/importing/Recursion.py +3 -0
- nuitka/nodes/AttributeNodesGenerated.py +21 -12
- nuitka/nodes/BuiltinOpenNodes.py +5 -0
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +11 -11
- nuitka/nodes/BuiltinRefNodes.py +41 -1
- nuitka/nodes/ChildrenHavingMixins.py +143 -355
- nuitka/nodes/ClassNodes.py +30 -12
- nuitka/nodes/CodeObjectSpecs.py +9 -0
- nuitka/nodes/ExpressionBasesGenerated.py +11 -11
- nuitka/nodes/FunctionNodes.py +11 -12
- nuitka/nodes/FutureSpecs.py +16 -3
- nuitka/nodes/GeneratorNodes.py +2 -2
- nuitka/nodes/HardImportNodesGenerated.py +11 -134
- nuitka/nodes/LocalsScopes.py +19 -23
- nuitka/nodes/MatchNodes.py +18 -7
- nuitka/nodes/ModuleAttributeNodes.py +1 -20
- nuitka/nodes/ModuleNodes.py +23 -6
- nuitka/nodes/NodeBases.py +13 -11
- nuitka/nodes/NodeMetaClasses.py +26 -10
- nuitka/nodes/ReturnNodes.py +1 -1
- nuitka/nodes/StatementBasesGenerated.py +11 -11
- nuitka/nodes/SubscriptNodes.py +4 -4
- nuitka/nodes/VariableAssignNodes.py +1 -1
- nuitka/nodes/VariableRefNodes.py +28 -2
- nuitka/nodes/shapes/BuiltinTypeShapes.py +21 -1
- nuitka/optimizations/FunctionInlining.py +3 -6
- nuitka/optimizations/Optimization.py +13 -12
- nuitka/optimizations/TraceCollections.py +19 -4
- nuitka/plugins/PluginBase.py +121 -133
- nuitka/plugins/Plugins.py +91 -3
- nuitka/plugins/YamlPluginBase.py +121 -0
- nuitka/plugins/standard/AntiBloatPlugin.py +87 -28
- nuitka/plugins/standard/DataFilesPlugin.py +15 -6
- nuitka/plugins/standard/DelvewheelPlugin.py +7 -3
- nuitka/plugins/standard/DllFilesPlugin.py +5 -3
- nuitka/plugins/standard/ImplicitImports.py +34 -20
- nuitka/plugins/standard/MatplotlibPlugin.py +3 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +2 -2
- nuitka/plugins/standard/OptionsNannyPlugin.py +1 -1
- nuitka/plugins/standard/PySidePyQtPlugin.py +11 -12
- nuitka/plugins/standard/SpacyPlugin.py +136 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +491 -186
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +17 -0
- nuitka/reports/Reports.py +53 -5
- nuitka/specs/BuiltinParameterSpecs.py +1 -1
- nuitka/specs/HardImportSpecs.py +0 -6
- nuitka/tools/data_composer/DataComposer.py +29 -27
- nuitka/tools/environments/CreateEnvironment.py +1 -0
- nuitka/tools/environments/Virtualenv.py +25 -11
- nuitka/tools/general/find_module/FindModuleCode.py +13 -3
- nuitka/tools/onefile_compressor/OnefileCompressor.py +21 -4
- nuitka/tools/scanning/DisplayPackageDLLs.py +17 -3
- nuitka/tools/specialize/CTypeDescriptions.py +13 -7
- nuitka/tools/specialize/SpecializePython.py +18 -1
- nuitka/tools/testing/Common.py +19 -6
- nuitka/tools/testing/check_reference_counts/__main__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__main__.py +0 -20
- nuitka/tools/watch/AutoStage.py +144 -0
- nuitka/tools/watch/__main__.py +79 -32
- nuitka/tree/Building.py +105 -104
- nuitka/tree/ComplexCallHelperFunctions.py +16 -26
- nuitka/tree/InternalModule.py +9 -1
- nuitka/tree/ReformulationAssignmentStatements.py +29 -59
- nuitka/tree/ReformulationClasses.py +10 -17
- nuitka/tree/ReformulationClasses3.py +69 -43
- nuitka/tree/ReformulationComparisonExpressions.py +6 -16
- nuitka/tree/ReformulationContractionExpressions.py +14 -23
- nuitka/tree/ReformulationDictionaryCreation.py +6 -10
- nuitka/tree/ReformulationExecStatements.py +10 -10
- nuitka/tree/ReformulationForLoopStatements.py +6 -12
- nuitka/tree/ReformulationFunctionStatements.py +22 -28
- nuitka/tree/ReformulationImportStatements.py +8 -10
- nuitka/tree/ReformulationLambdaExpressions.py +3 -6
- nuitka/tree/ReformulationMatchStatements.py +166 -60
- nuitka/tree/ReformulationMultidist.py +3 -1
- nuitka/tree/ReformulationNamespacePackages.py +1 -1
- nuitka/tree/ReformulationPrintStatements.py +3 -6
- nuitka/tree/ReformulationSequenceCreation.py +13 -26
- nuitka/tree/ReformulationTryFinallyStatements.py +15 -0
- nuitka/tree/ReformulationWithStatements.py +12 -16
- nuitka/tree/SourceHandling.py +13 -8
- nuitka/tree/VariableClosure.py +5 -21
- nuitka/utils/Distributions.py +80 -11
- nuitka/utils/Download.py +38 -31
- nuitka/utils/Execution.py +21 -9
- nuitka/utils/FileOperations.py +55 -28
- nuitka/utils/Images.py +6 -1
- nuitka/utils/Importing.py +1 -1
- nuitka/utils/ModuleNames.py +11 -5
- nuitka/utils/ReExecute.py +17 -13
- nuitka/utils/SharedLibraries.py +69 -41
- nuitka/utils/Signing.py +3 -1
- nuitka/utils/StaticLibraries.py +51 -41
- nuitka/utils/Timing.py +1 -1
- nuitka/utils/Utils.py +29 -7
- /Nuitka_winsvc-2.3.9.data/scripts/nuitka.bat → /Nuitka_winsvc-2.4.1.data/scripts/nuitka.cmd +0 -0
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.3.9.dist-info → Nuitka_winsvc-2.4.1.dist-info}/top_level.txt +0 -0
nuitka/freezer/DependsExe.py
CHANGED
|
@@ -44,6 +44,7 @@ def getDependsExePath():
|
|
|
44
44
|
url=depends_url,
|
|
45
45
|
is_arch_specific=getArchitecture(),
|
|
46
46
|
binary="depends.exe",
|
|
47
|
+
unzip=True,
|
|
47
48
|
flatten=True,
|
|
48
49
|
specificity="", # Note: If there ever was an update, put version here.
|
|
49
50
|
message="""\
|
|
@@ -213,7 +214,8 @@ SxS
|
|
|
213
214
|
|
|
214
215
|
if not os.path.exists(output_filename):
|
|
215
216
|
inclusion_logger.sysexit(
|
|
216
|
-
"Error, 'depends.exe' failed to produce expected output."
|
|
217
|
+
"Error, 'depends.exe' failed to produce expected output for binary '%s'."
|
|
218
|
+
% binary_filename
|
|
217
219
|
)
|
|
218
220
|
|
|
219
221
|
# Opening the result under lock, so it is not getting locked by new processes.
|
|
@@ -25,6 +25,7 @@ from nuitka.utils.SharedLibraries import (
|
|
|
25
25
|
callInstallNameTool,
|
|
26
26
|
getOtoolDependencyOutput,
|
|
27
27
|
getOtoolListing,
|
|
28
|
+
parseOtoolListingOutput,
|
|
28
29
|
)
|
|
29
30
|
from nuitka.utils.Utils import getArchitecture
|
|
30
31
|
|
|
@@ -109,17 +110,9 @@ def detectBinaryPathDLLsMacOS(
|
|
|
109
110
|
|
|
110
111
|
|
|
111
112
|
def _parseOtoolListingOutput(output):
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
for line in output.split(b"\n")[1:]:
|
|
115
|
-
if str is not bytes:
|
|
116
|
-
line = line.decode("utf8")
|
|
117
|
-
|
|
118
|
-
if not line:
|
|
119
|
-
continue
|
|
120
|
-
|
|
121
|
-
filename = line.split(" (", 1)[0].strip()
|
|
113
|
+
result = OrderedSet()
|
|
122
114
|
|
|
115
|
+
for filename in parseOtoolListingOutput(output):
|
|
123
116
|
# Ignore dependency from system paths.
|
|
124
117
|
if not isFilenameBelowPath(
|
|
125
118
|
path=(
|
|
@@ -129,12 +122,12 @@ def _parseOtoolListingOutput(output):
|
|
|
129
122
|
),
|
|
130
123
|
filename=filename,
|
|
131
124
|
):
|
|
132
|
-
|
|
125
|
+
result.add(filename)
|
|
133
126
|
|
|
134
|
-
return
|
|
127
|
+
return result
|
|
135
128
|
|
|
136
129
|
|
|
137
|
-
def
|
|
130
|
+
def _getNonVersionedDllFilenames2(filename):
|
|
138
131
|
yield filename
|
|
139
132
|
|
|
140
133
|
if getArchitecture() == "arm64" and filename.endswith(".dylib"):
|
|
@@ -152,6 +145,25 @@ def _getNonVersionedDllFilenames(filename):
|
|
|
152
145
|
yield match.group(1) + "_arm64.dylib"
|
|
153
146
|
|
|
154
147
|
|
|
148
|
+
def _getNonVersionedDllFilenames(dll_filename, package_name):
|
|
149
|
+
for filename in _getNonVersionedDllFilenames2(dll_filename):
|
|
150
|
+
yield filename
|
|
151
|
+
|
|
152
|
+
# Some build systems, internally prefix DLLs with package names, attempt
|
|
153
|
+
# those removed as well.
|
|
154
|
+
if package_name is not None:
|
|
155
|
+
package_prefix = package_name.asString() + "."
|
|
156
|
+
|
|
157
|
+
if os.path.basename(dll_filename).startswith(package_prefix):
|
|
158
|
+
dll_filename = os.path.join(
|
|
159
|
+
os.path.dirname(dll_filename),
|
|
160
|
+
os.path.basename(dll_filename)[len(package_prefix) :],
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
for filename in _getNonVersionedDllFilenames2(dll_filename):
|
|
164
|
+
yield filename
|
|
165
|
+
|
|
166
|
+
|
|
155
167
|
def _resolveBinaryPathDLLsMacOS(
|
|
156
168
|
original_dir, binary_filename, paths, package_specific_dirs, package_name
|
|
157
169
|
):
|
|
@@ -222,7 +234,9 @@ def _resolveBinaryPathDLLsMacOS(
|
|
|
222
234
|
specific_suffix = so_suffixes[0]
|
|
223
235
|
abi_suffix = so_suffixes[1]
|
|
224
236
|
|
|
225
|
-
for resolved_path_candidate in _getNonVersionedDllFilenames(
|
|
237
|
+
for resolved_path_candidate in _getNonVersionedDllFilenames(
|
|
238
|
+
dll_filename=resolved_path, package_name=package_name
|
|
239
|
+
):
|
|
226
240
|
if os.path.exists(resolved_path_candidate):
|
|
227
241
|
resolved_path = resolved_path_candidate
|
|
228
242
|
break
|
|
@@ -26,7 +26,7 @@ from nuitka.Options import (
|
|
|
26
26
|
shallMakeModule,
|
|
27
27
|
)
|
|
28
28
|
from nuitka.OutputDirectories import getStandaloneDirectoryPath
|
|
29
|
-
from nuitka.Tracing import options_logger
|
|
29
|
+
from nuitka.Tracing import general, options_logger
|
|
30
30
|
from nuitka.utils.FileOperations import (
|
|
31
31
|
areSamePaths,
|
|
32
32
|
containsPathElements,
|
|
@@ -36,6 +36,7 @@ from nuitka.utils.FileOperations import (
|
|
|
36
36
|
getFilenameExtension,
|
|
37
37
|
getFileSize,
|
|
38
38
|
isFilenameBelowPath,
|
|
39
|
+
isLegalPath,
|
|
39
40
|
isRelativePath,
|
|
40
41
|
makePath,
|
|
41
42
|
openTextFile,
|
|
@@ -98,6 +99,14 @@ class IncludedDataFile(object):
|
|
|
98
99
|
self.kind = kind
|
|
99
100
|
self.source_path = source_path
|
|
100
101
|
self.dest_path = os.path.normpath(dest_path)
|
|
102
|
+
|
|
103
|
+
is_legal, illegal_reason = isLegalPath(dest_path)
|
|
104
|
+
if not is_legal:
|
|
105
|
+
general.sysexit(
|
|
106
|
+
"Error, cannot add data file with '%s' path, as '%s'"
|
|
107
|
+
% (dest_path, illegal_reason)
|
|
108
|
+
)
|
|
109
|
+
|
|
101
110
|
self.reason = reason
|
|
102
111
|
self.data = data
|
|
103
112
|
self.tags = tags_set
|
|
@@ -159,8 +168,8 @@ def makeIncludedDataFile(source_path, dest_path, reason, tracer, tags):
|
|
|
159
168
|
if isAcceleratedMode():
|
|
160
169
|
if "package_data" not in tags and not areSamePaths(source_path, dest_path):
|
|
161
170
|
tracer.sysexit(
|
|
162
|
-
"Error, cannot change paths for data files in accelerated mode '%s'."
|
|
163
|
-
% dest_path
|
|
171
|
+
"Error, cannot change paths for data files in accelerated mode from '%s' to '%s'."
|
|
172
|
+
% (source_path, dest_path)
|
|
164
173
|
)
|
|
165
174
|
else:
|
|
166
175
|
inside = True
|
|
@@ -315,12 +315,18 @@ def setMainEntryPoint(binary_filename):
|
|
|
315
315
|
|
|
316
316
|
|
|
317
317
|
def addExtensionModuleEntryPoint(module):
|
|
318
|
+
dest_path = module.getFullName().asPath()
|
|
319
|
+
|
|
320
|
+
if module.isExtensionModulePackage():
|
|
321
|
+
dest_path = os.path.join(dest_path, "__init__")
|
|
322
|
+
|
|
323
|
+
dest_path += getSharedLibrarySuffix(preferred=False)
|
|
324
|
+
|
|
318
325
|
standalone_entry_points.append(
|
|
319
326
|
makeExtensionModuleEntryPoint(
|
|
320
327
|
logger=general,
|
|
321
328
|
source_path=module.getFilename(),
|
|
322
|
-
dest_path=
|
|
323
|
-
+ getSharedLibrarySuffix(preferred=False),
|
|
329
|
+
dest_path=dest_path,
|
|
324
330
|
module_name=module.getFullName(),
|
|
325
331
|
package_name=module.getFullName().getPackageName(),
|
|
326
332
|
reason=(
|
nuitka/freezer/Onefile.py
CHANGED
|
@@ -270,7 +270,12 @@ def packDistFolderToOnefileBootstrap(onefile_output_filename, dist_dir):
|
|
|
270
270
|
if Options.isRemoveBuildDir():
|
|
271
271
|
onefile_logger.info("Removing onefile build directory '%s'." % source_dir)
|
|
272
272
|
|
|
273
|
-
removeDirectory(
|
|
273
|
+
removeDirectory(
|
|
274
|
+
path=source_dir,
|
|
275
|
+
logger=onefile_logger,
|
|
276
|
+
ignore_errors=False,
|
|
277
|
+
extra_recommendation=None,
|
|
278
|
+
)
|
|
274
279
|
assert not os.path.exists(source_dir)
|
|
275
280
|
else:
|
|
276
281
|
onefile_logger.info("Keeping onefile build directory '%s'." % source_dir)
|
nuitka/freezer/Standalone.py
CHANGED
|
@@ -28,7 +28,11 @@ from nuitka.Progress import (
|
|
|
28
28
|
reportProgressBar,
|
|
29
29
|
setupProgressBar,
|
|
30
30
|
)
|
|
31
|
-
from nuitka.PythonFlavors import
|
|
31
|
+
from nuitka.PythonFlavors import (
|
|
32
|
+
getHomebrewInstallPath,
|
|
33
|
+
isAnacondaPython,
|
|
34
|
+
isHomebrewPython,
|
|
35
|
+
)
|
|
32
36
|
from nuitka.PythonVersions import getSystemPrefixPath
|
|
33
37
|
from nuitka.Tracing import general, inclusion_logger
|
|
34
38
|
from nuitka.utils.FileOperations import areInSamePaths, isFilenameBelowPath
|
|
@@ -226,9 +230,12 @@ def copyDllsUsed(dist_dir, standalone_entry_points):
|
|
|
226
230
|
def _reduceToPythonPath(used_dlls):
|
|
227
231
|
inside_paths = getPythonUnpackedSearchPath()
|
|
228
232
|
|
|
229
|
-
if isAnacondaPython()
|
|
233
|
+
if isAnacondaPython():
|
|
230
234
|
inside_paths.insert(0, getSystemPrefixPath())
|
|
231
235
|
|
|
236
|
+
if isHomebrewPython():
|
|
237
|
+
inside_paths.insert(0, getHomebrewInstallPath())
|
|
238
|
+
|
|
232
239
|
def decideInside(dll_filename):
|
|
233
240
|
return any(
|
|
234
241
|
isFilenameBelowPath(path=inside_path, filename=dll_filename)
|
nuitka/importing/Importing.py
CHANGED
|
@@ -49,7 +49,11 @@ from nuitka.utils.ModuleNames import ModuleName
|
|
|
49
49
|
from nuitka.utils.SharedLibraries import (
|
|
50
50
|
hasUniversalOrMatchingMacOSArchitecture,
|
|
51
51
|
)
|
|
52
|
-
from nuitka.utils.Utils import
|
|
52
|
+
from nuitka.utils.Utils import (
|
|
53
|
+
getLaunchingNuitkaProcessEnvironmentValue,
|
|
54
|
+
isMacOS,
|
|
55
|
+
isWin32OrPosixWindows,
|
|
56
|
+
)
|
|
53
57
|
|
|
54
58
|
from .IgnoreListing import isIgnoreListedNotExistingModule
|
|
55
59
|
from .PreloadedPackages import getPreloadedPackagePath, isPreloadedPackagePath
|
|
@@ -185,7 +189,7 @@ def hasMainScriptDirectory():
|
|
|
185
189
|
def isPackageDir(dirname):
|
|
186
190
|
"""Decide if a directory is a package.
|
|
187
191
|
|
|
188
|
-
Before Python3
|
|
192
|
+
Before Python3 it's required to have a "__init__.py" file, but then
|
|
189
193
|
it became impossible to decide, and for extra fun, there is also the
|
|
190
194
|
extra packages provided via "*.pth" file tricks by "site.py" loading.
|
|
191
195
|
"""
|
|
@@ -340,7 +344,7 @@ def findModule(module_name, parent_package, level):
|
|
|
340
344
|
# TODO: Should give a warning and return not found if the levels
|
|
341
345
|
# exceed the package name.
|
|
342
346
|
if parent_package is not None:
|
|
343
|
-
parent_package = parent_package.getRelativePackageName(level)
|
|
347
|
+
parent_package = parent_package.getRelativePackageName(level - 1)
|
|
344
348
|
else:
|
|
345
349
|
return None, None, None, "not-found"
|
|
346
350
|
|
|
@@ -642,7 +646,12 @@ def _unpackPathElement(path_entry):
|
|
|
642
646
|
zip_ref.extractall(target_dir)
|
|
643
647
|
zip_ref.close()
|
|
644
648
|
except BaseException:
|
|
645
|
-
removeDirectory(
|
|
649
|
+
removeDirectory(
|
|
650
|
+
target_dir,
|
|
651
|
+
logger=recursion_logger,
|
|
652
|
+
ignore_errors=True,
|
|
653
|
+
extra_recommendation=None,
|
|
654
|
+
)
|
|
646
655
|
raise
|
|
647
656
|
|
|
648
657
|
_egg_files[path_entry] = target_dir
|
|
@@ -719,7 +728,7 @@ def _findModuleInPath(module_name):
|
|
|
719
728
|
# executed, while we normally search in PYTHONPATH after it was executed,
|
|
720
729
|
# and on some systems, that fails.
|
|
721
730
|
if package_name is None and module_name == "site":
|
|
722
|
-
candidate =
|
|
731
|
+
candidate = getLaunchingNuitkaProcessEnvironmentValue("NUITKA_SITE_FILENAME")
|
|
723
732
|
|
|
724
733
|
if candidate:
|
|
725
734
|
return candidate, "py"
|
nuitka/importing/Recursion.py
CHANGED
|
@@ -154,6 +154,9 @@ def _decideRecursion(
|
|
|
154
154
|
if module_name == "__main__":
|
|
155
155
|
return False, "Main program is not followed to a second time."
|
|
156
156
|
|
|
157
|
+
if using_module_name == "__main__" and Options.isMultidistMode():
|
|
158
|
+
return True, "Main program multidist entry points."
|
|
159
|
+
|
|
157
160
|
if module_kind == "extension" and not Options.isStandaloneMode():
|
|
158
161
|
return False, "Extension modules cannot be inspected."
|
|
159
162
|
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
WARNING, this code is GENERATED. Modify the template AttributeNodeFixed.py.j2 instead!
|
|
12
12
|
|
|
13
|
-
spell-checker: ignore __prepare__ append args autograph
|
|
14
|
-
spell-checker: ignore
|
|
15
|
-
spell-checker: ignore
|
|
16
|
-
spell-checker: ignore
|
|
13
|
+
spell-checker: ignore __prepare__ append args autograph capitalize casefold center chars
|
|
14
|
+
spell-checker: ignore clear copy count decode default delete dist distribution_name encode
|
|
15
|
+
spell-checker: ignore encoding end endswith errors exit_code expandtabs
|
|
16
|
+
spell-checker: ignore experimental_attributes experimental_autograph_options
|
|
17
17
|
spell-checker: ignore experimental_compile experimental_follow_type_hints
|
|
18
|
-
spell-checker: ignore experimental_implements experimental_relax_shapes extend
|
|
19
|
-
spell-checker: ignore
|
|
20
|
-
spell-checker: ignore
|
|
21
|
-
spell-checker: ignore
|
|
22
|
-
spell-checker: ignore
|
|
23
|
-
spell-checker: ignore
|
|
24
|
-
spell-checker: ignore
|
|
18
|
+
spell-checker: ignore experimental_implements experimental_relax_shapes extend fillchar
|
|
19
|
+
spell-checker: ignore find format format_map formatmap fromkeys func get group handle
|
|
20
|
+
spell-checker: ignore has_key haskey index input_signature insert isalnum isalpha isascii
|
|
21
|
+
spell-checker: ignore isdecimal isdigit isidentifier islower isnumeric isprintable isspace
|
|
22
|
+
spell-checker: ignore istitle isupper item items iterable iteritems iterkeys itervalues
|
|
23
|
+
spell-checker: ignore jit_compile join keepends key keys kwargs ljust lower lstrip
|
|
24
|
+
spell-checker: ignore maketrans maxsplit mode name new old p package
|
|
25
25
|
spell-checker: ignore package_or_requirement pairs partition path pop popitem prefix
|
|
26
26
|
spell-checker: ignore prepare reduce_retracing remove replace resource resource_name
|
|
27
27
|
spell-checker: ignore reverse rfind rindex rjust rpartition rsplit rstrip s sep setdefault
|
|
@@ -32,6 +32,7 @@ spell-checker: ignore winmode zfill
|
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
from nuitka.PythonVersions import getDictFromkeysNoArgErrorMessage
|
|
35
36
|
from nuitka.specs.BuiltinBytesOperationSpecs import (
|
|
36
37
|
bytes_capitalize_spec,
|
|
37
38
|
bytes_center_spec,
|
|
@@ -260,7 +261,10 @@ from .ListOperationNodes import (
|
|
|
260
261
|
ExpressionListOperationReverse,
|
|
261
262
|
)
|
|
262
263
|
from .NodeBases import SideEffectsFromChildrenMixin
|
|
263
|
-
from .NodeMakingHelpers import
|
|
264
|
+
from .NodeMakingHelpers import (
|
|
265
|
+
makeRaiseExceptionReplacementExpression,
|
|
266
|
+
wrapExpressionWithNodeSideEffects,
|
|
267
|
+
)
|
|
264
268
|
from .StrNodes import (
|
|
265
269
|
ExpressionStrOperationCapitalize,
|
|
266
270
|
ExpressionStrOperationCenter2,
|
|
@@ -2857,6 +2861,11 @@ class ExpressionAttributeLookupDictFromkeys(
|
|
|
2857
2861
|
node=call_node,
|
|
2858
2862
|
builtin_class=wrapExpressionDictOperationFromkeys,
|
|
2859
2863
|
builtin_spec=dict_fromkeys_spec,
|
|
2864
|
+
empty_special_class=lambda source_ref: makeRaiseExceptionReplacementExpression(
|
|
2865
|
+
expression=dict_arg,
|
|
2866
|
+
exception_type="TypeError",
|
|
2867
|
+
exception_value=getDictFromkeysNoArgErrorMessage(),
|
|
2868
|
+
),
|
|
2860
2869
|
)
|
|
2861
2870
|
|
|
2862
2871
|
result = wrapExpressionWithNodeSideEffects(old_node=dict_arg, new_node=result)
|
nuitka/nodes/BuiltinOpenNodes.py
CHANGED
|
@@ -7,6 +7,7 @@ This is a rather two sided beast, as it may be read or write. And we would like
|
|
|
7
7
|
to track it, so we can include files into the executable, or write more efficiently.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
from .BuiltinRefNodes import ExpressionBuiltinPatchableTypeRef
|
|
10
11
|
from .ChildrenHavingMixins import (
|
|
11
12
|
ChildrenExpressionBuiltinOpenP2Mixin,
|
|
12
13
|
ChildrenExpressionBuiltinOpenP3Mixin,
|
|
@@ -127,6 +128,10 @@ def makeExpressionBuiltinsOpenCall(
|
|
|
127
128
|
)
|
|
128
129
|
|
|
129
130
|
|
|
131
|
+
def makeBuiltinOpenRefNode(source_ref):
|
|
132
|
+
return ExpressionBuiltinPatchableTypeRef(builtin_name="open", source_ref=source_ref)
|
|
133
|
+
|
|
134
|
+
|
|
130
135
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
131
136
|
# integrates with CPython, but also works on its own.
|
|
132
137
|
#
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
WARNING, this code is GENERATED. Modify the template BuiltinOperationNodeBases.py.j2 instead!
|
|
12
12
|
|
|
13
|
-
spell-checker: ignore __prepare__ append args autograph
|
|
14
|
-
spell-checker: ignore
|
|
15
|
-
spell-checker: ignore
|
|
16
|
-
spell-checker: ignore
|
|
13
|
+
spell-checker: ignore __prepare__ append args autograph capitalize casefold center chars
|
|
14
|
+
spell-checker: ignore clear copy count decode default delete dist distribution_name encode
|
|
15
|
+
spell-checker: ignore encoding end endswith errors exit_code expandtabs
|
|
16
|
+
spell-checker: ignore experimental_attributes experimental_autograph_options
|
|
17
17
|
spell-checker: ignore experimental_compile experimental_follow_type_hints
|
|
18
|
-
spell-checker: ignore experimental_implements experimental_relax_shapes extend
|
|
19
|
-
spell-checker: ignore
|
|
20
|
-
spell-checker: ignore
|
|
21
|
-
spell-checker: ignore
|
|
22
|
-
spell-checker: ignore
|
|
23
|
-
spell-checker: ignore
|
|
24
|
-
spell-checker: ignore
|
|
18
|
+
spell-checker: ignore experimental_implements experimental_relax_shapes extend fillchar
|
|
19
|
+
spell-checker: ignore find format format_map formatmap fromkeys func get group handle
|
|
20
|
+
spell-checker: ignore has_key haskey index input_signature insert isalnum isalpha isascii
|
|
21
|
+
spell-checker: ignore isdecimal isdigit isidentifier islower isnumeric isprintable isspace
|
|
22
|
+
spell-checker: ignore istitle isupper item items iterable iteritems iterkeys itervalues
|
|
23
|
+
spell-checker: ignore jit_compile join keepends key keys kwargs ljust lower lstrip
|
|
24
|
+
spell-checker: ignore maketrans maxsplit mode name new old p package
|
|
25
25
|
spell-checker: ignore package_or_requirement pairs partition path pop popitem prefix
|
|
26
26
|
spell-checker: ignore prepare reduce_retracing remove replace resource resource_name
|
|
27
27
|
spell-checker: ignore reverse rfind rindex rjust rpartition rsplit rstrip s sep setdefault
|
nuitka/nodes/BuiltinRefNodes.py
CHANGED
|
@@ -27,7 +27,11 @@ from .ExceptionNodes import (
|
|
|
27
27
|
ExpressionBuiltinMakeExceptionImportError,
|
|
28
28
|
ExpressionBuiltinMakeExceptionModuleNotFoundError,
|
|
29
29
|
)
|
|
30
|
-
from .ExpressionBases import
|
|
30
|
+
from .ExpressionBases import (
|
|
31
|
+
CompileTimeConstantExpressionBase,
|
|
32
|
+
ExpressionBase,
|
|
33
|
+
ExpressionNoSideEffectsMixin,
|
|
34
|
+
)
|
|
31
35
|
from .shapes.BuiltinTypeShapes import tshape_exception_class
|
|
32
36
|
|
|
33
37
|
|
|
@@ -68,6 +72,42 @@ def makeExpressionBuiltinTypeRef(builtin_name, source_ref):
|
|
|
68
72
|
)
|
|
69
73
|
|
|
70
74
|
|
|
75
|
+
class ExpressionBuiltinPatchableTypeRef(ExpressionNoSideEffectsMixin, ExpressionBase):
|
|
76
|
+
kind = "EXPRESSION_BUILTIN_PATCHABLE_TYPE_REF"
|
|
77
|
+
|
|
78
|
+
__slots__ = ("builtin_name",)
|
|
79
|
+
|
|
80
|
+
def __init__(self, builtin_name, source_ref):
|
|
81
|
+
ExpressionBase.__init__(self, source_ref=source_ref)
|
|
82
|
+
|
|
83
|
+
self.builtin_name = builtin_name
|
|
84
|
+
|
|
85
|
+
def finalize(self):
|
|
86
|
+
del self.parent
|
|
87
|
+
|
|
88
|
+
def computeExpressionRaw(self, trace_collection):
|
|
89
|
+
if self.parent.isExpressionCall():
|
|
90
|
+
result = makeExpressionBuiltinTypeRef(
|
|
91
|
+
builtin_name=self.builtin_name, source_ref=self.source_ref
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
result,
|
|
96
|
+
"new_expression",
|
|
97
|
+
"Treat 'builtins.%s' in call as built value reference."
|
|
98
|
+
% self.builtin_name,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return self, None, None
|
|
102
|
+
|
|
103
|
+
@staticmethod
|
|
104
|
+
def getModuleName():
|
|
105
|
+
return "builtins"
|
|
106
|
+
|
|
107
|
+
def getImportName(self):
|
|
108
|
+
return self.builtin_name
|
|
109
|
+
|
|
110
|
+
|
|
71
111
|
quick_names = {"None": None, "True": True, "False": False}
|
|
72
112
|
|
|
73
113
|
|