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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Nuitka-winsvc
3
- Version: 2.0.3
3
+ Version: 2.0.6
4
4
  Summary: Nuitka but support compile as Windows service
5
5
  Home-page: https://github.com/tabris17/Nuitka-winsvc
6
6
  Author: tabris17
@@ -1,5 +1,5 @@
1
- Nuitka_winsvc-2.0.3.data/scripts/nuitka-run.bat,sha256=ueVuKYMLV9dfqkkspy_F-2cpoZginLFiPDJAaj4fKYk,901
2
- Nuitka_winsvc-2.0.3.data/scripts/nuitka.bat,sha256=0wNE1iEysZFW4i7Tlo5TL5e_fv4jDoyAzMo_LTnjv_Y,1038
1
+ Nuitka_winsvc-2.0.6.data/scripts/nuitka-run.bat,sha256=ueVuKYMLV9dfqkkspy_F-2cpoZginLFiPDJAaj4fKYk,901
2
+ Nuitka_winsvc-2.0.6.data/scripts/nuitka.bat,sha256=0wNE1iEysZFW4i7Tlo5TL5e_fv4jDoyAzMo_LTnjv_Y,1038
3
3
  nuitka/Builtins.py,sha256=API_eSf5QF-gVXcQYKTzv5Un5GSPcOVEFCy4nDT3JNw,7528
4
4
  nuitka/BytecodeCaching.py,sha256=HwdXL8IYrgvnIIg_QyWXTGsUBI9U-fB_AxxAMc5o1FM,5810
5
5
  nuitka/Bytecodes.py,sha256=yfpxDfJrYTGzGQpx9-UJ4MLUp8FTViI3dF0vcwfBC7A,3767
@@ -9,7 +9,7 @@ nuitka/Errors.py,sha256=9KcyRVPQwozQ2jL8of5rb-I8bojBqoogZWnYZC-ZKzQ,2446
9
9
  nuitka/HardImportRegistry.py,sha256=lNk6Pn8t28yARWBm4yCGnDTDcTl5kFjQCgXmMF4U-6g,10278
10
10
  nuitka/MainControl.py,sha256=dLYIFhNo-9ugETMOVYpdBRhY1Xk_HX9xvMxcocO7AP8,38103
11
11
  nuitka/ModuleRegistry.py,sha256=Z_W88Khq6GEgcvqcOdvTCISHpU5b4fY4PdImfkUIwSk,8125
12
- nuitka/OptionParsing.py,sha256=SRjKpKl6pZ4dczu9L6seHZeS3T_Zp6057T26s_n1qis,63202
12
+ nuitka/OptionParsing.py,sha256=xy9WK2SDZcWRDqO083h1EXfe8unDm8Z1vawcHRO0yk4,63372
13
13
  nuitka/Options.py,sha256=l0Gq7oTuVUylbHrZyuBvkhUP0-mDGrypv0YaqaRIPho,74264
14
14
  nuitka/OutputDirectories.py,sha256=IFj_zk1T4q0-X7czYSX27Joblg3TspFC5yg_8AOHLfQ,5243
15
15
  nuitka/PostProcessing.py,sha256=ncLdeFle-SXTZQJOVklAA5SKd8ILvWH9gbWkICfRSK8,14907
@@ -19,10 +19,10 @@ nuitka/PythonOperators.py,sha256=ZURjxq01Kei9hL5WPCjrHCFhrL15rZF9rJt1HHjEITA,406
19
19
  nuitka/PythonVersions.py,sha256=hJ8J8gDe9Kfrp0iZ4cS_fIgZgNw4TQa8GkfzWXBtKVY,14524
20
20
  nuitka/Serialization.py,sha256=cPrVs7kSlHXiw-c3ar2B09k45fE1-Ex_AHT0X9vkBno,9173
21
21
  nuitka/SourceCodeReferences.py,sha256=hO9Cl-QYVTG9TspnW9_xkUbFOoVKFQt7JKD9AubXfmM,4670
22
- nuitka/Tracing.py,sha256=_wdmOwjhyjJzOsADfncdqFKx6elHBwHfgJkUC1WueRM,12993
22
+ nuitka/Tracing.py,sha256=WE9nkFhkG-1zuVJ7Jg7LiWFFWGBUZLNwyJJ9hWuNN14,12985
23
23
  nuitka/TreeXML.py,sha256=3gnyHOhUcxpGEBEel_drPW89Uysf9hkFzkb2y19-KlA,3480
24
24
  nuitka/Variables.py,sha256=80uFuWqptuWISJbNhsI86CCZWwYFuicNsC9ENaVBmIk,15437
25
- nuitka/Version.py,sha256=FtV8FbkTG1FP-2ADIhC_tqIHU17Sj1avUk6YwtxUIf8,2466
25
+ nuitka/Version.py,sha256=HTeGljGPgceX8VGnO0YkZNhyQjs1q4_32N77qhT_PuM,2466
26
26
  nuitka/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
27
27
  nuitka/__main__.py,sha256=l9LXMDV9PkeWLu9WXCKv6m0Pf4CsnWEoZRrtOOvswgc,6341
28
28
  nuitka/__past__.py,sha256=lmbWUCizqA9rG_VjcFOP6FNvLdeipwqDj283ekIYICg,5572
@@ -35,7 +35,7 @@ nuitka/build/SconsCompilerSettings.py,sha256=DkmIVZKD9hOdkZmuPfGkR_mLLjVa0cL9wXS
35
35
  nuitka/build/SconsHacks.py,sha256=8rD2pua3uW9LMOurul1Xl7GUEqoR59okCg0e5RYY5eQ,5559
36
36
  nuitka/build/SconsInterface.py,sha256=aJSZ5rqOSBNBAVbbHXmKQO1A7uupMFsD8Ao46jh4IU8,16153
37
37
  nuitka/build/SconsProgress.py,sha256=iOYJlVt31-Ruyo7TqgNuRkDW3XxD25PRRuBNyCVrvEA,2671
38
- nuitka/build/SconsSpawn.py,sha256=OZGIhbMbjhdAYo9NgTF_rqGztJHbdmOxtqd22e1tE1Y,12649
38
+ nuitka/build/SconsSpawn.py,sha256=54ZSQkqbin2O1xk2BIMzpyxAaTM4I0-vuknmz6cGy9I,12766
39
39
  nuitka/build/SconsUtils.py,sha256=JUlULa5E87asq6XnVIsmHYf9OHCVLU1qPHu-euS2Yxg,24858
40
40
  nuitka/build/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
41
41
  nuitka/build/include/nuitka/allocator.h,sha256=ZBVucEwyBQfXYo6aVh2whGQnFTVImoCQshMCKrgrtUQ,7972
@@ -688,7 +688,7 @@ nuitka/nodes/GeneratorNodes.py,sha256=Z17TXZUAlRqN-WWMFgyf3nLqWF564-x3VGMjVZTssR
688
688
  nuitka/nodes/GlobalsLocalsNodes.py,sha256=pwmecMROJbfS7ADNzlkYj_K-2KZhB2gwMsCAYZktwxY,6850
689
689
  nuitka/nodes/HardImportNodesGenerated.py,sha256=yIrZnvGZYT0L50nNvU_SjKUKmwoGnhqXJ1PWYlPjWuw,89787
690
690
  nuitka/nodes/ImportHardNodes.py,sha256=EzWdnLNO6KZfIe2KTp2jQUxrnGsRYMmVTi7MlybLNKQ,5345
691
- nuitka/nodes/ImportNodes.py,sha256=70v07OufFerv3rolehywtQmvUnyRFKAKMrIb6tav8tg,44918
691
+ nuitka/nodes/ImportNodes.py,sha256=T3CPFLSHqvUcVgmvD2tGnKWBdYAGUpDZSXoI5Os1XDc,47482
692
692
  nuitka/nodes/IndicatorMixins.py,sha256=VmpNIZeauwQxvzp6PWLUZrLzPU7Yqi6MqoZacQa9rCw,2733
693
693
  nuitka/nodes/InjectCNodes.py,sha256=iV8CuJkDltFcFPI47CEXE1qFoFEoe76qJMzGZiMm3M0,1501
694
694
  nuitka/nodes/IterationHandles.py,sha256=zg6pOCb_OHpXTlEmjg8rzmtygw7Eb1byCds08Yv7C_c,11486
@@ -699,7 +699,7 @@ nuitka/nodes/LocalsScopes.py,sha256=czo9Ip31l7X3JwR_36GW2q35lND9Mf09QLTH2dtvNKk,
699
699
  nuitka/nodes/LoopNodes.py,sha256=dWcgMHxOoNtLAq3VvlHWXf2GqhPTu4V4ldjWCk7BcH0,15784
700
700
  nuitka/nodes/MatchNodes.py,sha256=SZkoT8r4_sd-McBs6zMe-qFk44nxW8tW_vaacMWFpUM,1712
701
701
  nuitka/nodes/ModuleAttributeNodes.py,sha256=QGkQq4UB4k0y2RAUwjZCLx4Ws9YmY9Q70DKZkivGbuk,6534
702
- nuitka/nodes/ModuleNodes.py,sha256=eCQ17E_Re8OowkNGU09IffDhiNizbY6G_cW-1jJeDpw,32400
702
+ nuitka/nodes/ModuleNodes.py,sha256=6KEm7XzDN65LdFdC5Cmv8yNTf-_WtCSTBug0xJ1KWKY,32419
703
703
  nuitka/nodes/NodeBases.py,sha256=KQkXt4BzdYnHWWQ4XEEqoM8ecYwMCFcWHPgvDuU4mMo,24338
704
704
  nuitka/nodes/NodeMakingHelpers.py,sha256=WOaMdPnaSD_L7bcDVlABB2_IqYi9FElwcnv1gjzN2aY,15077
705
705
  nuitka/nodes/NodeMetaClasses.py,sha256=tgIzhzrUaUYGi-Q-b7VsraeRlQl5vq05atMNK7QrRTE,5548
@@ -744,10 +744,10 @@ nuitka/optimizations/ValueTraces.py,sha256=keo66WfqRmaVqfECnyMc55XRtKR6YpV_N9eKK
744
744
  nuitka/optimizations/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
745
745
  nuitka/pgo/PGO.py,sha256=_clue7LpdJCfqNLu2l8diVwqPll8AzxFBNSp_EOty7M,4899
746
746
  nuitka/pgo/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
747
- nuitka/plugins/PluginBase.py,sha256=tFp56gJD9AfqGv5DvXxBYphcbhwD4PmDT_6RmPo_lqQ,50611
747
+ nuitka/plugins/PluginBase.py,sha256=OmgCXa8jAJ-MM_qiHtdavBdXsm3S9-omzCIuZpKZffg,50900
748
748
  nuitka/plugins/Plugins.py,sha256=kNjzDAWOY3rsjCzOFgqctj-ArNyGTnNehRuG6VUlwi0,59215
749
749
  nuitka/plugins/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
750
- nuitka/plugins/standard/AntiBloatPlugin.py,sha256=ZmD9EZPEkeG4kj4fKC6Lhf_SETbci11-jufyK6PcnJ8,26434
750
+ nuitka/plugins/standard/AntiBloatPlugin.py,sha256=4VnSkx0Hi1tpVwjqevsvPT5kP5rXihyZNrU7wDTZiww,27526
751
751
  nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py,sha256=Qmad4nTfbVd-XogAYeVTIhV94uw2wGrpJpFzMYxOV_A,3477
752
752
  nuitka/plugins/standard/DataFilesPlugin.py,sha256=yaB_jLBGyPIl85_Sy7fnC14iuD1mN5U6swkQPAKhggY,10383
753
753
  nuitka/plugins/standard/DelvewheelPlugin.py,sha256=DxMPCIv4j03LI_CqIW3RatsB4e0B3YpkmEKySAkjnPU,5017
@@ -776,7 +776,7 @@ nuitka/plugins/standard/TransformersPlugin.py,sha256=axOsoo7hakI66wmQ_CkMi8QOY6M
776
776
  nuitka/plugins/standard/TrioPlugin.py,sha256=1zkgZP5KFJ4xXhnh2poTD3zXv7ywBEeNE9hfYEbgVG8,1073
777
777
  nuitka/plugins/standard/UpxPlugin.py,sha256=UzCkrFICSRQ8ycO3OBQl4WuC_aElFcKHpJzR0vvskBM,5651
778
778
  nuitka/plugins/standard/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
779
- nuitka/plugins/standard/standard.nuitka-package.config.yml,sha256=uTbMrLz3ptIcQp3_sSUHc7qb9KVFvdNSwdQs3by-qcE,218978
779
+ nuitka/plugins/standard/standard.nuitka-package.config.yml,sha256=ZsnzTFHfgaXnz-7T8ZlMXrFN81X3Zhc1XD3YkV-eyWQ,222692
780
780
  nuitka/plugins/standard/stdlib2.nuitka-package.config.yml,sha256=AUjtaX5pUWpvPru9WiTjvKDFeISY4XXv-UDO25MdrAM,2352
781
781
  nuitka/plugins/standard/stdlib3.nuitka-package.config.yml,sha256=Y_vbnb_R_q3sHjtUUgOkxpIi1cBaS9DAX38gTb7yk68,12392
782
782
  nuitka/plugins/standard/DillPlugin/DillPlugin.c,sha256=o-NsdS4IulVQ2DQS0N2Si2aZFxE9ogKehbHM8uc2Jjc,1617
@@ -876,18 +876,18 @@ nuitka/tree/ReformulationTryFinallyStatements.py,sha256=fEkoe3AQ5OmIceGwj9GGpI-y
876
876
  nuitka/tree/ReformulationWhileLoopStatements.py,sha256=QvEZ9r6nsID2jIvU_8ncc3MDKtJd7fFYSDy0v4lozUY,5674
877
877
  nuitka/tree/ReformulationWithStatements.py,sha256=ODxzht-x68OFD2G-va1AVRA81WxpPRcqTNMjgyMxu0Y,14406
878
878
  nuitka/tree/ReformulationYieldExpressions.py,sha256=V01GHYa-3feMoWjeiSH5RKd8s4pLPQQcl60uXOIXdec,3819
879
- nuitka/tree/SourceHandling.py,sha256=BQqVJAJ2GLQILnIDumO4F3g-GrczFNATBaoC3dR8TK0,13221
879
+ nuitka/tree/SourceHandling.py,sha256=bs4taO8yccdZ1hOYheFKvphZk_QI3uOmX7Sly1P4U44,13179
880
880
  nuitka/tree/SyntaxErrors.py,sha256=2GcvB0maZ8oPguCvUV7eH228gs3Qgy9U9FDM7TY_FjU,3757
881
881
  nuitka/tree/TreeHelpers.py,sha256=p2Z3GfzL7qmoR-SRMenlr3x8zbO0-ky99_riJeZOozk,22972
882
882
  nuitka/tree/VariableClosure.py,sha256=ouDeiNeDBxprjBsyx-ssAga_DB8_YfjGfmiYW-sfcr4,20432
883
883
  nuitka/tree/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
884
- nuitka/utils/AppDirs.py,sha256=fPTyhbEq2ejabLXUA8YrtfvdYWTCyTxRRZBsj0yuXfU,2677
884
+ nuitka/utils/AppDirs.py,sha256=_O0Uh-QZoP6LAPI1ScEMTl6AC3mdZhKfbyVvCrUtT1I,2723
885
885
  nuitka/utils/CStrings.py,sha256=bXkTDDfnJrJU7yuXMXrl04_q_kayjoEQllHXFgRENdI,4115
886
886
  nuitka/utils/CommandLineOptions.py,sha256=BQe_1EY2q0xWsMg0HB1n11c6ymoQbxpZBxtZijvJqEU,6362
887
- nuitka/utils/Distributions.py,sha256=DScZdswVXhahnZE_ulcS9VHvD-xb0GYhlqxMnge9ZFk,13623
887
+ nuitka/utils/Distributions.py,sha256=Ic8QYi2RgW4a0DzVudVweLwM_fWNzqMYijgpNahoe7w,14576
888
888
  nuitka/utils/Download.py,sha256=adG_dxO8s8YfEOOQz_DRRj3VfZxs8dXpFR5sc9IrTnc,6396
889
889
  nuitka/utils/Execution.py,sha256=m4SIqB--Sl0pSqpGbH9UlvZy5_UdQh7dZ_eL_U_ejs8,13073
890
- nuitka/utils/FileOperations.py,sha256=Yb3r9snf6sloecv-Zt0RgjVW0UAAP6Xl5aSz-s4dtk4,40162
890
+ nuitka/utils/FileOperations.py,sha256=dAu4or6ogAc84g6TJs5W8s7nA6RjmxYTQUWcwKByL9Q,40617
891
891
  nuitka/utils/Hashing.py,sha256=ofmRpfBp5aSLYlm4SmnihCt0fEQGi_ukddDdFdFAbWQ,3720
892
892
  nuitka/utils/Images.py,sha256=kLF0VjQSjwVRpFigBU1jcWFaTgU9nXEEU9-jMLCWmp4,2362
893
893
  nuitka/utils/Importing.py,sha256=uwjNdsmTQ6SEjMqbMYUig75EYvgN_yM7eNY_G_DBynk,9743
@@ -912,9 +912,9 @@ nuitka/utils/WindowsFileUsage.py,sha256=-HWxgeimCX2pz6oAUI0T7wSJN1tbk8XyIzPywdd0
912
912
  nuitka/utils/WindowsResources.py,sha256=Nf4DRlj7bQrdDXPNKqujqZCbppNx7xrdHuUP7pjVixc,19804
913
913
  nuitka/utils/Yaml.py,sha256=66N6YZUPlJblGEiW6RpIB5vXIpP2J5Wh7_8aF9DcvZo,6981
914
914
  nuitka/utils/__init__.py,sha256=iZG7yicSsBwC9oGrAFAJSzSlj0bmpyijEHyrTKLQ8GM,833
915
- Nuitka_winsvc-2.0.3.dist-info/LICENSE.txt,sha256=ZWq74m8T3pVbRFjCBu74q_4GyW11rCqtYB_1vZ4rQ88,11348
916
- Nuitka_winsvc-2.0.3.dist-info/METADATA,sha256=lYTWBQpniTL6Nwwik8L50dKxPP_2jOLLWgvPKMG6AwM,4909
917
- Nuitka_winsvc-2.0.3.dist-info/WHEEL,sha256=ircjsfhzblqgSzO8ow7-0pXK-RVqDqNRGQ8F650AUNM,102
918
- Nuitka_winsvc-2.0.3.dist-info/entry_points.txt,sha256=jeBnijqxZ4U0WpNEdtaogpNMNlv5jw8H7yMOsf2isFc,308
919
- Nuitka_winsvc-2.0.3.dist-info/top_level.txt,sha256=TRrfKxSYukbo1yzTGfwyH7wVzhDpKlwQsLjhIr15yqY,7
920
- Nuitka_winsvc-2.0.3.dist-info/RECORD,,
915
+ Nuitka_winsvc-2.0.6.dist-info/LICENSE.txt,sha256=ZWq74m8T3pVbRFjCBu74q_4GyW11rCqtYB_1vZ4rQ88,11348
916
+ Nuitka_winsvc-2.0.6.dist-info/METADATA,sha256=OVVCfRsYSujx6o4aUvWTPg5wxNwHJvRcHHasbbYAIs0,4909
917
+ Nuitka_winsvc-2.0.6.dist-info/WHEEL,sha256=ircjsfhzblqgSzO8ow7-0pXK-RVqDqNRGQ8F650AUNM,102
918
+ Nuitka_winsvc-2.0.6.dist-info/entry_points.txt,sha256=jeBnijqxZ4U0WpNEdtaogpNMNlv5jw8H7yMOsf2isFc,308
919
+ Nuitka_winsvc-2.0.6.dist-info/top_level.txt,sha256=TRrfKxSYukbo1yzTGfwyH7wVzhDpKlwQsLjhIr15yqY,7
920
+ Nuitka_winsvc-2.0.6.dist-info/RECORD,,
nuitka/OptionParsing.py CHANGED
@@ -614,9 +614,9 @@ compilation_group.add_option(
614
614
  metavar="YAML_FILENAME",
615
615
  help="""\
616
616
  User provided Yaml file with package configuration. You can include DLLs,
617
- remove bloat, add hidden dependencies. Check User Manual for a complete
618
- description of the format to use. Can be given multiple times. Defaults
619
- to empty.""",
617
+ remove bloat, add hidden dependencies. Check the Nuitka Package Configuration
618
+ Manual for a complete description of the format to use. Can be given
619
+ multiple times. Defaults to empty.""",
620
620
  )
621
621
 
622
622
  compilation_group.add_option(
@@ -1461,6 +1461,18 @@ del windows_group
1461
1461
 
1462
1462
  macos_group = parser.add_option_group("macOS specific controls")
1463
1463
 
1464
+ macos_group.add_option(
1465
+ "--macos-create-app-bundle",
1466
+ action="store_true",
1467
+ dest="macos_create_bundle",
1468
+ default=False,
1469
+ help="""\
1470
+ When compiling for macOS, create a bundle rather than a plain binary
1471
+ application. This is the only way to unlock the disabling of console,
1472
+ get high DPI graphics, etc. and implies standalone mode. Defaults to
1473
+ off.""",
1474
+ )
1475
+
1464
1476
  macos_group.add_option(
1465
1477
  "--macos-target-arch",
1466
1478
  action="store",
@@ -1474,17 +1486,6 @@ is what the running Python allows for. Default is "native" which is
1474
1486
  the architecture the Python is run with.""",
1475
1487
  )
1476
1488
 
1477
- macos_group.add_option(
1478
- "--macos-create-app-bundle",
1479
- action="store_true",
1480
- dest="macos_create_bundle",
1481
- default=False,
1482
- help="""\
1483
- When compiling for macOS, create a bundle rather than a plain binary
1484
- application. Currently experimental and incomplete. Currently this
1485
- is the only way to unlock disabling of console.Defaults to off.""",
1486
- )
1487
-
1488
1489
  macos_group.add_option(
1489
1490
  "--macos-app-icon",
1490
1491
  action="append",
@@ -1993,7 +1994,14 @@ def _considerGithubWorkflowOptions(phase):
1993
1994
 
1994
1995
  import json
1995
1996
 
1996
- early_names = "main", "script-name", "enable-plugins", "disable-plugins"
1997
+ early_names = (
1998
+ "main",
1999
+ "script-name",
2000
+ "enable-plugin",
2001
+ "enable-plugins",
2002
+ "disable-plugin",
2003
+ "disable-plugins",
2004
+ )
1997
2005
 
1998
2006
  def filterByName(key):
1999
2007
  # Not for Nuitka at all.
@@ -2083,12 +2091,15 @@ def parseOptions(logger):
2083
2091
  filename_args = []
2084
2092
  module_mode = False
2085
2093
 
2094
+ # Options may be coming from GitHub workflow configuration as well.
2095
+ _considerGithubWorkflowOptions(phase="early")
2096
+
2086
2097
  for count, arg in enumerate(sys.argv):
2087
2098
  if count == 0:
2088
2099
  continue
2089
2100
 
2090
- if arg.startswith("--main="):
2091
- filename_args.append(arg)
2101
+ if arg.startswith(("--main=", "--script-name=")):
2102
+ filename_args.append(arg.split("=", 1)[1])
2092
2103
 
2093
2104
  if arg == "--module":
2094
2105
  module_mode = True
@@ -2104,9 +2115,6 @@ def parseOptions(logger):
2104
2115
  + sys.argv[1:]
2105
2116
  )
2106
2117
 
2107
- # Options may be coming from GitHub workflow configuration as well.
2108
- _considerGithubWorkflowOptions(phase="early")
2109
-
2110
2118
  # Next, lets activate plugins early, so they can inject more options to the parser.
2111
2119
  _considerPluginOptions(logger)
2112
2120
 
nuitka/Tracing.py CHANGED
@@ -433,7 +433,7 @@ plugins_logger = OurLogger("Nuitka-Plugins")
433
433
  recursion_logger = OurLogger("Nuitka-Inclusion")
434
434
  progress_logger = OurLogger("Nuitka-Progress", quiet=True)
435
435
  memory_logger = OurLogger("Nuitka-Memory")
436
- dependencies_logger = OurLogger("Nuitka-Dependencies")
436
+ metadata_logger = OurLogger("Nuitka-Metadata")
437
437
  optimization_logger = FileLogger("Nuitka-Optimization")
438
438
  pgo_logger = FileLogger("Nuitka-PGO")
439
439
  code_generation_logger = OurLogger("Nuitka-CodeGen")
nuitka/Version.py CHANGED
@@ -20,7 +20,7 @@
20
20
  """
21
21
 
22
22
  version_string = """\
23
- Nuitka V2.0.3
23
+ Nuitka V2.0.6
24
24
  Copyright (C) 2023 Kay Hayen."""
25
25
 
26
26
 
@@ -174,6 +174,9 @@ def _getWindowsSpawnFunction(env, module_mode, source_files):
174
174
  closeSconsProgressBar()
175
175
  raise exception
176
176
 
177
+ if rv != 0:
178
+ closeSconsProgressBar()
179
+
177
180
  if cmd == "link":
178
181
  data = _filterMsvcLinkOutput(
179
182
  env=env, module_mode=module_mode, data=data, exit_code=rv
@@ -398,9 +401,11 @@ def _getWrappedSpawnFunction(env):
398
401
 
399
402
  if exception:
400
403
  closeSconsProgressBar()
401
-
402
404
  raise exception
403
405
 
406
+ if result != 0:
407
+ closeSconsProgressBar()
408
+
404
409
  # Segmentation fault should give a clear error.
405
410
  if result == -11:
406
411
  scons_logger.sysexit(
@@ -563,6 +563,8 @@ class ExpressionImportModuleHard(
563
563
  )
564
564
 
565
565
  if finding != "not-found":
566
+ trace_collection.onExceptionRaiseExit(ImportError)
567
+
566
568
  result = makeExpressionImportModuleFixed(
567
569
  using_module_name=self.getParentModule().getFullName(),
568
570
  module_name=full_name,
@@ -573,7 +575,7 @@ class ExpressionImportModuleHard(
573
575
  return (
574
576
  result,
575
577
  "new_expression",
576
- "Attribute lookup '%s* of hard module *%s* becomes hard module name import."
578
+ "Attribute lookup '%s' of hard module '%s' becomes hard module name import."
577
579
  % (self.value_name, attribute_name),
578
580
  )
579
581
 
@@ -844,31 +846,40 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
844
846
 
845
847
  self.finding = None
846
848
 
847
- def _attemptFollow(self, module_name):
848
- # Complex stuff, pylint: disable=too-many-branches,too-many-locals
849
-
849
+ def _getLevelValue(self):
850
850
  parent_module = self.getParentModule()
851
-
852
851
  level = self.subnode_level
853
852
 
854
853
  if level is None:
855
- level = 0 if parent_module.getFutureSpec().isAbsoluteImport() else -1
854
+ return 0 if parent_module.getFutureSpec().isAbsoluteImport() else -1
856
855
  elif not level.isCompileTimeConstant():
857
- return
856
+ return None
858
857
  else:
859
- level = level.getCompileTimeConstant()
858
+ level_value = level.getCompileTimeConstant()
859
+
860
+ # TODO: Catch this as a static error maybe.
861
+ if type(level_value) not in (int, long):
862
+ return None
863
+
864
+ return level_value
865
+
866
+ def _attemptFollow(self, module_name):
867
+ # Complex stuff, pylint: disable=too-many-branches,too-many-locals
868
+
869
+ # Without the level value, we don't know what it is.
870
+ level_value = self._getLevelValue()
871
+ if level_value is None:
872
+ return
860
873
 
861
- if level != 0:
874
+ parent_module = self.getParentModule()
875
+
876
+ if level_value != 0:
862
877
  parent_package = parent_module.getFullName()
863
878
  if not parent_module.isCompiledPythonPackage():
864
879
  parent_package = parent_package.getPackageName()
865
880
  else:
866
881
  parent_package = None
867
882
 
868
- # TODO: Catch this as a static error maybe.
869
- if type(level) not in (int, long):
870
- return None
871
-
872
883
  module_name_resolved = resolveModuleName(module_name)
873
884
  if module_name_resolved != module_name:
874
885
  module_name = module_name_resolved
@@ -885,7 +896,7 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
885
896
  module_name_found, module_filename, module_kind, self.finding = locateModule(
886
897
  module_name=ModuleName(module_name),
887
898
  parent_package=parent_package,
888
- level=level,
899
+ level=level_value,
889
900
  )
890
901
 
891
902
  self.used_modules = [
@@ -894,7 +905,7 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
894
905
  filename=module_filename,
895
906
  module_kind=module_kind,
896
907
  finding=self.finding,
897
- level=level,
908
+ level=level_value,
898
909
  source_ref=self.source_ref,
899
910
  reason="import",
900
911
  )
@@ -960,7 +971,7 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
960
971
  ) = locateModule(
961
972
  module_name=module_name,
962
973
  parent_package=parent_package,
963
- level=level,
974
+ level=level_value,
964
975
  )
965
976
 
966
977
  self.used_modules.append(
@@ -969,7 +980,7 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
969
980
  filename=module_filename,
970
981
  module_kind=module_kind,
971
982
  finding=finding,
972
- level=level,
983
+ level=level_value,
973
984
  source_ref=self.source_ref,
974
985
  reason="import",
975
986
  )
@@ -1026,6 +1037,55 @@ class ExpressionBuiltinImport(ChildrenExpressionBuiltinImportMixin, ExpressionBa
1026
1037
  trace_collection.onModuleUsageAttempt(module_usage_attempt)
1027
1038
 
1028
1039
  if type(imported_module_name) in (str, unicode):
1040
+ if self.finding == "relative":
1041
+ parent_module = self.getParentModule()
1042
+
1043
+ parent_package = parent_module.getFullName()
1044
+ if not parent_module.isCompiledPythonPackage():
1045
+ parent_package = parent_package.getPackageName()
1046
+
1047
+ level_value = abs(self._getLevelValue())
1048
+ level_value -= 1
1049
+
1050
+ while level_value > 0:
1051
+ parent_package = parent_package.getPackageName()
1052
+ level_value -= 1
1053
+
1054
+ if imported_module_name != "":
1055
+ candidate_module_name = parent_package.getChildNamed(
1056
+ imported_module_name
1057
+ )
1058
+ else:
1059
+ candidate_module_name = parent_package
1060
+
1061
+ if (
1062
+ candidate_module_name in hard_modules_non_stdlib
1063
+ or module_filename is None
1064
+ or isStandardLibraryPath(module_filename)
1065
+ ):
1066
+ result = ExpressionImportModuleHard(
1067
+ using_module_name=self.getParentModule().getFullName(),
1068
+ module_name=candidate_module_name,
1069
+ value_name=self._getImportedValueName(
1070
+ candidate_module_name
1071
+ ),
1072
+ source_ref=self.source_ref,
1073
+ )
1074
+
1075
+ return (
1076
+ result,
1077
+ "new_expression",
1078
+ "Lowered import %s module '%s' to hard import."
1079
+ % (
1080
+ (
1081
+ "hard import"
1082
+ if candidate_module_name in hard_modules_non_stdlib
1083
+ else "standard library"
1084
+ ),
1085
+ candidate_module_name.asString(),
1086
+ ),
1087
+ )
1088
+
1029
1089
  imported_module_name = resolveModuleName(imported_module_name)
1030
1090
 
1031
1091
  if self.finding == "absolute" and isHardModule(imported_module_name):
@@ -954,7 +954,7 @@ class PythonMainModule(CompiledPythonModule):
954
954
  )
955
955
 
956
956
  # Technically required, but not found must not happen
957
- assert finding != "not-found"
957
+ assert finding != "not-found", early_module_name
958
958
 
959
959
  self.standard_library_modules.add(
960
960
  makeModuleUsageAttempt(
@@ -69,6 +69,7 @@ from nuitka.PythonVersions import (
69
69
  python_version,
70
70
  )
71
71
  from nuitka.Tracing import plugins_logger
72
+ from nuitka.utils.AppDirs import getAppdirsModule
72
73
  from nuitka.utils.Distributions import (
73
74
  getDistributionFromModuleName,
74
75
  getDistributionName,
@@ -79,7 +80,7 @@ from nuitka.utils.FileOperations import (
79
80
  changeFilenameExtension,
80
81
  getFileContents,
81
82
  )
82
- from nuitka.utils.Importing import isBuiltinModuleName
83
+ from nuitka.utils.Importing import getSharedLibrarySuffix, isBuiltinModuleName
83
84
  from nuitka.utils.ModuleNames import (
84
85
  ModuleName,
85
86
  makeTriggerModuleName,
@@ -147,6 +148,7 @@ def _getEvaluationContext():
147
148
  # Frequent used modules
148
149
  "sys": sys,
149
150
  "os": os,
151
+ "appdirs": getAppdirsModule(),
150
152
  # Builtins
151
153
  "True": True,
152
154
  "False": False,
@@ -179,6 +181,9 @@ def _getEvaluationContext():
179
181
  _context_dict["before_python3"] = python_version < 0x300
180
182
  _context_dict["python3_or_higher"] = python_version >= 0x300
181
183
 
184
+ _context_dict["extension_std_suffix"] = getSharedLibrarySuffix(preferred=True)
185
+ _context_dict["extension_suffix"] = getSharedLibrarySuffix(preferred=False)
186
+
182
187
  return _context_dict
183
188
 
184
189
 
@@ -37,7 +37,7 @@ _mode_choices = ("error", "warning", "nofollow", "allow")
37
37
 
38
38
 
39
39
  class NuitkaPluginAntiBloat(NuitkaYamlPluginBase):
40
- # Lots of details, a bunch of state is cached
40
+ # Lots of details, a bunch of state is cached, pylint: disable=too-many-instance-attributes
41
41
 
42
42
  plugin_name = "anti-bloat"
43
43
  plugin_desc = (
@@ -210,6 +210,9 @@ form 'module_name:[%s]'."""
210
210
  # information given for that.
211
211
  self.no_auto_follows = {}
212
212
 
213
+ # Keep track of modules prevented from being followed at all.
214
+ self.no_follows = OrderedDict()
215
+
213
216
  # Cache execution context for anti-bloat configs.
214
217
  self.context_codes = {}
215
218
 
@@ -559,7 +562,22 @@ Error, cannot exec module '%s', context code '%s' due to: %s"""
559
562
  source_ref,
560
563
  reason,
561
564
  ):
562
- # Quite a few special cases, but not really complex. pylint: disable=too-many-branches
565
+ # Quite a few special cases, but not really complex.
566
+ # pylint: disable=too-many-branches,too-many-locals
567
+
568
+ # First off, activate "no-follow" configurations.
569
+ for (
570
+ config_of_module_name,
571
+ no_follow,
572
+ description,
573
+ ) in self.getYamlConfigItemItems(
574
+ module_name=module_name,
575
+ section="anti-bloat",
576
+ item_name="no-follow",
577
+ decide_relevant=lambda key, value: True,
578
+ recursive=True,
579
+ ):
580
+ self.no_follows[no_follow] = (config_of_module_name, description)
563
581
 
564
582
  # Do not even look at these. It's either included by a module that is in standard
565
583
  # library, or included for a module in standard library.
@@ -660,7 +678,7 @@ slow down compilation."""
660
678
  if using_module_name is not None:
661
679
 
662
680
  def decideRelevant(key, value):
663
- # Only checking key, pylint: disable=unused-argument
681
+ # Only checking keys of configs, pylint: disable=unused-argument
664
682
 
665
683
  return module_name.hasNamespace(key)
666
684
 
@@ -685,6 +703,17 @@ slow down compilation."""
685
703
  % (config_of_module_name, no_auto_follow),
686
704
  )
687
705
 
706
+ for no_follow_pattern, (
707
+ config_of_module_name,
708
+ description,
709
+ ) in self.no_follows.items():
710
+ if module_name.matchesToShellPattern(no_follow_pattern)[0]:
711
+ return (
712
+ False,
713
+ "according to yaml 'no-follow' configuration of '%s' for '%s'"
714
+ % (config_of_module_name, no_follow_pattern),
715
+ )
716
+
688
717
  # Do not provide an opinion about it.
689
718
  return None
690
719
 
@@ -331,6 +331,13 @@
331
331
  patterns:
332
332
  - 'templates/*.j2'
333
333
 
334
+ - module-name: 'bindings' # checksum: 7e84029d
335
+ dlls:
336
+ - from_filenames:
337
+ prefixes:
338
+ - 'zaber-motion-lib'
339
+ when: 'None is not version("zaber_motion") >= (5,1,2)'
340
+
334
341
  - module-name: 'bitarray' # checksum: b157a72f
335
342
  anti-bloat:
336
343
  - description: 'remove unittest reference'
@@ -889,6 +896,13 @@
889
896
  - depends:
890
897
  - 'dependency_injector.errors'
891
898
 
899
+ - module-name: 'diatheke' # checksum: ad402cfe
900
+ import-hacks:
901
+ - global-sys-path:
902
+ # This package forces itself into "sys.path" and expects absolute
903
+ # imports to be available.
904
+ - ''
905
+
892
906
  - module-name: 'dipy' # checksum: 6059075a
893
907
  anti-bloat:
894
908
  - description: 'remove dipy and numpy testing framework'
@@ -2511,6 +2525,82 @@
2511
2525
  change_function:
2512
2526
  '_overrides': "'(lambda method, *args, **kwargs: method)'"
2513
2527
 
2528
+ - module-name: 'paddle' # checksum: 11103e47
2529
+ dlls:
2530
+ - from_filenames:
2531
+ relative_path: 'libs'
2532
+ prefixes:
2533
+ - 'lib'
2534
+ - 'mkl'
2535
+ - 'war'
2536
+ - 'common'
2537
+
2538
+ - module-name: 'paddle.base.core' # checksum: a81e13c9
2539
+ anti-bloat:
2540
+ - replacements_plain:
2541
+ "third_lib_path = current_path + os.sep + '..' + os.sep + 'libs'": "third_lib_path = os.path.normpath(current_path + os.sep + '..' + os.sep + 'libs')"
2542
+ change_function:
2543
+ 'set_paddle_lib_path': "'(lambda: None)'"
2544
+
2545
+ - module-name: 'paddle.distributed.fleet.launch_utils' # checksum: 69fc840a
2546
+ anti-bloat:
2547
+ - description: 'remove setuptools usage'
2548
+ replacements_plain:
2549
+ 'import paddle.utils.cpp_extension.extension_utils as utils': ''
2550
+ replacements:
2551
+ "utils.OS_NAME.startswith('darwin')": 'repr(macos)'
2552
+ 'utils.IS_WINDOWS': 'repr(win32)'
2553
+ when: 'not use_setuptools'
2554
+
2555
+ - module-name: 'paddle.fluid.core' # checksum: a81e13c9
2556
+ anti-bloat:
2557
+ - replacements_plain:
2558
+ "third_lib_path = current_path + os.sep + '..' + os.sep + 'libs'": "third_lib_path = os.path.normpath(current_path + os.sep + '..' + os.sep + 'libs')"
2559
+ change_function:
2560
+ 'set_paddle_lib_path': "'(lambda: None)'"
2561
+
2562
+ - module-name: 'paddle.jit.sot.opcode_translator.skip_files' # checksum: 5721def1
2563
+ anti-bloat:
2564
+ - description: 'remove setuptools usage'
2565
+ replacements_plain:
2566
+ 'import setuptools': ''
2567
+ 'setuptools,': ''
2568
+ when: 'not use_setuptools'
2569
+ - description: 'remove unittest reference'
2570
+ replacements_plain:
2571
+ 'import unittest': ''
2572
+ 'unittest,': ''
2573
+ when: 'not use_unittest'
2574
+
2575
+ - module-name: 'paddle.utils' # checksum: 9f797eec
2576
+ anti-bloat:
2577
+ - description: 'remove setuptools usage'
2578
+ # TODO: We need a special form of removing import assignments
2579
+ replacements_plain:
2580
+ 'cpp_extension,': ''
2581
+ when: 'not use_setuptools'
2582
+
2583
+ - module-name: 'paddleocr' # checksum: 90264499
2584
+ import-hacks:
2585
+ - global-sys-path:
2586
+ # This package forces itself into "sys.path" and expects absolute
2587
+ # imports from all of these to be available.
2588
+ - ''
2589
+ - 'ppstructure'
2590
+ - 'tools/infer'
2591
+ - 'ppocr/postprocess'
2592
+ - 'ppocr'
2593
+ - 'ppocr/utils/e2e_utils'
2594
+ - 'ppocr/utils'
2595
+ - 'ppstructure/layout'
2596
+ - 'ppstructure/table'
2597
+
2598
+ - module-name: 'paddleocr.paddleocr' # checksum: 8cf243fc
2599
+ anti-bloat:
2600
+ - replacements_plain:
2601
+ 'tools = _import_file(': ''
2602
+ " 'tools', os.path.join(__dir__, 'tools/__init__.py'), make_importable=True)": 'from . import tools'
2603
+
2514
2604
  - module-name: 'panda3d' # checksum: ed772c0a
2515
2605
  data-files:
2516
2606
  dest_path: '.'
@@ -3110,6 +3200,21 @@
3110
3200
  'plumbum.colorlib._ipython_ext': 'ignore'
3111
3201
  when: 'not use_ipython'
3112
3202
 
3203
+ - module-name: 'plyer' # checksum: c06d8897
3204
+ implicit-imports:
3205
+ - depends:
3206
+ - 'plyer.platforms.win.*'
3207
+ when: 'win32'
3208
+ - depends:
3209
+ - 'plyer.platforms.linux.*'
3210
+ when: 'linux'
3211
+ - depends:
3212
+ - 'plyer.platforms.macosx.*'
3213
+ when: 'macos'
3214
+ - depends:
3215
+ - 'plyer.platforms.android.*'
3216
+ when: 'android'
3217
+
3113
3218
  - module-name: 'polars.lazyframe.frame' # checksum: e9afa6bc
3114
3219
  anti-bloat:
3115
3220
  - description: 'remove IPython reference'
@@ -3154,6 +3259,17 @@
3154
3259
  'test': 'un-callable'
3155
3260
  when: 'not use_pytest'
3156
3261
 
3262
+ - module-name: 'ppocr.utils.e2e_utils.pgnet_pp_utils' # checksum: 935978cf
3263
+ anti-bloat:
3264
+ - replacements_plain:
3265
+ 'from extract_textpoint_slow import *': 'from .extract_textpoint_slow import *'
3266
+ 'from extract_textpoint_fast import generate_pivot_list_fast, restore_poly': 'from .extract_textpoint_fast import generate_pivot_list_fast, restore_poly'
3267
+ import-hacks:
3268
+ - global-sys-path:
3269
+ # This package forces itself into "sys.path" and expects absolute
3270
+ # imports to be available.
3271
+ - ''
3272
+
3157
3273
  - module-name: 'psutil' # checksum: 24d7eb52
3158
3274
  anti-bloat:
3159
3275
  - description: 'resolve platform specific imports at compile time'
@@ -3269,6 +3385,11 @@
3269
3385
  - description: 'PyGame is a GUI framework'
3270
3386
  console: 'recommend'
3271
3387
 
3388
+ - module-name: 'pygame_menu' # checksum: 3f9f0b7d
3389
+ data-files:
3390
+ dirs:
3391
+ - 'resources'
3392
+
3272
3393
  - module-name: 'pygeos._geometry' # checksum: 6a3a4737
3273
3394
  implicit-imports:
3274
3395
  - depends:
@@ -3379,7 +3500,7 @@
3379
3500
  - acceptable-missing-dlls:
3380
3501
  - 'libqpdf'
3381
3502
 
3382
- - module-name: 'PyQt6' # checksum: ba6b9d0b
3503
+ - module-name: 'PyQt6' # checksum: 884033ec
3383
3504
  options:
3384
3505
  checks:
3385
3506
  - description: 'PyQt6 is a GUI framework'
@@ -3387,7 +3508,7 @@
3387
3508
  when: 'use_pyqt6'
3388
3509
  - description: 'PyQt6 on macOS is not supported, use PySide6 instead'
3389
3510
  support_info: 'error'
3390
- when: 'macos and use use_pyqt6'
3511
+ when: 'macos and use_pyqt6'
3391
3512
 
3392
3513
  - module-name: 'pyqtgraph' # checksum: 1d763dc
3393
3514
  data-files:
@@ -5942,7 +6063,7 @@
5942
6063
  'from IPython.core.display import HTML, display': 'raise ImportError'
5943
6064
  when: 'not use_ipython'
5944
6065
 
5945
- - module-name: 'torch' # checksum: ac3832ce
6066
+ - module-name: 'torch' # checksum: 5dee33ed
5946
6067
  parameters:
5947
6068
  - 'name': 'disable-jit'
5948
6069
  'values': 'value in ("yes", "no")'
@@ -5962,6 +6083,14 @@
5962
6083
  bloat-mode-overrides:
5963
6084
  'unittest': 'allow'
5964
6085
  when: 'not use_unittest'
6086
+ - description: 'remove setuptools usage via triton'
6087
+ no-auto-follow:
6088
+ 'triton': 'ignore'
6089
+ when: 'not use_setuptools'
6090
+ - description: 'remove numba reference'
6091
+ no-auto-follow:
6092
+ 'numba': 'ignore'
6093
+ when: 'not use_numba and standalone'
5965
6094
 
5966
6095
  options:
5967
6096
  checks:
@@ -5973,13 +6102,6 @@
5973
6102
  'PYTORCH_JIT': '0'
5974
6103
  when: 'get_parameter("disable-jit", "yes" if standalone else "no") == "yes"'
5975
6104
 
5976
- - module-name: 'torch._dynamo.logging' # checksum: 4fad04bc
5977
- anti-bloat:
5978
- - description: 'remove setuptools usage via triton'
5979
- no-auto-follow:
5980
- 'triton': 'ignore'
5981
- when: 'not use_setuptools'
5982
-
5983
6105
  - module-name: 'torch._dynamo.skipfiles' # checksum: 120e0012
5984
6106
  anti-bloat:
5985
6107
  # When calling inspect.getfile() on Nuitka's loader, it will yield
@@ -5989,22 +6111,20 @@
5989
6111
  replacements_plain:
5990
6112
  'if inspect.isclass(obj)': 'if inspect.isclass(obj) and obj is not __loader__'
5991
6113
 
5992
- - module-name: 'torch._inductor.codecache' # checksum: 3831aa8d
6114
+ - module-name: 'torch._dynamo.variables.builder' # checksum: 6ef7624b
5993
6115
  anti-bloat:
5994
6116
  - description: 'remove setuptools usage'
5995
6117
  replacements_plain:
5996
- 'from torch.utils import cpp_extension': ''
5997
- change_function:
5998
- 'get_include_and_linking_paths': 'un-callable'
5999
- no-auto-follow:
6000
- 'triton': 'ignore'
6118
+ 'has_triton()': 'False'
6001
6119
  when: 'not use_setuptools'
6002
6120
 
6003
- - module-name: 'torch._inductor.codegen.autotuner' # checksum: be659fee
6121
+ - module-name: 'torch._inductor.codecache' # checksum: bb14e715
6004
6122
  anti-bloat:
6005
6123
  - description: 'remove setuptools usage'
6006
- no-auto-follow:
6007
- 'triton': 'ignore'
6124
+ replacements_plain:
6125
+ 'from torch.utils import cpp_extension': ''
6126
+ change_function:
6127
+ 'get_include_and_linking_paths': 'un-callable'
6008
6128
  when: 'not use_setuptools'
6009
6129
 
6010
6130
  - module-name: 'torch._inductor.codegen.common' # checksum: 5d438f8d
@@ -6015,20 +6135,6 @@
6015
6135
  'from .cpp import DTYPE_TO_CPP': 'raise ImportError'
6016
6136
  when: 'not use_setuptools'
6017
6137
 
6018
- - module-name: 'torch._inductor.codegen.triton' # checksum: be659fee
6019
- anti-bloat:
6020
- - description: 'remove setuptools usage'
6021
- no-auto-follow:
6022
- 'triton': 'ignore'
6023
- when: 'not use_setuptools'
6024
-
6025
- - module-name: 'torch._inductor.codegen.triton_utils' # checksum: be659fee
6026
- anti-bloat:
6027
- - description: 'remove setuptools usage'
6028
- no-auto-follow:
6029
- 'triton': 'ignore'
6030
- when: 'not use_setuptools'
6031
-
6032
6138
  - module-name: 'torch._inductor.coordinate_descent_tuner' # checksum: 3a49d1a
6033
6139
  anti-bloat:
6034
6140
  - description: 'remove setuptools usage via triton'
@@ -6081,17 +6187,13 @@
6081
6187
  'if has_triton()': 'if False'
6082
6188
  when: 'not use_setuptools'
6083
6189
 
6084
- - module-name: 'torch._inductor.triton_ops.autotune' # checksum: 6eadc654
6190
+ - module-name: 'torch._inductor.triton_ops.autotune' # checksum: f3c779b5
6085
6191
  anti-bloat:
6086
6192
  - description: 'remove setuptools usage'
6087
6193
  replacements_plain:
6088
6194
  'from ..codecache import cache_dir': ''
6089
6195
  'cache_dir()': '__nuitka_binary_dir, ".cache"'
6090
6196
  when: 'not use_setuptools'
6091
- - description: 'remove setuptools usage via triton'
6092
- no-auto-follow:
6093
- 'triton': 'ignore'
6094
- when: 'not use_setuptools'
6095
6197
 
6096
6198
  - module-name: 'torch._inductor.triton_ops.conv' # checksum: 6185b84c
6097
6199
  anti-bloat:
@@ -6107,14 +6209,7 @@
6107
6209
  'has_triton()': 'False'
6108
6210
  when: 'not use_setuptools'
6109
6211
 
6110
- - module-name: 'torch._inductor.triton_ops.conv_perf_model' # checksum: 4fad04bc
6111
- anti-bloat:
6112
- - description: 'remove setuptools usage via triton'
6113
- no-auto-follow:
6114
- 'triton': 'ignore'
6115
- when: 'not use_setuptools'
6116
-
6117
- - module-name: 'torch._inductor.utils' # checksum: 8eabbe28
6212
+ - module-name: 'torch._inductor.utils' # checksum: 7dd0005
6118
6213
  anti-bloat:
6119
6214
  - description: 'remove setuptools usage via triton'
6120
6215
  replacements_plain:
@@ -6124,8 +6219,6 @@
6124
6219
  'do_bench': 'un-callable'
6125
6220
  'get_device_tflops': 'un-callable'
6126
6221
  'get_gpu_dram_gbps': 'un-callable'
6127
- no-auto-follow:
6128
- 'triton': 'ignore'
6129
6222
  when: 'not use_setuptools'
6130
6223
 
6131
6224
  - module-name: 'torch._jit_internal' # checksum: f49ee799
@@ -6149,11 +6242,12 @@
6149
6242
  - 'torch.onnx.symbolic_opset14'
6150
6243
  - 'torch.onnx.symbolic_opset15'
6151
6244
 
6152
- - module-name: 'torch.sparse._triton_ops' # checksum: b4a47eb
6245
+ - module-name: 'torch.sparse._triton_ops' # checksum: 8eb5107d
6153
6246
  anti-bloat:
6154
6247
  - description: 'remove setuptools usage via triton'
6155
6248
  replacements_plain:
6156
6249
  'if _has_triton()': 'if False'
6250
+ 'if has_triton()': 'if False'
6157
6251
  change_function:
6158
6252
  '_has_triton': "'(lambda: False)'"
6159
6253
  when: 'not use_setuptools'
@@ -6949,17 +7043,26 @@
6949
7043
  - 'Grammar.txt'
6950
7044
  - 'PatternGrammar.txt'
6951
7045
 
6952
- - module-name: 'zaber_motion' # checksum: 793b2dd4
7046
+ - module-name: 'zaber_motion' # checksum: 7af9b202
6953
7047
  implicit-imports:
6954
7048
  - depends:
6955
7049
  - 'zaber_motion_bindings_windows'
6956
- when: 'win32'
7050
+ when: 'win32 and version("zaber_motion") < (5,1,2)'
6957
7051
  - depends:
6958
7052
  - 'zaber_motion_bindings_linux'
6959
- when: 'linux'
7053
+ when: 'linux and version("zaber_motion") < (5,1,2)'
6960
7054
  - depends:
6961
7055
  - 'zaber_motion_bindings_darwin'
6962
- when: 'macos'
7056
+ when: 'macos and version("zaber_motion") < (5,1,2)'
7057
+ - depends:
7058
+ - 'bindings'
7059
+ when: 'version("zaber_motion") >= (5,1,2)'
7060
+
7061
+ - module-name: 'zaber_motion.bindings' # checksum: ebad5220
7062
+ anti-bloat:
7063
+ - description: 'normalize path for DLLs'
7064
+ replacements_plain:
7065
+ 'os.path.join(os.path.dirname(__file__), "..", "bindings", lib_name)': 'os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "bindings", lib_name))'
6963
7066
 
6964
7067
  - module-name: 'zaber_motion_bindings_darwin' # checksum: dbde56ea
6965
7068
  dlls:
@@ -326,7 +326,7 @@ def parsePyIFile(module_name, pyi_filename):
326
326
  in_import_part = ""
327
327
  in_quote = None
328
328
 
329
- for line_number, line in enumerate(getFileContentByLine(pyi_filename), start=1):
329
+ for line in getFileContentByLine(pyi_filename):
330
330
  line = line.strip()
331
331
 
332
332
  if in_quote:
@@ -351,7 +351,8 @@ def parsePyIFile(module_name, pyi_filename):
351
351
  elif line.startswith("from "):
352
352
  parts = line.split(None, 3)
353
353
  assert parts[0] == "from"
354
- assert parts[2] == "import", (line, pyi_filename, line_number)
354
+ if parts[2] != "import":
355
+ continue
355
356
 
356
357
  origin_name = parts[1]
357
358
 
nuitka/utils/AppDirs.py CHANGED
@@ -40,6 +40,11 @@ appdirs = importFromInlineCopy("appdirs", must_exist=False, delete_module=True)
40
40
  if appdirs is None:
41
41
  import appdirs # pylint: disable=I0021,import-error
42
42
 
43
+
44
+ def getAppdirsModule():
45
+ return appdirs
46
+
47
+
43
48
  _cache_dir = None
44
49
 
45
50
 
@@ -31,6 +31,7 @@ from nuitka.PythonFlavors import (
31
31
  isPosixWindows,
32
32
  )
33
33
  from nuitka.PythonVersions import python_version
34
+ from nuitka.Tracing import metadata_logger
34
35
 
35
36
  from .FileOperations import searchPrefixPath
36
37
  from .Importing import getModuleNameAndKindFromFilenameSuffix
@@ -41,7 +42,18 @@ _package_to_distribution = None
41
42
 
42
43
 
43
44
  def getDistributionFiles(distribution):
44
- if hasattr(distribution, "files"):
45
+ try:
46
+ hasattr_files = hasattr(distribution, "files")
47
+ except OSError:
48
+ metadata_logger.warning(
49
+ """\
50
+ Error, failure to access '.files()' of distribution '%s', path '%s', this \
51
+ is typically caused by corruption of its installation."""
52
+ % (distribution, _getDistributionPath(distribution))
53
+ )
54
+ hasattr_files = False
55
+
56
+ if hasattr_files:
45
57
  for filename in distribution.files or ():
46
58
  filename = filename.as_posix()
47
59
 
@@ -66,6 +78,14 @@ def _getDistributionMetadataFileContents(distribution, filename):
66
78
  return result
67
79
  except (FileNotFoundError, KeyError):
68
80
  return None
81
+ except OSError:
82
+ metadata_logger.warning(
83
+ """\
84
+ Error, failure to access '%s' of distribution '%s', path '%s', this \
85
+ is typically caused by corruption of its installation."""
86
+ % (filename, distribution, _getDistributionPath(distribution))
87
+ )
88
+ return None
69
89
 
70
90
 
71
91
  def getDistributionTopLevelPackageNames(distribution):
@@ -291,8 +311,12 @@ def isDistributionSystemPackage(distribution_name):
291
311
  _pdm_dir_cache = {}
292
312
 
293
313
 
314
+ def _getDistributionPath(distribution):
315
+ return getattr(distribution, "_path", None)
316
+
317
+
294
318
  def isPdmPackageInstallation(distribution):
295
- distribution_path = getattr(distribution, "_path", None)
319
+ distribution_path = _getDistributionPath(distribution)
296
320
  if distribution_path is None:
297
321
  return False
298
322
 
@@ -300,6 +324,7 @@ def isPdmPackageInstallation(distribution):
300
324
  if site_packages_path is None:
301
325
  return False
302
326
 
327
+ # spell-checker: ignore pyvenv
303
328
  candidate = os.path.join(site_packages_path, "..", "..", "pyvenv.cfg")
304
329
 
305
330
  result = _pdm_dir_cache.get(candidate)
@@ -338,16 +363,15 @@ def getDistributionInstallerName(distribution_name):
338
363
  elif isAnacondaPython():
339
364
  _distribution_to_installer[distribution_name] = "conda"
340
365
  elif isPdmPackageInstallation(distribution):
341
- return "pip"
366
+ _distribution_to_installer[distribution_name] = "pip"
342
367
  elif isMSYS2MingwPython():
343
- return "MSYS2 MinGW"
368
+ _distribution_to_installer[distribution_name] = "MSYS2 MinGW"
344
369
  elif isPosixWindows():
345
- return "MSYS2 Posix"
370
+ _distribution_to_installer[distribution_name] = "MSYS2 Posix"
346
371
  else:
347
- if hasattr(distribution, "_path"):
348
- distribution_path_parts = str(getattr(distribution, "_path")).split(
349
- "/"
350
- )
372
+ distribution_path = _getDistributionPath(distribution)
373
+ if distribution_path is not None:
374
+ distribution_path_parts = str(distribution_path).split("/")
351
375
 
352
376
  if (
353
377
  "dist-packages" in distribution_path_parts
@@ -382,7 +406,7 @@ def getDistributionName(distribution):
382
406
  assert isValidDistributionName(result), (
383
407
  distribution,
384
408
  result,
385
- getattr(distribution, "_path", "no path"),
409
+ _getDistributionPath(distribution),
386
410
  )
387
411
  return result
388
412
 
@@ -298,8 +298,20 @@ def getFilenameRealPath(path):
298
298
  doesn't handle file symlinks at the end on older Python currently, but
299
299
  we shouldn't deal with those.
300
300
  """
301
+ orig_path = path
301
302
  path = os.path.realpath(path)
302
303
 
304
+ # Avoid network mounts being converted to UNC shared paths ny newer
305
+ # Python versions, many tools won't work with those.
306
+ if os.name == "nt" and path.startswith("\\\\"):
307
+ drive, _remaining_path = os.path.splitdrive(orig_path)
308
+
309
+ if drive:
310
+ drive_real_path = os.path.realpath(drive + "\\")
311
+ assert path.startswith(drive_real_path)
312
+
313
+ path = drive + path[len(drive_real_path) :]
314
+
303
315
  # Attempt to resolve Windows symlinks older Python
304
316
  if os.name == "nt":
305
317
  path = path.strip(os.path.sep)
@@ -317,7 +329,7 @@ def getFilenameRealPath(path):
317
329
  if os.path.sep not in dirname:
318
330
  dirname = dirname + os.path.sep
319
331
 
320
- return os.path.normpath(os.path.join(dirname, filename))
332
+ path = os.path.normpath(os.path.join(dirname, filename))
321
333
 
322
334
  return path
323
335