Skip to content

Commit b69415b

Browse files
authored
Merge pull request #21 from openziti/publish-win32-wheel
Publish win32 wheel
2 parents cc4bad6 + 1e5f18b commit b69415b

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

.github/workflows/wheels.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
matrix:
1111
spec:
1212
- { name: 'linux x86_64', runner: ubuntu-20.04, target: manylinux_2_27_x86_64 }
13-
- { name: 'macOS x86_64', runner: macos-10.15, target: macosx_10_14_x86_64 }
13+
- { name: 'macOS x86_64', runner: macos-11, target: macosx_10_14_x86_64 }
14+
- { name: 'Windows x86_64', runner: windows-2019, target: win_amd64 }
1415
name: building ${{ matrix.spec.name }}
1516
runs-on: ${{ matrix.spec.runner }}
1617
env:
@@ -31,16 +32,17 @@ jobs:
3132

3233
- name: Get Ziti SDK C
3334
run: |
34-
set -x
3535
python tools/get_zitilib.py
3636
3737
- name: Run Integration Tests
3838
if: ${{ env.HAVE_TEST_ID == 'true' }}
3939
env:
4040
ZITI_TEST_IDENTITY: ${{ secrets.ZITI_TEST_IDENTITY }}
4141
ZITI_IDENTITIES: id.json
42+
shell: bash
4243
run: |
4344
echo "${ZITI_TEST_IDENTITY}" > "${ZITI_IDENTITIES}"
45+
ls
4446
pip install -r tests/requirements.txt
4547
pip install .
4648
python -m unittest tests/ziti_tests.py
@@ -76,7 +78,7 @@ jobs:
7678
cp download/*/* dist
7779
7880
- name: Publish wheels (TestPYPI)
79-
uses: pypa/gh-action-pypi-publish@master
81+
uses: pypa/gh-action-pypi-publish@release/v1
8082
with:
8183
user: __token__
8284
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
@@ -87,7 +89,7 @@ jobs:
8789

8890
- name: Publish wheels (PyPI)
8991
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
90-
uses: pypa/gh-action-pypi-publish@master
92+
uses: pypa/gh-action-pypi-publish@release/v1
9193
with:
9294
user: __token__
9395
password: ${{ secrets.PYPI_API_TOKEN }}

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ tag_prefix = v
3838
parentdir_prefix = openziti-
3939

4040
[openziti]
41-
ziti_sdk_version = 0.28.7
41+
ziti_sdk_version = 0.29.3

src/openziti/zitilib.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,14 @@ def __repr__(self):
8282
]
8383
_ziti_enroll.restype = ctypes.c_int
8484

85-
_free = ziti.free
86-
_free.argtypes = [ctypes.c_void_p]
85+
def free_win32(arg):
86+
pass
8787

88+
if osname != 'windows':
89+
_free = ziti.free
90+
_free.argtypes = [ctypes.c_void_p]
91+
else:
92+
_free = free_win32
8893

8994
def version():
9095
ver = _ziti_version().contents

tools/get_zitilib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_sdk_version():
6565
LIBNAME = 'libziti.so'
6666
elif osname == 'Darwin':
6767
LIBNAME = 'libziti.dylib'
68-
elif osname == 'win64':
68+
elif osname == 'Windows':
6969
LIBNAME = 'ziti.dll'
7070
else:
7171
raise RuntimeError("Unsupported platform/arch")

0 commit comments

Comments
 (0)