fix: fix package imports and tests

This commit is contained in:
2026-05-03 13:07:17 -05:00
parent 25b652c052
commit 071acedcc0
6 changed files with 19 additions and 9 deletions

8
.gitignore vendored
View File

@@ -3,9 +3,9 @@
*.pyo
# Cache
__pycache__/
*.egg-info/
.pytest_cache/
**/__pycache__/
**/*.egg-info/
**/.pytest_cache/
.coverage
.htmlcov/
@@ -21,4 +21,4 @@ dist/
build/
# Generated test files
tests/test.py
tests/*.py

View File

@@ -5,9 +5,15 @@ description = "Tamil code compiler"
requires-python = ">=3.9"
dependencies = []
[project.scripts]
[project.gui-scripts]
tampy = "tampy.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/tampy"]
[tool.hatch.build.targets.sdist]
include = ["/src"]

2
pytest.ini Normal file
View File

@@ -0,0 +1,2 @@
[pytest]
pythonpath = src

View File

@@ -5,8 +5,8 @@ import subprocess
import sys
from pathlib import Path
from src.tampy.transpiler import SimpleTranspiler
from src.tampy.keywords import load_keywords
from .transpiler import SimpleTranspiler
from .keywords import load_keywords
def main():

View File

@@ -2,7 +2,9 @@
import ast
import pytest
from src.tampy.transpiler import SimpleTranspiler
import sys
sys.path.insert(0, "..")
from tampy.transpiler import SimpleTranspiler
def test_simple_transpile():

2
uv.lock generated
View File

@@ -5,4 +5,4 @@ requires-python = ">=3.9"
[[package]]
name = "tampy"
version = "0.1.0"
source = { virtual = "." }
source = { editable = "." }