Skip to content

Commit b4b31ec

Browse files
committed
Add wheel packaging action
1 parent ffbe002 commit b4b31ec

File tree

4 files changed

+63
-4
lines changed

4 files changed

+63
-4
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 🐍 Build Python Wheel
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11'
22+
23+
- name: Install build tool
24+
run: python -m pip install --upgrade build
25+
26+
- name: Build wheel
27+
run: python -m build
28+
29+
- name: Upload wheel artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: oqtopus-wheel
33+
path: dist/*.whl

oqtopus.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python3 -m oqtopus.oqtopus

oqtopus.py renamed to oqtopus/oqtopus.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434

3535
from qgis.PyQt.QtGui import QIcon # noqa: E402
3636

37-
from oqtopus.core.modules_config import ModulesConfig # noqa: E402
38-
from oqtopus.gui.main_dialog import MainDialog # noqa: E402
39-
from oqtopus.utils.plugin_utils import PluginUtils # noqa: E402
37+
from .core.modules_config import ModulesConfig # noqa: E402
38+
from .gui.main_dialog import MainDialog # noqa: E402
39+
from .utils.plugin_utils import PluginUtils # noqa: E402
4040

4141

4242
def main():
@@ -46,7 +46,7 @@ def main():
4646

4747
PluginUtils.init_logger()
4848

49-
conf_path = Path(__file__).parent / "oqtopus/default_config.yaml"
49+
conf_path = Path(__file__).parent / "default_config.yaml"
5050

5151
with conf_path.open() as f:
5252
data = yaml.safe_load(f)

oqtopus/pyproject.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "oqtopus"
7+
version = "0.1.0"
8+
description = "A QGIS module manager"
9+
readme = "README.md"
10+
requires-python = ">=3.8"
11+
license = { file = "LICENSE" }
12+
authors = [
13+
{ name="Damiano Lombardi", email="damiano@opengis.ch" }
14+
]
15+
dependencies = [
16+
"pyyaml",
17+
"pgserviceparser>=2.3.0,<3.0.0",
18+
"pum>=1.1.2,<2.0.0",
19+
"pydantic>=2.0",
20+
"psycopg>=3.1.0,<4.0.0",
21+
"requests>=2.31.0,<3.0.0"
22+
]
23+
24+
[tool.setuptools.packages.find]
25+
where = ["oqtopus"]

0 commit comments

Comments
 (0)