This commit is contained in:
saces 2026-01-12 17:39:34 +01:00
parent 16f964f41d
commit 3bb4ee9def
14 changed files with 219 additions and 7 deletions

3
smal/README Normal file
View file

@ -0,0 +1,3 @@
Simple Matrix Application Library
=================================

30
smal/pyproject.toml Normal file
View file

@ -0,0 +1,30 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "smal"
version = "0.0.1"
requires-python = ">=3.11"
description = "smal - simple matrix application library"
authors = [{ name = "saces" }]
license = "AGPL-3.0-only"
readme = "README"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
]
[tool.setuptools.package-dir]
"pygomx" = "src/pygomx"
"smal" = "src/smal"
"smbl" = "src/smbl"
[project.urls]
repository = "https://code.c-base.org/saces/pygomx"
[tool.distutils.egg_info]
egg_base = "/tmp"
[project.scripts]
discoverhs = "pygomx.mxutils:discoverhs"

View file

@ -0,0 +1 @@
from .discoverhs import discoverhs

View file

@ -0,0 +1,16 @@
import sys
from _pygomx import lib, ffi
def discoverhs():
if len(sys.argv) != 2:
print("usage: ", sys.argv[0], " matrixid")
return 1
mxid = sys.argv[1].encode(encoding="utf-8")
print("try to discover from: ", mxid)
r = lib.discoverhs(mxid)
result = ffi.string(r)
print(result)

View file

View file