fasthtml-tailwindcss-cli 4.3.3__tar.gz

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.
@@ -0,0 +1,29 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ venv/
5
+ build/
6
+ dist/
7
+ *.egg-info/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ .mypy_cache/
11
+ .cache/
12
+ .coverage*
13
+ coverage.xml
14
+ htmlcov/
15
+ .env
16
+ .envrc
17
+ .pypirc
18
+ .env.*
19
+ !.env.example
20
+ *.log
21
+ *.swp
22
+ *.swo
23
+ .idea/
24
+ .vscode/
25
+ .DS_Store
26
+ Thumbs.db
27
+ /packages/cli/src/fasthtml_tailwindcss_cli/bin/
28
+ /.fasthtml-tailwindcss/
29
+ /source-dist/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SpaceShaman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.5
2
+ Name: fasthtml-tailwindcss-cli
3
+ Version: 4.3.3
4
+ Summary: Platform-specific Tailwind CSS standalone CLI binary for fasthtml-tailwindcss.
5
+ Author-email: SpaceShaman <spaceshaman@tuta.io>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ License-File: TAILWIND-LICENSE
9
+ Keywords: binary,cli,tailwindcss
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+
21
+ # fasthtml-tailwindcss-cli
22
+
23
+ Platform-specific wheels containing the official standalone Tailwind CSS CLI binary. It is installed as the `dev` extra of [fasthtml-tailwindcss](https://pypi.org/project/fasthtml-tailwindcss/) and is not needed to serve a prebuilt stylesheet.
24
+
25
+ The package version matches the bundled Tailwind CSS release. See the [project repository](https://github.com/SpaceShaman/fasthtml-tailwindcss) for usage and release details.
@@ -0,0 +1,5 @@
1
+ # fasthtml-tailwindcss-cli
2
+
3
+ Platform-specific wheels containing the official standalone Tailwind CSS CLI binary. It is installed as the `dev` extra of [fasthtml-tailwindcss](https://pypi.org/project/fasthtml-tailwindcss/) and is not needed to serve a prebuilt stylesheet.
4
+
5
+ The package version matches the bundled Tailwind CSS release. See the [project repository](https://github.com/SpaceShaman/fasthtml-tailwindcss) for usage and release details.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Tailwind Labs, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "4.3.3",
3
+ "sha256": {
4
+ "tailwindcss-linux-arm64": "55fd0b241214eff3de1e8ee4f22796662f2d2e7a49bcfca7477cfd0bac398195",
5
+ "tailwindcss-linux-arm64-musl": "71ea4be79c9de9827545682df3e040053fb535d37c71ed2cfdedf9385a0868e0",
6
+ "tailwindcss-linux-x64": "dc61b3ac6b8c9ca874c0cc4c57b2409791a64c5540404ca5f5367360babc313a",
7
+ "tailwindcss-linux-x64-musl": "a04d34ceacc8f52cbe8920ad846cdeb61d3d0021dba32db0d1f77c9d9fad7a6c",
8
+ "tailwindcss-macos-arm64": "cdf646702987a743464dff4d9c60fd4480d1c1e73dd819a9a67f1078815dce9d",
9
+ "tailwindcss-macos-x64": "7922e0953f2110c05976e3bf58f14e643d90427575e766b7d433f5f80cbee7e1",
10
+ "tailwindcss-windows-x64.exe": "e0e260ce048014e9268f6237ff18f8ccf02cef521cbd0ae04e82c2cdf7aa3955"
11
+ }
12
+ }
@@ -0,0 +1,83 @@
1
+ import hashlib
2
+ import json
3
+ import os
4
+ import platform
5
+ import shutil
6
+ import tempfile
7
+ from pathlib import Path
8
+ from urllib.request import urlopen
9
+
10
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
11
+
12
+ TARGETS = {
13
+ "linux-x64": "manylinux_2_28_x86_64",
14
+ "linux-arm64": "manylinux_2_28_aarch64",
15
+ "linux-x64-musl": "musllinux_1_2_x86_64",
16
+ "linux-arm64-musl": "musllinux_1_2_aarch64",
17
+ "macos-x64": "macosx_13_0_x86_64",
18
+ "macos-arm64": "macosx_13_0_arm64",
19
+ "windows-x64": "win_amd64",
20
+ }
21
+
22
+
23
+ def native_target():
24
+ system = {"Linux": "linux", "Darwin": "macos", "Windows": "windows"}.get(
25
+ platform.system()
26
+ )
27
+ arch = {"x86_64": "x64", "AMD64": "x64", "arm64": "arm64", "aarch64": "arm64"}.get(
28
+ platform.machine()
29
+ )
30
+ target = f"{system}-{arch}"
31
+ if system == "linux" and (
32
+ platform.libc_ver()[0] == "musl" or any(Path("/lib").glob("ld-musl-*.so.1"))
33
+ ):
34
+ target += "-musl"
35
+ return target
36
+
37
+
38
+ def download_binary(url, binary, expected):
39
+ if binary.exists() and hashlib.sha256(binary.read_bytes()).hexdigest() == expected:
40
+ return
41
+ with tempfile.TemporaryDirectory() as temporary:
42
+ download = Path(temporary) / binary.name
43
+ with urlopen(url, timeout=120) as response, download.open("wb") as destination:
44
+ shutil.copyfileobj(response, destination)
45
+ if hashlib.sha256(download.read_bytes()).hexdigest() != expected:
46
+ raise RuntimeError(f"Checksum mismatch for {url}")
47
+ shutil.copyfile(download, binary)
48
+
49
+
50
+ class CustomBuildHook(BuildHookInterface):
51
+ def initialize(self, version, build_data):
52
+ if self.target_name not in {"wheel", "editable"}:
53
+ return
54
+ root = Path(self.root)
55
+ manifest = json.loads((root / "binaries.json").read_text())
56
+ if self.metadata.version.split(".post")[0] != manifest["version"]:
57
+ raise ValueError("Package version must match binaries.json")
58
+ target = os.environ.get("TAILWIND_BUILD_TARGET", native_target())
59
+ if target not in TARGETS:
60
+ raise RuntimeError(f"No official standalone Tailwind binary for {target}")
61
+ suffix = ".exe" if target.startswith("windows-") else ""
62
+ asset = f"tailwindcss-{target}{suffix}"
63
+ binary = (
64
+ root
65
+ / "src"
66
+ / "fasthtml_tailwindcss_cli"
67
+ / "bin"
68
+ / f"tailwindcss{suffix}"
69
+ )
70
+ binary.parent.mkdir(parents=True, exist_ok=True)
71
+ url = (
72
+ "https://github.com/tailwindlabs/tailwindcss/releases/download/"
73
+ f"v{manifest['version']}/{asset}"
74
+ )
75
+ download_binary(url, binary, manifest["sha256"][asset])
76
+ binary.chmod(0o755)
77
+ if self.target_name == "editable":
78
+ return
79
+ build_data["pure_python"] = False
80
+ build_data["tag"] = f"py3-none-{TARGETS[target]}"
81
+ build_data["artifacts"].append(
82
+ f"src/fasthtml_tailwindcss_cli/bin/tailwindcss{suffix}"
83
+ )
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "fasthtml-tailwindcss-cli"
3
+ version = "4.3.3"
4
+ description = "Platform-specific Tailwind CSS standalone CLI binary for fasthtml-tailwindcss."
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = "MIT"
8
+ license-files = ["LICENSE", "TAILWIND-LICENSE"]
9
+ authors = [{ name = "SpaceShaman", email = "spaceshaman@tuta.io" }]
10
+ keywords = ["tailwindcss", "cli", "binary"]
11
+ classifiers = [
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3 :: Only",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Programming Language :: Python :: 3.14",
18
+ "Programming Language :: Python :: 3.15",
19
+ "Topic :: Software Development :: Build Tools",
20
+ ]
21
+
22
+ [build-system]
23
+ requires = ["hatchling>=1.27"]
24
+ build-backend = "hatchling.build"
25
+
26
+ [tool.hatch.build.targets.wheel]
27
+ packages = ["src/fasthtml_tailwindcss_cli"]
28
+
29
+ [tool.hatch.build.targets.sdist]
30
+ include = ["/src", "/hatch_build.py", "/binaries.json", "/pyproject.toml", "/README.md", "/LICENSE", "/TAILWIND-LICENSE"]
31
+ exclude = ["/src/fasthtml_tailwindcss_cli/bin"]
32
+
33
+ [tool.hatch.build.hooks.custom]
34
+ path = "hatch_build.py"
@@ -0,0 +1,7 @@
1
+ import os
2
+ from pathlib import Path
3
+
4
+
5
+ def binary_path():
6
+ name = "tailwindcss.exe" if os.name == "nt" else "tailwindcss"
7
+ return Path(__file__).parent / "bin" / name