POC
This commit is contained in:
parent
16f964f41d
commit
3bb4ee9def
14 changed files with 219 additions and 7 deletions
3
smal/README
Normal file
3
smal/README
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
Simple Matrix Application Library
|
||||
=================================
|
||||
30
smal/pyproject.toml
Normal file
30
smal/pyproject.toml
Normal 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"
|
||||
1
smal/src/pygomx/mxutils/__init__.py
Normal file
1
smal/src/pygomx/mxutils/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .discoverhs import discoverhs
|
||||
16
smal/src/pygomx/mxutils/discoverhs.py
Normal file
16
smal/src/pygomx/mxutils/discoverhs.py
Normal 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)
|
||||
0
smal/src/smal/__init__.py
Normal file
0
smal/src/smal/__init__.py
Normal file
0
smal/src/smbl/__init__.py
Normal file
0
smal/src/smbl/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue