Index: html/flit.html
==================================================================
--- html/flit.html
+++ html/flit.html
@@ -35,15 +35,27 @@
def inject(where)
+
+def make_metadata(module, ini_info)
+
+
+@inject different sourcing order to apply plugin meta fields
+
def pmd_meta(pmd, ini)
-enjoin PMD fields with flit meta data
+enjoin PMD fields with flit.common.MetaData
+
+
+def read_flit_config(path)
+
+
+@inject read_flit_config() with forced dynamic fields
@@ -60,11 +72,13 @@
Index: pluginconf/flit.py
==================================================================
--- pluginconf/flit.py
+++ pluginconf/flit.py
@@ -48,15 +48,17 @@
#-- patchy patch
def inject(where):
""" monkeypatch into module """
def wrapped(func):
setattr(where, func.__name__, func)
+ wrapped.__doc__ = func.__doc__
+ return func
return wrapped
@inject(flit_core.config)
def read_flit_config(path):
- """ read_flit_config() with preset dynamic fields """
+ """ @inject read_flit_config() with forced dynamic fields """
ini = flit_core.config.tomli.loads(path.read_text('utf-8'))
# make fields dynamic
if not "dynamic" in ini["project"]:
ini["project"]["dynamic"] = []
@@ -71,11 +73,11 @@
return flit_core.config.prep_toml_config(ini, path)
# override make_metadata
@inject(flit_core.common)
def make_metadata(module, ini_info):
- """ different order, and obviously sources """
+ """ @inject different sourcing order to apply plugin meta fields """
meta = {
"name": module.name,
"provides": [module.name]
}
meta.update(ini_info.metadata)
@@ -91,11 +93,11 @@
)
return flit_core.common.Metadata(meta)
# map plugin meta to flit Metadata
def pmd_meta(pmd, ini):
- """ enjoin PMD fields with flit meta data """
+ """ enjoin PMD fields with flit.common.MetaData """
pmd = psetup.MetaUtils(pmd)
meta = {
"summary": pmd.description,
"version": pmd.version,
"home_page": pmd.url,
@@ -119,10 +121,11 @@
"obsoletes_dist": (),
"requires_external": (),
"provides_extra": (),
}
print(meta)
+ print(pmd.install_requires())
# comment/readme
for docs in pmd.plugin_doc(), psetup.get_readme():
if docs["long_description"]:
meta.update({ # with "long_" prefix cut off