Skip to content

Commit f6c8dc2

Browse files
committed
Change package layout
1 parent 5f5ee31 commit f6c8dc2

22 files changed

+98
-34
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish
1+
name: publish
22

33
on:
44
release:
@@ -12,8 +12,12 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: extractions/setup-just@v2
1414
- uses: astral-sh/setup-uv@v5
15-
with:
16-
cache-dependency-glob: "**/pyproject.toml"
17-
- run: just publish
15+
- if: startsWith(github.ref_name, 'stompman')
16+
run: just publish stompman
17+
env:
18+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
19+
20+
- if: startsWith(github.ref_name, 'faststream-stomp')
21+
run: just publish faststream-stomp
1822
env:
1923
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ RUN pip install uv
77

88
WORKDIR /app
99
COPY pyproject.toml README.md ./
10-
COPY stompman/__init__.py stompman/__init__.py
10+
COPY packages/stompman/stompman/__init__.py packages/stompman/stompman/__init__.py
11+
COPY packages/stompman/pyproject.toml packages/stompman/pyproject.toml
12+
COPY packages/faststream-stomp/README.md packages/faststream-stomp/README.md
13+
COPY packages/faststream-stomp/pyproject.toml packages/faststream-stomp/pyproject.toml
14+
COPY packages/faststream-stomp/faststream_stomp/__init__.py packages/faststream-stomp/faststream_stomp/__init__.py
1115

1216
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0
1317
RUN --mount=type=cache,target=~/.cache/uv \
14-
uv lock && uv sync
18+
ls packages/faststream-stomp && uv lock && uv sync
1519
COPY . .

Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ run-consumer:
2626
run-producer:
2727
uv run examples/producer.py
2828

29-
publish:
29+
publish package:
3030
rm -rf dist
31-
uv build
31+
uv build --package {{package}}
3232
uv publish --token $PYPI_TOKEN

packages/faststream-stomp/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# FastStream STOMP broker
2+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[project]
2+
name = "faststream-stomp"
3+
description = "FastStream STOMP broker"
4+
authors = [{ name = "Lev Vereshchagin", email = "mail@vrslev.com" }]
5+
dependencies = ["faststream>=0.5"]
6+
requires-python = ">=3.11"
7+
readme = "README.md"
8+
license = { text = "MIT" }
9+
keywords = ["faststream", "stomp", "artemis", "activemq", "messaging", "jms"]
10+
classifiers = [
11+
"Development Status :: 4 - Beta",
12+
"Natural Language :: English",
13+
"Programming Language :: Python :: Implementation :: CPython",
14+
"Topic :: System :: Networking",
15+
"Typing :: Typed",
16+
]
17+
dynamic = ["version"]
18+
19+
[project.urls]
20+
repository = "https://github.com/vrslev/stompman"
21+
22+
[build-system]
23+
requires = ["hatchling", "hatch-vcs"]
24+
build-backend = "hatchling.build"
25+
26+
[tool.hatch.version]
27+
source = "vcs"
28+
raw-options.root = "../.."
29+
fallback-version = "0"
30+
31+
[tool.hatch.build]
32+
include = ["faststream_stomp"]

packages/stompman/pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[project]
2+
name = "stompman"
3+
description = "Python STOMP client with pleasant API"
4+
authors = [{ name = "Lev Vereshchagin", email = "mail@vrslev.com" }]
5+
dependencies = []
6+
requires-python = ">=3.11"
7+
license = { text = "MIT" }
8+
keywords = ["stomp", "artemis", "activemq", "messaging", "jms"]
9+
classifiers = [
10+
"Development Status :: 4 - Beta",
11+
"Natural Language :: English",
12+
"Programming Language :: Python :: Implementation :: CPython",
13+
"Topic :: System :: Networking",
14+
"Typing :: Typed",
15+
]
16+
dynamic = ["version", "readme"]
17+
18+
[project.urls]
19+
repository = "https://github.com/vrslev/stompman"
20+
21+
[build-system]
22+
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
23+
build-backend = "hatchling.build"
24+
25+
[tool.hatch.version]
26+
source = "vcs"
27+
raw-options.root = "../.."
28+
fallback-version = "0"
29+
30+
[tool.hatch.build]
31+
include = ["stompman"]
32+
33+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
34+
content-type = "text/markdown"
35+
36+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
37+
path = "../../README.md"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)