[sourcegen] Use hatchling

Co-authored-by: Bryan Weber <bryan.w.weber@gmail.com>
This commit is contained in:
Ingmar Schoegl
2025-05-26 16:11:39 -05:00
co-authored by Bryan Weber
parent 981aa43dce
commit 080f93ec7f
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
<GeneratedPath>$([MSBuild]::NormalizePath($(IntermediateOutputPath)/sourcegen/))</GeneratedPath>
</PropertyGroup>
<Exec Command="sourcegen --api=csharp --output=$(GeneratedPath) --root=../../.."
<Exec Command="python3 -m sourcegen --api=csharp --output=$(GeneratedPath) --root=../../.."
Condition="'$(GenerateInterop)' == 'true' Or !Exists('$(GeneratedPath)')"/>
<ItemGroup>
+3 -8
View File
@@ -1,10 +1,11 @@
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "sourcegen"
version = "3.2.0a2"
license-files = ["../../License.txt"]
description = "Source generator for creating Cantera interface code"
authors = [{name = "Cantera Developers"}]
requires-python = ">=3.10"
@@ -12,9 +13,3 @@ dependencies = ["jinja2"]
[project.scripts]
sourcegen = "sourcegen.api:main"
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.package-data]
"*" = ["*.yaml", "*.in"]
@@ -0,0 +1,9 @@
"""Module entry point for sourcegen."""
# This file is part of Cantera. See License.txt in the top-level directory or
# at https://cantera.org/license.txt for license and copyright information.
from .api import main
if __name__ == "__main__":
main()