diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ee1cb4c..cf1393e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index f24891d1..35344d3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 74d54e82..742692f6 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/setup.py b/setup.py index 90a6ef5d..85cd4c03 100644 --- a/setup.py +++ b/setup.py @@ -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", )