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:
3
MANIFEST.in
Normal file
3
MANIFEST.in
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include ziffers/*
|
||||||
|
include ziffers/spec/*
|
||||||
|
global-include *.lark
|
||||||
@ -28,6 +28,21 @@ documentation = "https://github.com/Bubobubobubobubo/ziffers-python"
|
|||||||
repository = "https://github.com/Bubobubobubobubo/ziffers-python"
|
repository = "https://github.com/Bubobubobubobubo/ziffers-python"
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 88
|
target_version = ['py311']
|
||||||
target_version = ['py310']
|
|
||||||
include = '\.pyi?$'
|
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
|
||||||
|
)/
|
||||||
|
)
|
||||||
|
'''
|
||||||
|
|||||||
@ -5,3 +5,4 @@ from .common import *
|
|||||||
from .defaults import *
|
from .defaults import *
|
||||||
from .scale import *
|
from .scale import *
|
||||||
from .converters import *
|
from .converters import *
|
||||||
|
from .spec import *
|
||||||
|
|||||||
@ -6,10 +6,11 @@ from .mapper import ZiffersTransformer
|
|||||||
|
|
||||||
|
|
||||||
grammar_path = Path(__file__).parent
|
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(
|
ziffers_parser = Lark.open(
|
||||||
grammar,
|
str(grammar_file),
|
||||||
rel_to=__file__,
|
rel_to=__file__,
|
||||||
start="root",
|
start="root",
|
||||||
parser="lalr",
|
parser="lalr",
|
||||||
|
|||||||
0
ziffers/spec/__init__.py
Normal file
0
ziffers/spec/__init__.py
Normal file
Reference in New Issue
Block a user