cwcwidth 0.1.12__tar.gz → 0.1.13__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.
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.13
4
+
5
+ * Build wheels with limited API on platforms where possible. Limited API support with freethreading still needs some work in [cython](https://github.com/cython/cython/issues/7399).
6
+ * Clean up build system and require `setuptools >= 77.0.3` for building.
7
+
3
8
  ## 0.1.12
4
9
 
5
10
  * Drop support for Python 3.10.
@@ -1,4 +1,4 @@
1
- Copyright (c) 2021-2025 Sebastian Ramacher
1
+ Copyright (c) 2021-2026 Sebastian Ramacher
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the ""Software""), to deal in
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cwcwidth
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: Python bindings for wc(s)width
5
- Home-page: https://github.com/sebastinas/cwcwidth
6
- Author: Sebastian Ramacher
7
- Author-email: sebastian@ramacher.at
8
- License: MIT
5
+ Author-email: Sebastian Ramacher <sebastian@ramacher.at>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/sebastinas/cwcwidth
9
8
  Classifier: Development Status :: 5 - Production/Stable
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Programming Language :: Python :: 3
@@ -26,13 +26,14 @@ module calls wcwidth(3) and wcswidth(3) provided by C library. On systems where
26
26
  these functions are not available, a compatible implementation is included in
27
27
  the module.
28
28
 
29
- This module provides the same interface as the wcwidth module.
29
+ For these two functions, this module provides the same interface as the wcwidth
30
+ module.
30
31
  """
31
32
 
32
- from ._impl import wcwidth, wcswidth
33
+ from ._impl import wcswidth, wcwidth
33
34
 
34
- __version__ = "0.1.12"
35
+ __version__ = "0.1.13"
35
36
  __author__ = "Sebastian Ramacher"
36
37
  __license__ = "Expat"
37
- __copyright__ = f"(C) 2021-2025 {__author__}"
38
- __all__ = ("wcwidth", "wcswidth")
38
+ __copyright__ = f"(C) 2021-2026 {__author__}"
39
+ __all__ = ("wcswidth", "wcwidth")
@@ -18,7 +18,5 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
19
  # SOFTWARE.
20
20
 
21
- from typing import Optional
22
-
23
21
  def wcwidth(wc: str) -> int: ...
24
- def wcswidth(pwcs: str, n: Optional[int] = None) -> int: ...
22
+ def wcswidth(pwcs: str, n: int | None = None) -> int: ...
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cwcwidth
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: Python bindings for wc(s)width
5
- Home-page: https://github.com/sebastinas/cwcwidth
6
- Author: Sebastian Ramacher
7
- Author-email: sebastian@ramacher.at
8
- License: MIT
5
+ Author-email: Sebastian Ramacher <sebastian@ramacher.at>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/sebastinas/cwcwidth
9
8
  Classifier: Development Status :: 5 - Production/Stable
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: Programming Language :: Python :: 3
@@ -3,10 +3,8 @@ LICENSE
3
3
  MANIFEST.in
4
4
  README.md
5
5
  pyproject.toml
6
- setup.cfg
7
6
  setup.py
8
7
  cwcwidth/__init__.py
9
- cwcwidth/_impl.c
10
8
  cwcwidth/_impl.pyi
11
9
  cwcwidth/_impl.pyx
12
10
  cwcwidth/py.typed
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools >= 77.0.3",
4
+ "Cython >= 3.1",
5
+ ]
6
+ build-backend = "setuptools.build_meta"
7
+
8
+ [project]
9
+ name = "cwcwidth"
10
+ version = "0.1.13"
11
+ description = "Python bindings for wc(s)width"
12
+ readme = "README.md"
13
+ requires-python = ">=3.11"
14
+ authors = [{ name = "Sebastian Ramacher", email = "sebastian@ramacher.at" }]
15
+ license = "MIT"
16
+ license-files = ["LICENSE"]
17
+ classifiers = [
18
+ "Development Status :: 5 - Production/Stable",
19
+ "Intended Audience :: Developers",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Software Development :: Libraries :: Python Modules",
22
+ ]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/sebastinas/cwcwidth"
26
+
27
+ [tool.setuptools]
28
+ zip-safe = false
29
+ include-package-data = false
30
+
31
+ [tool.cibuildwheel]
32
+ environment-pass = ["USE_LIMITED_API"]
33
+
34
+ [tool.ruff]
35
+ exclude = ["docs"]
36
+
37
+ [tool.ruff.lint]
38
+ ignore = ["EXE001"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -2,8 +2,8 @@
2
2
 
3
3
  import os
4
4
  import platform
5
- from setuptools import setup, Extension
6
5
 
6
+ from setuptools import Extension, setup
7
7
 
8
8
  use_limited_api = "USE_LIMITED_API" in os.environ
9
9
 
@@ -21,7 +21,8 @@
21
21
  import locale
22
22
  import sys
23
23
  import unittest
24
- from cwcwidth import wcwidth, wcswidth
24
+
25
+ from cwcwidth import wcswidth, wcwidth
25
26
 
26
27
  supports_utf8 = "UTF-8" in locale.getlocale()
27
28
  is_mac = sys.platform == "darwin"
@@ -48,7 +49,7 @@ class Tests(unittest.TestCase):
48
49
 
49
50
  def test_empty_string(self):
50
51
  """Width of an empty string is 0."""
51
- self._exec_test("", tuple())
52
+ self._exec_test("", ())
52
53
 
53
54
  def test_hello_world(self):
54
55
  """Width of English phrase: Hello World!"""