Skip to content

Commit 32c7d4c

Browse files
Upload msgpack-cxx from brew to PyPI (#1)
* enable brew Signed-off-by: Martijn Govers <[email protected]> * get version from brew Signed-off-by: Martijn Govers <[email protected]> * get the package and tar Signed-off-by: Martijn Govers <[email protected]> * get the package and tar Signed-off-by: Martijn Govers <[email protected]> * exclude brew and install receipt from tarball Signed-off-by: Martijn Govers <[email protected]> * attempt build package Signed-off-by: Martijn Govers <[email protected]> * fix tar command Signed-off-by: Martijn Govers <[email protected]> * fix tar command Signed-off-by: Martijn Govers <[email protected]> * fix typo Signed-off-by: Martijn Govers <[email protected]> * repack tarball using artifacts Signed-off-by: Martijn Govers <[email protected]> * back to tarball Signed-off-by: Martijn Govers <[email protected]> * minor Signed-off-by: Martijn Govers <[email protected]> * test Signed-off-by: Martijn Govers <[email protected]> * fix tar command Signed-off-by: Martijn Govers <[email protected]> * minor Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * correctly create tarball wheelhouse Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * minor Signed-off-by: Martijn Govers <[email protected]> * minor Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * actually upload to pypi * fix Signed-off-by: Martijn Govers <[email protected]> DCO Remediation Commit for Martijn Govers <[email protected]> I, Martijn Govers <[email protected]>, hereby add my Signed-off-by to this commit: 0e2ab4e Signed-off-by: Martijn Govers <[email protected]> * fix classifiers Signed-off-by: Martijn Govers <[email protected]> * fix classifiers Signed-off-by: Martijn Govers <[email protected]> * remove long description from pyproject Signed-off-by: Martijn Govers <[email protected]> * cleanup Signed-off-by: Martijn Govers <[email protected]> * do not upload when on separate branch Signed-off-by: Martijn Govers <[email protected]> * single job with only workflow dispatch trigger Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * fix Signed-off-by: Martijn Govers <[email protected]> * revert copy statement Signed-off-by: Martijn Govers <[email protected]> * remove license Signed-off-by: Tony Xiang <[email protected]> * Create LICENSE Signed-off-by: Tony Xiang <[email protected]> * git ignore Signed-off-by: Tony Xiang <[email protected]> * use pypi package: Signed-off-by: Tony Xiang <[email protected]> * remove setup.py Signed-off-by: Tony Xiang <[email protected]> * modify ci Signed-off-by: Tony Xiang <[email protected]> * wheel Signed-off-by: Tony Xiang <[email protected]> * wheel Signed-off-by: Tony Xiang <[email protected]> * copy include Signed-off-by: Tony Xiang <[email protected]> * test Signed-off-by: Tony Xiang <[email protected]> * test Signed-off-by: Tony Xiang <[email protected]> * use namespace Signed-off-by: Tony Xiang <[email protected]> * use files Signed-off-by: Tony Xiang <[email protected]> * format Signed-off-by: Tony Xiang <[email protected]> * remove header Signed-off-by: Tony Xiang <[email protected]> * fix comments Signed-off-by: Tony Xiang <[email protected]> --------- Signed-off-by: Martijn Govers <[email protected]> Signed-off-by: Tony Xiang <[email protected]> Co-authored-by: Tony Xiang <[email protected]>
1 parent ffe00d5 commit 32c7d4c

File tree

13 files changed

+286
-616
lines changed

13 files changed

+286
-616
lines changed

.github/dco.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project <[email protected]>
2-
#
3-
# SPDX-License-Identifier: MPL-2.0
4-
51
allowRemediationCommits:
62
individual: true
73
thirdParty: true

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project <[email protected]>
2-
#
3-
# SPDX-License-Identifier: MPL-2.0
4-
5-
61
version: 2
72
updates:
83
- package-ecosystem: "github-actions"

.github/workflows/main.yml

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
# SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project <[email protected]>
2-
#
3-
# SPDX-License-Identifier: MPL-2.0
4-
51
name: Upload msgpack-cxx to PyPI
62

73
on:
8-
push:
9-
branches:
10-
- main
114
pull_request:
125
workflow_dispatch:
136

147
jobs:
15-
upload:
8+
9+
get-versions:
10+
name: "Upload latest msgpack-cxx version to PyPI"
1611
runs-on: ubuntu-latest
1712
permissions:
1813
contents: read
@@ -23,9 +18,58 @@ jobs:
2318
steps:
2419
- uses: actions/checkout@v4
2520

21+
- name: Setup python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.11"
25+
architecture: x64
26+
27+
- name: Install dependencies
28+
run: pip install build
29+
30+
- name: Enable brew
31+
run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
32+
2633
- name: Download msgpack-cxx
2734
run: brew install msgpack-cxx
2835

29-
- name: Build msgpack-cxx
30-
run:
31-
ls /home/linuxbrew/.linuxbrew/Cellar/msgpack-cxx/6.1.0/
36+
- name: Get latest version
37+
id: version
38+
run: echo "latest=$(brew list --version msgpack-cxx | sed -e 's/msgpack-cxx\s//')" >> $GITHUB_OUTPUT
39+
40+
- name: List version
41+
run: echo "latest=${{ steps.version.outputs.latest }}"
42+
43+
- name: Get the msgpack-cxx contents
44+
run: cp -r /home/linuxbrew/.linuxbrew/Cellar/msgpack-cxx/${{ steps.version.outputs.latest }}/include/* src/msgpack_cxx/include
45+
46+
- name: Set PyPI Version
47+
run: echo "${{ steps.version.outputs.latest }}" >> PYPI_VERSION
48+
49+
- name: Show contents
50+
run: ls -ahl src/msgpack_cxx/include
51+
52+
- name: Build wheel
53+
run: python -m build --wheel --outdir wheelhouse .
54+
55+
- name: Test wheel
56+
run: |
57+
pip install wheelhouse/*
58+
pip install pytest
59+
pytest
60+
61+
- name: Keep Wheel file
62+
uses: actions/upload-artifact@v3
63+
with:
64+
name: wheelhouse
65+
path: ./wheelhouse/*.whl
66+
67+
- name: List assets
68+
run: ls ./wheelhouse/ -al
69+
70+
- name: Upload wheels
71+
if: github.event_name == 'workflow_dispatch'
72+
run: |
73+
pip install twine
74+
echo "Publish to PyPI..."
75+
twine upload --verbose wheelhouse/*

.gitignore

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
132+
.vscode
133+
PYPI_VERSION
134+
135+
.idea/

.pre-commit-config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# SPDX-FileCopyrightText: 2022 Contributors to the Power Grid Model project <[email protected]>
2-
#
3-
# SPDX-License-Identifier: MPL-2.0
4-
51
repos:
62
- repo: https://github.com/fsfe/reuse-tool
73
rev: v1.0.0

.reuse/dep5

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)