Skip to content

Commit 1cd8478

Browse files
committed
Add pywin32_system32 to PATH to help with pip installs. Fixes #1153
1 parent 3930480 commit 1cd8478

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

CHANGES.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ However contributors are encouraged to add their own entries for their work.
66

77
Since build 222:
88
----------------
9+
* pywin32.pth now arranges for the pywin32_system32 directory to be on
10+
PATH to help with pypi installations (thanks to @xovian via #1153)
911

1012
Since build 221:
1113
----------------

README.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@ Note that PIP support is experimental.
2222
You can install pywin32 via pip:
2323
> pip install pywin32
2424
25-
However, you almost certainly need to execute:
26-
> python Scripts/pywin32_postinstall.py -install
27-
28-
after installation, or you will see various ImportErrors importing core
29-
modules.
25+
Note that if you want to use pywin32 for "system wide" features, such as
26+
registering COM objects or implementing Windows Services, then you must run
27+
the following command from an elevated command prompt:
3028

31-
Note that if you want to use pywin32 for "system wide" features, such as COM
32-
objects or Windows Services, then you must run the above command from an
33-
elevated command prompt.
29+
> python Scripts/pywin32_postinstall.py -install
3430
3531
## Building from source
3632
Building from source is extremely complicated due to the fact we support building

pywin32.pth

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
win32
33
win32\lib
44
Pythonwin
5+
# Entries needed for a "portable" installations, where the post_install script
6+
# isn't run, which would normally copy the pywin32 core DLL files to either
7+
# the top of the python directory.
8+
# We just stick the source of these DLLs directly on the PATH.
9+
import os;os.environ["PATH"]+=(';'+os.path.join(sitedir,"pywin32_system32"))

0 commit comments

Comments
 (0)