finished beta version
Some checks failed
Pack Validation CI / validate (pull_request) Has been cancelled

This commit is contained in:
2026-06-13 11:04:21 -05:00
parent 5adfbbfe12
commit e34a08a5ba
3 changed files with 125 additions and 132 deletions

View File

@@ -0,0 +1,29 @@
from importlib.resources import files
from importlib.metadata import version, metadata, PackageNotFoundError
try:
package_name = (__package__ or "").replace("_", "-")
__version__ = version(package_name)
pkg_metadata = metadata(package_name)
# 1. Grab names from BOTH possible fields (Author and Author-email)
raw_authors = pkg_metadata.get_all("Author") or []
raw_emails = pkg_metadata.get_all("Author-email") or []
# 2. Combine them into one single, clean list of unique names
combined = []
for item in (raw_authors + raw_emails):
clean_name = item.split("<")[0].strip()
if clean_name and clean_name not in combined:
combined.append(clean_name)
__authors__ = combined
except PackageNotFoundError:
__version__ = "0.0.0"
__authors__ = []
def get_pack_path():
# TODO: Modify this path
return files(__name__) / "template.json"