Skip to content

Commit

Permalink
Remove unbuildable exchdapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Sep 15, 2024
1 parent a83b36c commit 2be9ff4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 305 deletions.
5 changes: 0 additions & 5 deletions AutoDuck/pywin32.mak
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ WIN32COM_SOURCE = \
$(GENDIR)\PyIProfAdmin.d \
$(GENDIR)\PyIProfSect.d \
$(GENDIR)\exchange.d \
$(GENDIR)\exchdapi.d \
$(ADSI_DIR)\src\*.cpp \
$(GENDIR)\adsi.d \
$(GENDIR)\PyIADsContainer.d \
Expand Down Expand Up @@ -231,10 +230,6 @@ $(GENDIR)\PyIProfSect.d: $(MAPI_DIR)/src/$(*B).i
$(GENDIR)\exchange.d: $(MAPI_DIR)/src/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(MAPI_DIR)/src/$(*B).i

# Exchange stuff.
$(GENDIR)\exchdapi.d: $(MAPI_DIR)/src/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(MAPI_DIR)/src/$(*B).i

# ADSI
$(GENDIR)\adsi.d: $(ADSI_DIR)/src/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(ADSI_DIR)/src/$(*B).i
Expand Down
6 changes: 0 additions & 6 deletions com/win32comext/mapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
sys.modules["win32com.mapi.exchange"] = exchange
except ImportError:
pass
try:
import exchdapi

sys.modules["win32com.mapi.exchdapi"] = exchdapi
except ImportError:
pass
else:
import win32com

Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/mapi/src/exchange.i
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* File : exchdapi.i */
/* File : exchange.i */

/*
This is designed to be an interface to the Exchange specific
Expand Down
264 changes: 0 additions & 264 deletions com/win32comext/mapi/src/exchdapi.i

This file was deleted.

2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exclude = (?x)(
)

; C-modules that will need type-stubs
[mypy-adsi.*,dde,exchange,exchdapi,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme]
[mypy-adsi.*,dde,exchange,mapi,perfmon,servicemanager,win32api,win32console,win32clipboard,win32comext.adsi.adsi,win32event,win32evtlog,win32file,win32gui,win32help,win32pdh,win32process,win32ras,win32security,win32service,win32trace,win32ui,win32uiole,win32wnet,_win32sysloader,_winxptheme]
ignore_missing_imports = True

; verstamp is installed from win32verstamp.py called in setup.py
Expand Down
33 changes: 5 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def __init__(self, name, **kw):
WinExt_win32com.__init__(self, name, **kw)

def get_pywin32_dir(self):
# 'win32com.mapi.exchange' and 'win32com.mapi.exchdapi' currently only
# ones with this special requirement
# 'win32com.mapi.exchange' is currently the only
# one with this special requirement
return "win32comext/mapi"


Expand Down Expand Up @@ -387,14 +387,7 @@ def finalize_options(self):
self.swig_cpp = True # hrm - deprecated - should use swig_opts=-c++??

def _why_cant_build_extension(self, ext):
# Return None, or a reason it can't be built.
# Exclude exchange 32-bit utility libraries from 64-bit
# builds. Note that the exchange module now builds, but only
# includes interfaces for 64-bit builds.
if self.plat_name in ["win-amd64", "win-arm64"] and ext.name == "exchdapi":
return "No 64-bit library for utility functions available."
if ext.name == "exchdapi":
return "Haven't worked out how to build on vs2015"
"""Return None, or a reason it can't be built."""
# axdebug fails to build on 3.11 due to Python "frame" objects changing.
# This could be fixed, but is almost certainly not in use any more, so
# just skip it.
Expand Down Expand Up @@ -1625,20 +1618,6 @@ def finalize_options(self):
)
).split(),
),
WinExt_win32com_mapi(
"exchdapi",
libraries="advapi32",
include_dirs=["{mapi}/mapi_headers".format(**dirs)],
sources=(
"""
{mapi}/exchdapi.i {mapi}/exchdapi.cpp
{mapi}/mapi_stub_library/MapiStubLibrary.cpp
{mapi}/mapi_stub_library/StubUtils.cpp
""".format(
**dirs
)
).split(),
),
WinExt_win32com(
"shell",
libraries="shell32",
Expand Down Expand Up @@ -2068,9 +2047,7 @@ def finalize_options(self):
"PyIProfAdmin": "",
"PyIProfSect": "IMAPIProp",
"PyIConverterSession": "",
# exchange and exchdapi
"exchange": None,
"exchdapi": None,
"exchange": None, # mapi module
"PyIExchangeManageStore": "",
"PyIExchangeManageStoreEx": "",
# ADSI
Expand Down Expand Up @@ -2376,7 +2353,7 @@ def maybe_fixup_exes():
# Print the list of extension modules we skipped building.
excluded_extensions = dist.command_obj["build_ext"].excluded_extensions
if excluded_extensions:
skip_whitelist = {"exchdapi", "exchange", "axdebug"}
skip_whitelist = {"exchange", "axdebug"}
skipped_ex = []
print("*** NOTE: The following extensions were NOT %s:" % what_string)
for ext, why in excluded_extensions:
Expand Down

0 comments on commit 2be9ff4

Please sign in to comment.