pytailwindcss 0.4.0__tar.gz → 0.4.2__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.
Files changed (24) hide show
  1. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/.gitignore +1 -0
  2. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/.pre-commit-config.yaml +1 -0
  3. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/CHANGELOG.md +12 -0
  4. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/PKG-INFO +3 -1
  5. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/README.md +2 -0
  6. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/pyproject.toml +2 -1
  7. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/__main__.py +9 -0
  8. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/test_main.py +25 -0
  9. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/uv.lock +1 -1
  10. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/.github/dependabot.yml +0 -0
  11. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/.github/workflows/ci.yml +0 -0
  12. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/.github/zizmor.yml +0 -0
  13. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/LICENSE +0 -0
  14. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/__init__.py +0 -0
  15. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/exceptions.py +0 -0
  16. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/installation.py +0 -0
  17. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/py.typed +0 -0
  18. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/src/pytailwindcss/utils.py +0 -0
  19. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/__init__.py +0 -0
  20. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/conftest.py +0 -0
  21. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/fakes.py +0 -0
  22. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/test_core.py +0 -0
  23. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/test_installation.py +0 -0
  24. {pytailwindcss-0.4.0 → pytailwindcss-0.4.2}/tests/test_utils.py +0 -0
@@ -144,3 +144,4 @@ src/pytailwindcss/bin
144
144
  .history
145
145
 
146
146
  _devcontext/
147
+ *.tape
@@ -3,6 +3,7 @@ repos:
3
3
  rev: v6.0.0
4
4
  hooks:
5
5
  - id: check-added-large-files
6
+ exclude: ^assets/.*\.gif$ # README demo, deliberately committed
6
7
  - id: check-ast
7
8
  - id: check-case-conflict
8
9
  - id: check-json
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2 (2026-10-13)
4
+
5
+ ### Changed
6
+
7
+ - README shows a captioned demo of the "Get started" steps.
8
+
9
+ ## 0.4.1 (2026-10-13)
10
+
11
+ ### Fixed
12
+
13
+ - Pressing Ctrl+C in `tailwindcss` (e.g. to stop `--watch`) or `tailwindcss_install` no longer prints a Python `KeyboardInterrupt` traceback; the command exits with status 130.
14
+
3
15
  ## 0.4.0 (2026-10-13)
4
16
 
5
17
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pytailwindcss
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js.
5
5
  Project-URL: Changelog, https://github.com/timonweb/pytailwindcss/blob/main/CHANGELOG.md
6
6
  Project-URL: Homepage, https://github.com/timonweb/pytailwindcss
@@ -55,6 +55,8 @@ Voilà!
55
55
 
56
56
  ## Get started
57
57
 
58
+ ![Installing pytailwindcss, then watching and building CSS with the tailwindcss command](https://raw.githubusercontent.com/timonweb/pytailwindcss/main/assets/get-started.gif)
59
+
58
60
  1. Install `pytailwindcss` via `pip` (or `uv add pytailwindcss`):
59
61
 
60
62
  ```bash
@@ -28,6 +28,8 @@ Voilà!
28
28
 
29
29
  ## Get started
30
30
 
31
+ ![Installing pytailwindcss, then watching and building CSS with the tailwindcss command](https://raw.githubusercontent.com/timonweb/pytailwindcss/main/assets/get-started.gif)
32
+
31
33
  1. Install `pytailwindcss` via `pip` (or `uv add pytailwindcss`):
32
34
 
33
35
  ```bash
@@ -4,7 +4,7 @@ requires = [ "hatchling>=1.27" ]
4
4
 
5
5
  [project]
6
6
  name = "pytailwindcss"
7
- version = "0.4.0"
7
+ version = "0.4.2"
8
8
  description = "Standalone Tailwind CSS CLI, installable via pip. Use Tailwind CSS without Node.js."
9
9
  readme = "README.md"
10
10
  keywords = [ "cli", "css", "tailwind" ]
@@ -45,6 +45,7 @@ dev = [
45
45
 
46
46
  [tool.hatch]
47
47
  build.targets.wheel.packages = [ "src/pytailwindcss" ]
48
+ build.targets.sdist.exclude = [ "assets" ]
48
49
 
49
50
  [tool.ruff]
50
51
  line-length = 119
@@ -6,12 +6,17 @@ from typing import cast
6
6
  import pytailwindcss
7
7
  from pytailwindcss.exceptions import PyTailwindCssException
8
8
 
9
+ # Shell convention for "terminated by Ctrl+C" (128 + SIGINT).
10
+ INTERRUPTED_EXIT_CODE = 130
11
+
9
12
 
10
13
  def install() -> None:
11
14
  try:
12
15
  pytailwindcss.install(os.environ.get("TAILWINDCSS_VERSION", "latest"))
13
16
  except PyTailwindCssException as err:
14
17
  sys.exit(f"tailwindcss_install: {err}")
18
+ except KeyboardInterrupt:
19
+ sys.exit(INTERRUPTED_EXIT_CODE)
15
20
 
16
21
 
17
22
  def main() -> None:
@@ -19,6 +24,10 @@ def main() -> None:
19
24
  completed_process = pytailwindcss.run(sys.argv[1:], env=os.environ.copy(), live_output=True, auto_install=True)
20
25
  except PyTailwindCssException as err:
21
26
  sys.exit(f"tailwindcss: {err}")
27
+ except KeyboardInterrupt:
28
+ # Ctrl+C reaches the whole process group, so tailwindcss gets it too and stops by itself
29
+ # (e.g. ending --watch); only the waiting Python process needs to exit quietly.
30
+ sys.exit(INTERRUPTED_EXIT_CODE)
22
31
  # live_output=True always returns the CompletedProcess.
23
32
  sys.exit(cast(subprocess.CompletedProcess[bytes], completed_process).returncode)
24
33
 
@@ -69,3 +69,28 @@ def test_install_reports_errors_without_traceback(monkeypatch: pytest.MonkeyPatc
69
69
  __main__.install()
70
70
 
71
71
  assert exc_info.value.code == "tailwindcss_install: no network"
72
+
73
+
74
+ def test_main_exits_quietly_on_ctrl_c(monkeypatch: pytest.MonkeyPatch) -> None:
75
+ def interrupted_run(*args: object, **kwargs: object) -> None:
76
+ raise KeyboardInterrupt
77
+
78
+ monkeypatch.setattr(pytailwindcss, "run", interrupted_run)
79
+ monkeypatch.setattr(__main__.sys, "argv", ["tailwindcss", "--watch"])
80
+
81
+ with pytest.raises(SystemExit) as exc_info:
82
+ __main__.main()
83
+
84
+ assert exc_info.value.code == 130
85
+
86
+
87
+ def test_install_exits_quietly_on_ctrl_c(monkeypatch: pytest.MonkeyPatch) -> None:
88
+ def interrupted_install(version: str | None = None) -> None:
89
+ raise KeyboardInterrupt
90
+
91
+ monkeypatch.setattr(pytailwindcss, "install", interrupted_install)
92
+
93
+ with pytest.raises(SystemExit) as exc_info:
94
+ __main__.install()
95
+
96
+ assert exc_info.value.code == 130
@@ -500,7 +500,7 @@ wheels = [
500
500
 
501
501
  [[package]]
502
502
  name = "pytailwindcss"
503
- version = "0.4.0"
503
+ version = "0.4.2"
504
504
  source = { editable = "." }
505
505
 
506
506
  [package.dev-dependencies]
File without changes