prepare for publication
parent
91db9145be
commit
4b45acd0b6
|
@ -3,3 +3,4 @@ __pycache__/
|
|||
build/
|
||||
dist/
|
||||
*.egg-info/
|
||||
py-xbc-*/
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
include tests/*.xbc
|
|
@ -68,5 +68,5 @@ foo { bar.fluff = 1 }
|
|||
|
||||
# Licence
|
||||
|
||||
`py-xbc` is published under the MIT license. See `LICENSE` for more
|
||||
`py-xbc` is published under the MIT license. See `LICENSE.txt` for more
|
||||
information.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = 'py-xbc'
|
||||
version = '0.1.0'
|
||||
dynamic = ['version']
|
||||
authors = [
|
||||
{ name = 'Síle Ekaterin Liszka', email = 'sheila@vulpine.house' }
|
||||
]
|
||||
|
@ -35,6 +35,9 @@ Issues = 'https://gitea.treehouse.systems/VulpineAmethyst/py-xbc/issues'
|
|||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "xbc.version.version"}
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
addopts = [
|
||||
"--import-mode=importlib",
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
here = pathlib.Path(__file__).parent.resolve()
|
||||
src = here / 'src'
|
||||
|
||||
sys.path.append(src.as_posix())
|
||||
|
||||
from xbc.version import version
|
||||
|
||||
long_description = (here / "README.md").read_text(encoding="utf-8")
|
||||
|
||||
setup(
|
||||
name='py-xbc',
|
||||
version=version,
|
||||
description='A library for manipulating eXtra Boot Configuration (XBC) files',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
url='https://gitea.treehouse.systems/VulpineAmethyst/py-xbc',
|
||||
author='Síle Ekaterin Liszka',
|
||||
author_email='sheila@vulpine.house',
|
||||
keywords='xbc, configuration, bootconfig',
|
||||
package_dir={'': 'src'},
|
||||
packages=find_packages(where='src'),
|
||||
python_requires='>=3.7, <4',
|
||||
install_requires=['pyparsing'],
|
||||
extras_require={
|
||||
'test': ['pytest'],
|
||||
},
|
||||
project_urls={
|
||||
'Bug Reports': 'https://gitea.treehouse.systems/VulpineAmethyst/py-xbc/issues',
|
||||
'Source': 'https://gitea.treehouse.systems/VulpineAmethyst/py-xbc',
|
||||
}
|
||||
)
|
|
@ -19,33 +19,6 @@
|
|||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
"""
|
||||
This module provides utilities for reading and writing files in the
|
||||
Linux kernel's bootconfig format. This is not a strictly-conformant
|
||||
implementation. In particular, this implementation does not restrict
|
||||
key/block depths and makes no attempt whatsoever to ensure output is
|
||||
under 32,767 bytes as mandated by the Linux kernel implementation.
|
||||
|
||||
XBC has three types of configuration:
|
||||
|
||||
- Keys are sequences of one or more characters in the range
|
||||
`[a-zA-Z0-9_-]`, namespaced with dots. They can be specified without a
|
||||
value, allowing their presence to be a boolean.
|
||||
- Key/value pairs have a key component, an operator, and one or more
|
||||
values. Values have three flavours:
|
||||
- Bare values are sequences of one or more characters that are not in
|
||||
the range `{}#=+:;,\\n'" `.
|
||||
- Quoted strings are bounded by either single or double quotes, and
|
||||
cannot contain the quote being bounded. Escaped quotes (`\\'` and
|
||||
`\\"`) are not supported.
|
||||
- Arrays are bare values or strings delimited by commas.
|
||||
- Blocks have a key component and a sequence of keys, key/value pairs,
|
||||
or blocks. Keys within blocks are not mapped separately; `a.a` is
|
||||
identical to `a { a }`, for example.
|
||||
|
||||
XBC supports single-line comments using the pound sign (`#`).
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
@ -68,6 +41,7 @@ from pyparsing import (
|
|||
)
|
||||
|
||||
from .utils import normalise
|
||||
from .version import version as __version__
|
||||
|
||||
class Node:
|
||||
def __init__(self, *args, type=None):
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
version = '0.1.0'
|
Loading…
Reference in New Issue