Skip to content

Commit

Permalink
Make pywin32_postinstall and pywin32_testall into console_scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Oct 15, 2024
1 parent c717bfa commit bc7ad11
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Run tests
# Run the tests directly from the source dir so support files (eg, .wav files etc)
# can be found - they aren't installed into the Python tree.
run: python pywin32_testall.py -v -skip-adodbapi
run: python -m win32.scripts.pywin32_testall -v -skip-adodbapi

- name: Build wheels
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Outside of a virtual environment you might want to install COM objects, services
this by executing:

```shell
python Scripts/pywin32_postinstall.py -install
pywin32_postinstall -install
```

From the root of your Python installation.
Expand Down Expand Up @@ -91,7 +91,7 @@ It usually means one of 2 things:
So you should run it again:

```shell
python Scripts/pywin32_postinstall.py -install
pywin32_postinstall -install
```

This will make some small attempts to cleanup older conflicting installs.
Expand Down
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,18 @@ def maybe_fixup_exes():
"user_access_control": "auto",
},
},
scripts=["pywin32_postinstall.py", "pywin32_testall.py"],
# This adds the scripts under Python3XX/Scripts, but doesn't actually do much
scripts=[
"win32/scripts/pywin32_postinstall.py",
"win32/scripts/pywin32_testall.py",
],
# This shortcuts `python -m win32.scripts.some_script` to just `some_script`
entry_points={
"console_scripts": [
"pywin32_postinstall = win32.scripts.pywin32_postinstall:main",
"pywin32_testall = win32.scripts.pywin32_testall:main",
]
},
ext_modules=ext_modules,
package_dir={
"win32com": "com/win32com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,10 @@ def main():
> python pywin32_postinstall.py -install
* or if pywin32 is already installed:
> pywin32_postinstall -install
If you installed pywin32 via a .exe installer, this should be run
automatically after installation, but if it fails you can run it again.
Expand Down
File renamed without changes.

0 comments on commit bc7ad11

Please sign in to comment.