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 *.pyo
# Cache # Cache
__pycache__/ **/__pycache__/
*.egg-info/ **/*.egg-info/
.pytest_cache/ **/.pytest_cache/
.coverage .coverage
.htmlcov/ .htmlcov/
@@ -21,4 +21,4 @@ dist/
build/ build/
# Generated test files # Generated test files
tests/test.py tests/*.py

View File

@@ -5,9 +5,15 @@ description = "Tamil code compiler"
requires-python = ">=3.9" requires-python = ">=3.9"
dependencies = [] dependencies = []
[project.scripts] [project.gui-scripts]
tampy = "tampy.cli:main" tampy = "tampy.cli:main"
[build-system] [build-system]
requires = ["hatchling"] requires = ["hatchling"]
build-backend = "hatchling.build" 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 import sys
from pathlib import Path from pathlib import Path
from src.tampy.transpiler import SimpleTranspiler from .transpiler import SimpleTranspiler
from src.tampy.keywords import load_keywords from .keywords import load_keywords
def main(): def main():

View File

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

2
uv.lock generated
View File

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