Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit d562037

Browse files
committed
initial commit
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
0 parents  commit d562037

File tree

11 files changed

+333
-0
lines changed

11 files changed

+333
-0
lines changed

.github/dco.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
allowRemediationCommits:
2+
individual: true
3+
thirdParty: true
4+

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/main.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Upload libboost-headers to PyPI
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
9+
get-versions:
10+
name: "Upload latest libboost-headers version to PyPI"
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
env:
15+
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
16+
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
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+
33+
- name: Download boost
34+
run: brew install boost
35+
36+
- name: Get latest version
37+
id: version
38+
run: echo "latest=$(brew list --version boost | sed -e 's/boost\s//')" >> $GITHUB_OUTPUT
39+
40+
- name: List version
41+
run: echo "latest=${{ steps.version.outputs.latest }}"
42+
43+
- name: Get the libboost-headers contents
44+
run: cp -r /home/linuxbrew/.linuxbrew/Cellar/boost/${{ steps.version.outputs.latest }}/include/* src/libboost_headers/include
45+
46+
- name: Set PyPI Version
47+
run: |
48+
echo "$(echo ${{ steps.version.outputs.latest }} | sed -e 's/_\w*//')" >> PYPI_VERSION
49+
cat PYPI_VERSION
50+
51+
- name: Show contents
52+
run: ls -ahl src/libboost_headers/include
53+
54+
- name: Build wheel
55+
run: python -m build --wheel --outdir wheelhouse .
56+
57+
- name: Test wheel
58+
run: |
59+
pip install wheelhouse/*
60+
pip install pytest
61+
pytest
62+
63+
- name: Keep Wheel file
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: wheelhouse
67+
path: ./wheelhouse/*.whl
68+
69+
- name: List assets
70+
run: ls ./wheelhouse/ -al
71+
72+
- name: Upload wheels
73+
if: github.event_name == 'workflow_dispatch'
74+
run: |
75+
pip install twine
76+
echo "Publish to PyPI..."
77+
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/fsfe/reuse-tool
3+
rev: v1.0.0
4+
hooks:
5+
- id: reuse

LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Boost Software License - Version 1.0 - August 17th, 2003
2+
3+
Permission is hereby granted, free of charge, to any person or organization
4+
obtaining a copy of the software and accompanying documentation covered by
5+
this license (the "Software") to use, reproduce, display, distribute,
6+
execute, and transmit the Software, and to prepare derivative works of the
7+
Software, and to permit third-parties to whom the Software is furnished to
8+
do so, all subject to the following:
9+
10+
The copyright notices in the Software and this entire statement, including
11+
the above license grant, this restriction and the following disclaimer,
12+
must be included in all copies of the Software, in whole or in part, and
13+
all derivative works of the Software, unless such copies or derivative
14+
works are solely in the form of machine-executable object code generated by
15+
a source language processor.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23+
DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Boost PyPI
2+
3+
This repo contains automation for [Boost](https://github.com/boostorg/boost).
4+
5+
It creates, packages and pushes the header-only library `libboost-headers` to PyPI.
6+
This repo is the equivalent of the [Anaconda libboost-headers](https://anaconda.org/conda-forge/libboost-headers) package.
7+
8+
**NOTE:** Packages created by this repo only contain the raw source code and not a Python package.
9+
10+
Credits go to the maintainers of the [Boost](https://github.com/boostorg/boost) package.
11+
12+
## License
13+
14+
The files in this repository are licensed under the Boost Software License - Version 1.0.
15+
16+
The distributed boost package is a redistribution of [Boost](https://github.com/boostorg/boost) and therefore falls under the [Boost license model](https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt) as described in the [LICENCE_1_0.txt file in the Boost repository](https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt).

pyproject.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[build-system]
2+
requires = [
3+
"setuptools",
4+
"wheel",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
[project]
9+
name = "libboost-headers"
10+
authors = [
11+
{ name = "Contributors to the Power Grid Model project", email = "powergridmodel@lfenergy.org" }
12+
]
13+
description = "Repackaging of libboost-headers distributed via PyPI"
14+
readme = "README.md"
15+
license = { text = "BSL-1.0" }
16+
classifiers = [
17+
"Programming Language :: C++",
18+
"Development Status :: 5 - Production/Stable",
19+
"Intended Audience :: Developers",
20+
"License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)",
21+
"Operating System :: Microsoft :: Windows",
22+
"Operating System :: POSIX :: Linux",
23+
"Operating System :: MacOS",
24+
"Topic :: File Formats",
25+
"Topic :: Software Development :: Libraries",
26+
]
27+
dependencies = [
28+
"importlib-resources"
29+
]
30+
dynamic = [
31+
"version"
32+
]
33+
34+
[project.optional-dependencies]
35+
dev = [
36+
"pytest"
37+
]
38+
39+
[project.urls]
40+
Home-page = "http://www.boost.org/"
41+
GitHub = "https://github.com/boostorg/boost"
42+
Documentation = "https://www.boost.org/doc/"
43+
44+
[tool.setuptools.packages.find]
45+
where = ["src"]
46+
namespaces = true
47+
48+
[tool.setuptools.dynamic]
49+
version = {file = "PYPI_VERSION"}
50+
51+
[tool.setuptools.package-data]
52+
libboost_headers = ["include/**/*"]

src/libboost_headers/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from pathlib import Path
2+
3+
from importlib_resources import files
4+
5+
6+
def get_include() -> Path:
7+
return files("libboost_headers.include")

src/libboost_headers/include/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)