Skip to content

Commit f4636e7

Browse files
committed
Add wheel building and publishing workflow
1 parent bb92fce commit f4636e7

File tree

4 files changed

+76
-5
lines changed

4 files changed

+76
-5
lines changed

.github/workflows/build.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
publish:
7+
description: 'Whether to publish the build'
8+
required: false
9+
type: boolean
10+
default: false
11+
12+
jobs:
13+
build_wheel:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
# Used to host cibuildwheel
20+
- name: Setup python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Build wheel
26+
run: pip wheel -w ./wheelhouse . --no-deps
27+
28+
- uses: actions/upload-artifact@v4
29+
with:
30+
name: cibw-wheel
31+
path: ./wheelhouse/*.whl
32+
33+
build_sdist:
34+
name: Build source distribution
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Build sdist
40+
run: pipx run build --sdist
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: cibw-sdist
45+
path: dist/*.tar.gz
46+
47+
upload_pypi:
48+
needs: [build_wheel, build_sdist]
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: pypi
52+
url: https://pypi.org/p/kclpy-ext
53+
permissions:
54+
id-token: write
55+
if: inputs.publish
56+
steps:
57+
- uses: actions/download-artifact@v4
58+
with:
59+
# unpacks all CIBW artifacts into dist/
60+
pattern: cibw-*
61+
path: dist
62+
merge-multiple: true
63+
- name: List artifacts
64+
run: ls -lah dist/
65+
- name: Publish package distributions to PyPI
66+
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)