Skip to content

Commit

Permalink
skip all win32ui extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Aug 24, 2021
1 parent 6bf3e13 commit 1b9b705
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/setup.py b/setup.py
index 297d15cb..c473499a 100644
index 297d15cb..9719b604 100644
--- a/setup.py
+++ b/setup.py
@@ -102,6 +102,8 @@ try:
Expand All @@ -16,7 +16,7 @@ index 297d15cb..c473499a 100644
return "Only available on platforms %s" % (ext.platforms,)

+ if IS_PYPY and ext.name in ('servicemanager', 'pythonservice',
+ 'PyISAPI_loader', 'win32ui'):
+ 'PyISAPI_loader')
+ return "Cannot build service extensions on PyPy"
+
# We update the .libraries list with the resolved library name.
Expand Down Expand Up @@ -68,13 +68,17 @@ index 297d15cb..c473499a 100644

for mfc_content in mfc_contents:
shutil.copyfile(mfc_content,
@@ -2243,6 +2254,10 @@ packages=['win32com',
@@ -2243,6 +2254,14 @@ packages=['win32com',
'adodbapi',
]

+if IS_PYPY:
+ # all these need Py_Initialize
+ # pythomcom needs Py_Initialize
+ # all the others need pythoncom.lib
+ com_extensions = []
+ # win32ui needs PySys_SetArgv, Py_Finalize
+ # all the others need win32ui.lib
+ pythonwin_extensions = []
+
py_modules = expand_modules("win32\\lib")
ext_modules = win32_extensions + com_extensions + pythonwin_extensions + \
Expand Down

0 comments on commit 1b9b705

Please sign in to comment.