irthomasthomas / llm-plugin-generator

LLM plugin to generate few-shot prompts for plugin creation
MIT License
0 stars 0 forks source link

Figure out packaging xml files for pypi #1

Open irthomasthomas opened 10 hours ago

irthomasthomas commented 10 hours ago

This plugin works great if you clone the repo and llm install -e . But when installed from pypi, it cannot find the xml files.

LLMs tell me to follow this pattern:

llm-plugin-generator/ ├── llm_plugin_generator/ │ ├── init.py │ ├── llm_plugin_generator.py │ ├── few_shot_prompt_llm_plugin_all.xml │ ├── few_shot_prompt_llm_plugin_model.xml │ ├── few_shot_prompt_llm_plugin_utility.xml ├── pyproject.toml ├── README.md

[project]
name = "llm-plugin-generator"
version = "0.1a"
description = "LLM plugin to generate few-shot prompts for plugin creation"
readme = "README.md"
authors = [{name = "llm-plugin-generator"}]
license = {text = "Apache-2.0"}
classifiers = [
    "License :: OSI Approved :: Apache Software License"
]
dependencies = [
    "llm",
    "click",
    "gitpython",
]

[tool.setuptools.package-data]
"llm_plugin_generator" = ["*.xml"]

[project.urls]
Homepage = "https://github.com/irthomasthomas/llm-plugin-generator"
Changelog = "https://github.com/irthomasthomas/llm-plugin-generator/releases"
Issues = "https://github.com/irthomasthomas/llm-plugin-generator/issues"

[project.entry-points.llm]
plugin-generator = "llm_plugin_generator"

[project.optional-dependencies]
test = ["pytest"]

[tool.pytest.ini_options]
addopts = "--assert=plain"
pythonpath = "."

This way the install succeeds, but the plugin does not show up in llm.

simonw commented 9 hours ago

I always get caught out by package data! Try this:

[tool.setuptools.package-data]
llm_plugin_generator = ["**/*.xml"]