[SERVER-56189] pywin32 pip module should be installed no-binary Created: 20/Apr/21  Updated: 19/Jun/23  Resolved: 19/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ryan Egesdahl (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: sdp-backlog-purge
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Operating System: ALL
Participants:

 Description   

The {{

{pywin32}

}} module has an associated post-install script that has to be run after installation. Not running the script leads to errors that look like this when attempting to run {{

{resmoke.py}

}} on Windows:

Administrator@EC2AMAZ-PGDOFBF /data/mci/source-mongodb-mongo-master-d99d24
$  /cygdrive/c/Python39/python.exe buildscripts/resmoke.py run --suites=no_passthrough --storageEngine=wiredTiger --installDir=dist-test/bin --continueOnFailure --excludeWithAnyTags=incompatible_with_windows_tls --jobs=8 --mongodSetParameters='{ featureFlagToaster: true, featureFlagSpoon: true, featureFlagImprovedAuditing: true,  featureFlagTimeseriesCollection: true, featureFlagShardingFullDDLSupport: true,   featureFlagShardingFullDDLSupportTimestampedVersion: true,  featureFlagWindowFunctions: true, featureFlagUseSecondaryDelaySecs: true }' --mongosSetParameters='{ featureFlagTimeseriesCollection: true, featureFlagWindowFunctions: true }' --repeatSuites=1 --shuffle --storageEngineCacheSizeGB=1
Traceback (most recent call last):
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmoke.py", line 12, in <module>
    import buildscripts.resmokelib.cli as cli
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\__init__.py", line 5, in <module>
    from buildscripts.resmokelib import logging
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\logging\__init__.py", line 9, in <module>
    from buildscripts.resmokelib.logging import loggers
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\logging\loggers.py", line 10, in <module>
    from buildscripts.resmokelib.core import redirect as redirect_lib
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\core\__init__.py", line 4, in <module>
    from buildscripts.resmokelib.core import programs
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\core\programs.py", line 13, in <module>
    from buildscripts.resmokelib.core import jasper_process
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\core\jasper_process.py", line 15, in <module>
    from buildscripts.resmokelib.core import process as _process
  File "Z:\data\mci\source-mongodb-mongo-master-d99d24\buildscripts\resmokelib\core\process.py", line 38, in <module>
    import win32api
ImportError: DLL load failed while importing win32api: The specified module could not be found.

When the module is installed as a {{

{wheel}

}}, the post-install script does not run, leading to the confusing error above. We should consider adding {--no-binary=pywin32} as an argument to the module in {{

{requirements.txt}

}}.

Until this is done, users on Windows can run the script manually, as documented here:
https://github.com/mhammond/pywin32/issues/1431#issuecomment-548584385



 Comments   
Comment by Alex Neben [ 19/Jun/23 ]

This has been identified as work that the SDP team won't do in the near term. Please reopen with a comment if you feel this work should be reprioritized and explain why.

Generated at Thu Feb 08 05:38:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.