From 6d3ef2c4f81c08a1f328c402e830a7a225b4c125 Mon Sep 17 00:00:00 2001 From: ArnauBN <117755502+ArnauBN@users.noreply.github.com> Date: Sun, 20 Jul 2025 17:47:35 +0200 Subject: [PATCH 1/4] pyproject --- README.md | 5 +++++ pyproject.toml | 29 ++++++++++++++++++++++++++ requirements.txt | Bin 296 -> 318 bytes src/{ => cpp_fqn_parser}/__init__.py | 4 +++- src/{ => cpp_fqn_parser}/fqn.py | 0 src/{ => cpp_fqn_parser}/parser.py | 0 src/{ => cpp_fqn_parser}/scope.py | 0 src/{ => cpp_fqn_parser}/token.py | 0 src/{ => cpp_fqn_parser}/tokenizer.py | 0 tests/conftest.py | 4 +--- tests/test_parser.py | 3 +-- tests/test_tokenizer.py | 3 +-- 12 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 pyproject.toml rename src/{ => cpp_fqn_parser}/__init__.py (85%) rename src/{ => cpp_fqn_parser}/fqn.py (100%) rename src/{ => cpp_fqn_parser}/parser.py (100%) rename src/{ => cpp_fqn_parser}/scope.py (100%) rename src/{ => cpp_fqn_parser}/token.py (100%) rename src/{ => cpp_fqn_parser}/tokenizer.py (100%) diff --git a/README.md b/README.md index 1556643..3be9b05 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,8 @@ Scope(name='one_3hello0', template=None) Scope(name='tconstwo', template='') ``` + +## Installation +```commandline +pip install git+https://github.com/Cliper27/cpp_fqn_parser.git +``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..87117fc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "cpp_fqn_parser" +version = "0.1.0" +description = "C++ FQN parser and tokenizer" +readme = "README.md" +license = { file = "LICENSE" } +authors = [{ name="Cliper27" }] +requires-python = ">=3.10" +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] + +[project.urls] +Homepage = "https://github.com/Cliper27/cpp_fqn_parser" diff --git a/requirements.txt b/requirements.txt index 2285d4886767c4d2e824cbf8075b98dbcc887109..73e7241e57df24ca09f20b1f123e2eeb4615752e 100644 GIT binary patch delta 30 icmZ3%w2x_n2BTOBLq0 None: diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py index 54ac3bd..431df04 100644 --- a/tests/test_tokenizer.py +++ b/tests/test_tokenizer.py @@ -1,7 +1,6 @@ from typing import List -from src.tokenizer import Tokenizer -from src.token import Token +from src.cpp_fqn_parser import Tokenizer, Token def test_simple_fqn(simple_fqn_input: str, simple_tokenizer_expected: List[Token]) -> None: From d1f677a156589303cef377880e80cced096a8417 Mon Sep 17 00:00:00 2001 From: Cliper27 Date: Sun, 20 Jul 2025 17:50:36 +0200 Subject: [PATCH 2/4] Update mypy.yaml --- .github/workflows/mypy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index df7ca32..c777924 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -24,4 +24,4 @@ jobs: pip install -r requirements.txt - name: Run mypy - run: mypy . + run: mypy .\src\cpp_fqn_parser\ From 611174c9297fc79366f2860b63bee02ee07b026d Mon Sep 17 00:00:00 2001 From: Cliper27 Date: Sun, 20 Jul 2025 17:53:38 +0200 Subject: [PATCH 3/4] Update mypy.yaml --- .github/workflows/mypy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index c777924..7527e93 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -24,4 +24,4 @@ jobs: pip install -r requirements.txt - name: Run mypy - run: mypy .\src\cpp_fqn_parser\ + run: mypy src\cpp_fqn_parser From 6fe1d1ffdc7190ac94cd4c7a744d610828bc4404 Mon Sep 17 00:00:00 2001 From: Cliper27 Date: Sun, 20 Jul 2025 17:55:54 +0200 Subject: [PATCH 4/4] Update mypy.yaml --- .github/workflows/mypy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index 7527e93..865f829 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -24,4 +24,4 @@ jobs: pip install -r requirements.txt - name: Run mypy - run: mypy src\cpp_fqn_parser + run: mypy src/cpp_fqn_parser