Skip to content

Commit d71662a

Browse files
committedMar 27, 2025·
Add wheel building and publishing workflow
1 parent bb92fce commit d71662a

File tree

4 files changed

+79
-5
lines changed

4 files changed

+79
-5
lines changed
 

‎.github/workflows/build.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- v*.*
9+
pull_request:
10+
workflow_dispatch:
11+
12+
13+
jobs:
14+
build_wheel:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
# Used to host cibuildwheel
21+
- name: Setup python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.11"
25+
26+
- name: Build wheel
27+
run: pip wheel -w ./wheelhouse . --no-deps
28+
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: cibw-wheel
32+
path: ./wheelhouse/*.whl
33+
34+
build_sdist:
35+
name: Build source distribution
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Build sdist
41+
run: pipx run build --sdist
42+
43+
- uses: actions/upload-artifact@v4
44+
with:
45+
name: cibw-sdist
46+
path: dist/*.tar.gz
47+
48+
upload_pypi:
49+
needs: [build_wheel, build_sdist]
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: pypi
53+
url: https://pypi.org/p/kclpy-ext
54+
permissions:
55+
id-token: write
56+
# if: github.event_name == 'release' && github.event.action == 'published'
57+
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
58+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
59+
steps:
60+
- uses: actions/download-artifact@v4
61+
with:
62+
# unpacks all CIBW artifacts into dist/
63+
pattern: cibw-*
64+
path: dist
65+
merge-multiple: true
66+
- name: List artifacts
67+
run: ls -lah dist/
68+
- name: Publish package distributions to PyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1

‎README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Why this Fork for LocalStack?
2+
3+
The official AWS python package does not publish the wheels, thus causing the need to always pull from maven on every install.
4+
This destabilizes our pipeline because maven might rate-limit our runners when accessing the JARs.
5+
16
# Amazon Kinesis Client Library for Python
27

38
[![Version](https://img.shields.io/pypi/v/amazon-kclpy.svg?style=flat)](https://pypi.org/project/amazon-kclpy/) [![UnitTestCoverage](https://github.com/awslabs/amazon-kinesis-client-python/actions/workflows/run-unit-tests.yml/badge.svg)](https://github.com/awslabs/amazon-kinesis-client-python/actions/workflows/run-unit-tests.yml)

‎setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[metadata]
2-
description-file = README.md
2+
description_file = README.md
33
[aliases]
4-
test=pytest
4+
test=pytest

‎setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ def run(self):
227227
pass
228228

229229
setup(
230-
name=PACKAGE_NAME,
230+
name="kclpy-ext",
231231
version=PACKAGE_VERSION,
232-
description='A python interface for the Amazon Kinesis Client Library MultiLangDaemon',
232+
description='A python interface for the Amazon Kinesis Client Library MultiLangDaemon - ext',
233233
license='Apache-2.0',
234234
packages=[PACKAGE_NAME, PACKAGE_NAME + "/v2", PACKAGE_NAME + "/v3", 'samples'],
235235
scripts=glob.glob('samples/*py'),
@@ -242,7 +242,7 @@ def run(self):
242242
setup_requires=["pytest-runner"],
243243
tests_require=["pytest", "mock"],
244244
cmdclass=commands,
245-
url="https://github.com/awslabs/amazon-kinesis-client-python",
245+
url="https://github.com/localstack/amazon-kinesis-client-python",
246246
keywords="amazon kinesis client library python",
247247
zip_safe=False,
248248
)

0 commit comments

Comments
 (0)
Please sign in to comment.