Skip to content

Commit

Permalink
Remove the windows .bat file - and add windows to CI
Browse files Browse the repository at this point in the history
Fixes #215
Fixes #261
  • Loading branch information
nipunn1313 committed Jul 23, 2021
1 parent a7d4ac2 commit 8be3c20
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,18 @@ jobs:
run: |
pip3 install black
black --check mypy_protobuf/main.py test/
sanity_check_windows:
name: Sanity Check Windows Executable
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.17.3'
- run: |
pip3 install -e .
mkdir wintestout
protoc --python_out=wintestout --mypy_out=wintestout proto\mypy_protobuf\extensions.proto
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Add protobuf type stubs to the setup requirements
- Fix [#239](https://github.com/dropbox/mypy-protobuf/issues/239) Remove type: ignore used in enum by pulling `V` into a separate class.
- Use pytest 6.2.4 for internal test suites on python3
- Remove `protoc_gen_mypy.bat` as the entry-points method creates protoc-gen-mypy.exe. Add test confirming.

## 2.7

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Alternately, you can explicitly provide the path:
```
protoc --plugin=protoc-gen-mypy=path/to/protoc-gen-mypy --python_out=output/location --mypy_out=output/location
```
On windows, provide the bat file:
Check the version number with
```
protoc --plugin=protoc-gen-mypy=path/to/protoc_gen_mypy.bat --python_out=output/location --mypy_out=output/location
> protoc-gen-mypy --version
```

## Getting Help
Expand All @@ -68,7 +68,7 @@ Find other developers in the mypy-protobuf slack workspace ([Invitation Link](ht
## Implementation

The implementation of the plugin is in `mypy_protobuf/main.py`, which installs to
an executable protoc-gen-mypy. On windows you will have to use `protoc_gen_mypy.bat` for the executable.
an executable protoc-gen-mypy. On windows it installs to `protoc-gen-mypy.exe`

## Features

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ def get_version() -> str:
"protoc-gen-mypy_grpc = mypy_protobuf.main:grpc",
],
},
scripts=["mypy_protobuf/protoc_gen_mypy.bat"],
python_requires=">=3.6",
)

0 comments on commit 8be3c20

Please sign in to comment.