Skip to content

Commit

Permalink
Add pywin32_system32 to PATH to help with pip installs. Fixes mhammon…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Feb 25, 2018
1 parent 3930480 commit 1cd8478
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ However contributors are encouraged to add their own entries for their work.

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

Since build 221:
----------------
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ Note that PIP support is experimental.
You can install pywin32 via pip:
> pip install pywin32
However, you almost certainly need to execute:
> python Scripts/pywin32_postinstall.py -install
after installation, or you will see various ImportErrors importing core
modules.
Note that if you want to use pywin32 for "system wide" features, such as
registering COM objects or implementing Windows Services, then you must run
the following command from an elevated command prompt:

Note that if you want to use pywin32 for "system wide" features, such as COM
objects or Windows Services, then you must run the above command from an
elevated command prompt.
> python Scripts/pywin32_postinstall.py -install
## Building from source
Building from source is extremely complicated due to the fact we support building
Expand Down
5 changes: 5 additions & 0 deletions pywin32.pth
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
win32
win32\lib
Pythonwin
# Entries needed for a "portable" installations, where the post_install script
# isn't run, which would normally copy the pywin32 core DLL files to either
# the top of the python directory.
# We just stick the source of these DLLs directly on the PATH.
import os;os.environ["PATH"]+=(';'+os.path.join(sitedir,"pywin32_system32"))

0 comments on commit 1cd8478

Please sign in to comment.