mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
pyln.spec.bolt*: make these separate packages, so versions can change indep.
They're almost entirely autogenerated, and we use symlinks into the
top directory to reduce replication.
They can't be under pyln.spec.message, because a package can't also
be a namespace.
We also add fulltext and desc fields, and exclude our "gen" files from
flake8, since the spec quotes contain weird whitespace.
Changelog-Added: Python: pyln.spec.bolt{1,2,4,7} packages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
013eced4ce
commit
3882e8bdf7
20
contrib/pyln-spec/subinit.py
Normal file
20
contrib/pyln-spec/subinit.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# This is the same __init__.py for all bolt dirs.
|
||||
from .gen import csv, text, desc
|
||||
from .gen_version import __version__, __gitversion__
|
||||
from .bolt import namespace
|
||||
import sys
|
||||
|
||||
__all__ = [
|
||||
'csv',
|
||||
'text',
|
||||
'desc',
|
||||
'namespace',
|
||||
'__version__',
|
||||
'__gitversion__',
|
||||
]
|
||||
|
||||
mod = sys.modules[__name__]
|
||||
for d in namespace.subtypes, namespace.tlvtypes, namespace.messagetypes:
|
||||
for name in d:
|
||||
setattr(mod, name, d[name])
|
||||
__all__.append(name)
|
||||
Reference in New Issue
Block a user