Improvements in packaging.

The ziffers.lark file is not included in the installed package. This was
preventing users from importing the ziffers package from elsewhere.
This commit is contained in:
2023-02-16 07:39:51 +01:00
parent 1ff7e3b6d2
commit 0816ac65db
6 changed files with 24 additions and 4 deletions

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include ziffers/*
include ziffers/spec/*
global-include *.lark

View File

@ -28,6 +28,21 @@ documentation = "https://github.com/Bubobubobubobubo/ziffers-python"
repository = "https://github.com/Bubobubobubobubo/ziffers-python"
[tool.black]
line-length = 88
target_version = ['py310']
target_version = ['py311']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''

View File

@ -5,3 +5,4 @@ from .common import *
from .defaults import *
from .scale import *
from .converters import *
from .spec import *

View File

@ -6,10 +6,11 @@ from .mapper import ZiffersTransformer
grammar_path = Path(__file__).parent
grammar = grammar_path / "ziffers.lark"
grammar_folder = Path.joinpath(grammar_path, "spec")
grammar_file = Path.joinpath(grammar_folder, "ziffers.lark")
ziffers_parser = Lark.open(
grammar,
str(grammar_file),
rel_to=__file__,
start="root",
parser="lalr",

0
ziffers/spec/__init__.py Normal file
View File