whitecircle-ai 0.0.1__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,16 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: whitecircle-ai
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Reserved by White Circle (whitecircle.com). Not installable.
|
|
5
|
+
Author: White Circle
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://whitecircle.com
|
|
8
|
+
Project-URL: Official packages, https://pypi.org/org/whitecircle/
|
|
9
|
+
Classifier: Development Status :: 7 - Inactive
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# whitecircle-ai
|
|
13
|
+
|
|
14
|
+
This name is reserved by [White Circle](https://whitecircle.com) to protect users from typosquatting. The package contains no code and cannot be installed.
|
|
15
|
+
|
|
16
|
+
Official White Circle packages: https://pypi.org/org/whitecircle/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Build backend for a reserved PyPI name.
|
|
2
|
+
|
|
3
|
+
Building an sdist works, so the name can be published. Any attempt to build
|
|
4
|
+
a wheel, which is what `pip install` / `uv add` do, exits with an explanation.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import io
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
import tarfile
|
|
11
|
+
|
|
12
|
+
NAME = "whitecircle-ai"
|
|
13
|
+
VERSION = "0.0.1"
|
|
14
|
+
|
|
15
|
+
MESSAGE = (
|
|
16
|
+
f"\n'{NAME}' is a name reserved by White Circle to prevent typosquatting.\n"
|
|
17
|
+
"It contains no code and cannot be installed.\n"
|
|
18
|
+
"Official White Circle packages: https://pypi.org/org/whitecircle/\n"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _refuse(*_args, **_kwargs):
|
|
23
|
+
sys.stderr.write(MESSAGE)
|
|
24
|
+
raise SystemExit(1)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
get_requires_for_build_wheel = _refuse
|
|
28
|
+
prepare_metadata_for_build_wheel = _refuse
|
|
29
|
+
build_wheel = _refuse
|
|
30
|
+
get_requires_for_build_editable = _refuse
|
|
31
|
+
prepare_metadata_for_build_editable = _refuse
|
|
32
|
+
build_editable = _refuse
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def get_requires_for_build_sdist(config_settings=None):
|
|
36
|
+
return []
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _pkg_info():
|
|
40
|
+
with open("README.md", encoding="utf-8") as f:
|
|
41
|
+
readme = f.read()
|
|
42
|
+
return (
|
|
43
|
+
"Metadata-Version: 2.1\n"
|
|
44
|
+
f"Name: {NAME}\n"
|
|
45
|
+
f"Version: {VERSION}\n"
|
|
46
|
+
"Summary: Reserved by White Circle (whitecircle.com). Not installable.\n"
|
|
47
|
+
"Author: White Circle\n"
|
|
48
|
+
"License: MIT\n"
|
|
49
|
+
"Project-URL: Homepage, https://whitecircle.com\n"
|
|
50
|
+
"Project-URL: Official packages, https://pypi.org/org/whitecircle/\n"
|
|
51
|
+
"Classifier: Development Status :: 7 - Inactive\n"
|
|
52
|
+
"Description-Content-Type: text/markdown\n"
|
|
53
|
+
"\n" + readme
|
|
54
|
+
).encode()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def build_sdist(sdist_directory, config_settings=None):
|
|
58
|
+
base = f"{NAME.replace('-', '_')}-{VERSION}"
|
|
59
|
+
filename = f"{base}.tar.gz"
|
|
60
|
+
files = {
|
|
61
|
+
"PKG-INFO": _pkg_info(),
|
|
62
|
+
"pyproject.toml": open("pyproject.toml", "rb").read(),
|
|
63
|
+
"README.md": open("README.md", "rb").read(),
|
|
64
|
+
"_placeholder_backend.py": open(__file__, "rb").read(),
|
|
65
|
+
}
|
|
66
|
+
with tarfile.open(os.path.join(sdist_directory, filename), "w:gz", format=tarfile.PAX_FORMAT) as tar:
|
|
67
|
+
for path, data in files.items():
|
|
68
|
+
info = tarfile.TarInfo(f"{base}/{path}")
|
|
69
|
+
info.size = len(data)
|
|
70
|
+
info.mode = 0o644
|
|
71
|
+
info.mtime = 0
|
|
72
|
+
tar.addfile(info, io.BytesIO(data))
|
|
73
|
+
return filename
|