MCPcopy Create free account
hub / github.com/M4THYOU/TokenDagger / build_tiktoken_lib

Function build_tiktoken_lib

build_tokendagger.py:11–24  ·  view source on GitHub ↗

Build the tiktoken static library.

()

Source from the content-addressed store, hash-verified

9from pathlib import Path
10
11def build_tiktoken_lib():
12 """Build the tiktoken static library."""
13 try:
14 subprocess.check_call(["make", "-C", "src/tiktoken"],
15 stdout=subprocess.PIPE,
16 stderr=subprocess.PIPE)
17 print("✓ tiktoken library built successfully")
18 return True
19 except subprocess.CalledProcessError as e:
20 print(f"✗ Failed to build tiktoken library: {e}")
21 return False
22 except FileNotFoundError:
23 print("✗ make command not found. Please install build tools.")
24 return False
25
26def main():
27 """Main build function."""

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected