caddyserver 2.11.7__py3-none-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
.data/scripts/caddy.exe
ADDED
caddyserver/__init__.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""caddyserver: official Caddy binaries distributed as Python wheels.
|
|
2
|
+
|
|
3
|
+
The package version mirrors the bundled Caddy version.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__version__ = "2.11.7"
|
|
7
|
+
CADDY_VERSION = __version__
|
|
8
|
+
|
|
9
|
+
from caddyserver.cli import get_caddy_executable, main # noqa: E402,F401
|
caddyserver/cli.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Console entry point: locate the bundled Caddy binary and exec it.
|
|
2
|
+
|
|
3
|
+
The binary ships inside the wheel under ``.data/scripts/`` and is installed
|
|
4
|
+
by pip into the same directory as the interpreter's executable
|
|
5
|
+
(venv/pipx ``bin/`` on POSIX, the Scripts-less venv root on Windows).
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
import sysconfig
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
_BIN = "caddy.exe" if os.name == "nt" else "caddy"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CaddyNotFound(Exception):
|
|
19
|
+
pass
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def get_caddy_executable() -> Path:
|
|
23
|
+
"""Return the path to the bundled Caddy binary."""
|
|
24
|
+
candidates = []
|
|
25
|
+
|
|
26
|
+
# Primary: pip installs .data/scripts/ into the scheme scripts dir,
|
|
27
|
+
# which is exactly where the `caddy`/`caddyserver` console scripts live.
|
|
28
|
+
# (Do NOT resolve sys.executable: venvs symlink the interpreter to the
|
|
29
|
+
# base install, which would point at the wrong bin/.)
|
|
30
|
+
candidates.append(Path(sysconfig.get_path("scripts")) / _BIN)
|
|
31
|
+
candidates.append(Path(sys.executable).parent / _BIN)
|
|
32
|
+
|
|
33
|
+
# Fallbacks: relative to this package (uninstalled tree, exotic layouts).
|
|
34
|
+
# `pkg` is the caddyserver package dir; `pkg.parent` is site-packages.
|
|
35
|
+
pkg = Path(__file__).resolve().parent
|
|
36
|
+
sp = pkg.parent
|
|
37
|
+
candidates += [
|
|
38
|
+
sp / _BIN,
|
|
39
|
+
pkg / _BIN,
|
|
40
|
+
# uv (uvx / `uv tool install`) leaves the .data tree under
|
|
41
|
+
# site-packages instead of moving it to the scheme scripts dir.
|
|
42
|
+
sp / ".data" / "scripts" / _BIN,
|
|
43
|
+
sp / "data" / "scripts" / _BIN,
|
|
44
|
+
pkg.parent.parent / "bin" / _BIN,
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
for c in candidates:
|
|
48
|
+
c = c.resolve() if c.exists() else c
|
|
49
|
+
if c.is_file():
|
|
50
|
+
return c
|
|
51
|
+
|
|
52
|
+
raise CaddyNotFound(
|
|
53
|
+
"Bundled Caddy binary not found. Looked for:\n "
|
|
54
|
+
+ "\n ".join(str(c) for c in candidates)
|
|
55
|
+
+ "\nWas this package installed from a platform wheel, not the source tree?"
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def main(argv: list[str] | None = None) -> int:
|
|
60
|
+
exe = get_caddy_executable()
|
|
61
|
+
args = sys.argv[1:] if argv is None else argv
|
|
62
|
+
os.execvp(str(exe), [str(exe), *args])
|
|
63
|
+
# Unreachable on success; execvp raises on failure.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: caddyserver
|
|
3
|
+
Version: 2.11.7
|
|
4
|
+
Summary: Caddy web server as platform-specific Python wheels - pip/pipx/uvx installable, offline, no first-run download
|
|
5
|
+
Author: Sushant Gautam
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Project-URL: Homepage, https://github.com/SushantGautam/caddyserve-wheel
|
|
9
|
+
Project-URL: Repository, https://github.com/SushantGautam/caddyserve-wheel
|
|
10
|
+
Project-URL: Issues, https://github.com/SushantGautam/caddyserve-wheel/issues
|
|
11
|
+
Keywords: caddy,webserver,binary,distribution,http3,https
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# caddyserver
|
|
23
|
+
|
|
24
|
+
The [Caddy](https://caddyserver.com/) web server as a Python wheel — install with
|
|
25
|
+
`pip`/`uvx`, no mise, no Docker, no Homebrew, no first-run download.
|
|
26
|
+
**Works offline after install.** `pip`/`uv` picks the right binary for your OS
|
|
27
|
+
and architecture automatically (Windows, macOS, Linux; x86-64 and ARM64).
|
|
28
|
+
|
|
29
|
+
> [!IMPORTANT]
|
|
30
|
+
> **Community-maintained, not the Caddy project.** Official project:
|
|
31
|
+
> https://caddyserver.com / https://github.com/caddyserver/caddy. The binaries
|
|
32
|
+
> here are the official Caddy builds, repackaged as wheels.
|
|
33
|
+
> **Handover:** happy to **hand over the `caddyserver` PyPI project to the
|
|
34
|
+
> official Caddy team** if they want to maintain it — open an issue.
|
|
35
|
+
|
|
36
|
+
## Quick run (no install)
|
|
37
|
+
|
|
38
|
+
```console
|
|
39
|
+
uvx caddyserver version
|
|
40
|
+
uvx caddyserver file-server --listen :8080
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`uvx caddyserver ...` runs Caddy directly — anything after `caddyserver` is
|
|
44
|
+
passed straight to the Caddy CLI.
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```console
|
|
49
|
+
pip install caddyserver # or: uv tool install caddyserver / pipx install caddyserver
|
|
50
|
+
caddy version
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## CLI usage
|
|
54
|
+
|
|
55
|
+
The wheel puts the real `caddy` binary on your PATH, so the full official CLI
|
|
56
|
+
works as-is:
|
|
57
|
+
|
|
58
|
+
```console
|
|
59
|
+
caddy version # show version
|
|
60
|
+
caddy file-server --listen :8080 # serve the current directory
|
|
61
|
+
caddy run --config Caddyfile # start with your Caddyfile
|
|
62
|
+
caddy validate --config Caddyfile # check config syntax
|
|
63
|
+
caddy adapt --config Caddyfile # Caddyfile -> JSON
|
|
64
|
+
caddy list modules # list compiled-in modules
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Any `caddy` subcommand works — this is the unmodified official binary.
|
|
68
|
+
A `caddyserver` console script does the same thing (Python launcher), useful
|
|
69
|
+
when `bin/` is not on PATH: `uvx caddyserver version`.
|
|
70
|
+
|
|
71
|
+
### Programmatic use
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
from caddyserver import get_caddy_executable
|
|
75
|
+
exe = get_caddy_executable() # Path to the bundled caddy binary
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The package **version mirrors the Caddy version**
|
|
79
|
+
(e.g. `caddyserver==2.11.7` bundles Caddy v2.11.7).
|
|
80
|
+
|
|
81
|
+
## Maintenance
|
|
82
|
+
|
|
83
|
+
Committed to tracking the **latest Caddy release** — a bump is one line plus a
|
|
84
|
+
tag, and the pipeline builds, verifies, and publishes automatically.
|
|
85
|
+
**If I am slow to pick up a new Caddy release, [open an issue](https://github.com/SushantGautam/caddyserve-wheel/issues) —
|
|
86
|
+
I will push a new version promptly.** PRs bumping `build/version.txt` welcome.
|
|
87
|
+
|
|
88
|
+
## Verification
|
|
89
|
+
|
|
90
|
+
Every GitHub Release lists the **wheel SHA-256** and the **upstream Caddy
|
|
91
|
+
asset digest** for each file; the build fails hard if any downloaded asset
|
|
92
|
+
doesn't match the [official checksums](https://github.com/caddyserver/caddy/releases).
|
|
93
|
+
|
|
94
|
+
## Version bump (maintainers)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
echo "2.12.0" > build/version.txt
|
|
98
|
+
# also update pyproject.toml version + src/caddyserver/__init__.py __version__
|
|
99
|
+
git commit -am "bump to 2.12.0"
|
|
100
|
+
git tag v2.12.0 && git push --tags # CI builds, verifies, publishes
|
|
101
|
+
```
|
|
102
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
.data/scripts/caddy.exe,ecQ9bhi1dio8z-_GDYrTu8vmQ40XX6GKXWqlYONvcEQ,48903168
|
|
2
|
+
caddyserver-2.11.7.dist-info/METADATA,mjV9zsRFb4UrT1idTQyk2h-d0TiwpRycbhxsme5AfrU,3837
|
|
3
|
+
caddyserver-2.11.7.dist-info/WHEEL,t56ug0Bd_2KR5AcVoqmhytWFeniCM_SbaaVZ3XbiRME,105
|
|
4
|
+
caddyserver-2.11.7.dist-info/entry_points.txt,sKkS3zNsRtNNZkuohttW-ybaG7Tmstuh0aWa_wLgKv4,53
|
|
5
|
+
caddyserver/__init__.py,_8dqN1ZYoC_AxxLBcP30jkmhKNGPHlVY1SSWomdV1Cs,257
|
|
6
|
+
caddyserver/cli.py,L1QbAFz6lyEoq1LJqvdEJt0eElzjBH0qH19RsGvPGcU,2114
|
|
7
|
+
caddyserver-2.11.7.dist-info/RECORD,,
|