pycxxfilt 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycxxfilt-0.1.0/.clang-format +9 -0
- pycxxfilt-0.1.0/.github/dependabot.yml +15 -0
- pycxxfilt-0.1.0/.github/workflows/build.yml +136 -0
- pycxxfilt-0.1.0/.github/workflows/ci.yml +123 -0
- pycxxfilt-0.1.0/.github/workflows/codeql.yml +44 -0
- pycxxfilt-0.1.0/.github/workflows/scorecard.yml +37 -0
- pycxxfilt-0.1.0/.gitignore +62 -0
- pycxxfilt-0.1.0/AGENT.md +35 -0
- pycxxfilt-0.1.0/DEVELOPMENT.md +80 -0
- pycxxfilt-0.1.0/LICENSE +202 -0
- pycxxfilt-0.1.0/LICENSE.llvm +279 -0
- pycxxfilt-0.1.0/MANIFEST.in +28 -0
- pycxxfilt-0.1.0/PKG-INFO +102 -0
- pycxxfilt-0.1.0/README.md +72 -0
- pycxxfilt-0.1.0/SECURITY.md +24 -0
- pycxxfilt-0.1.0/meson.build +27 -0
- pycxxfilt-0.1.0/pyproject.toml +67 -0
- pycxxfilt-0.1.0/src/pycxxfilt/__init__.py +23 -0
- pycxxfilt-0.1.0/src/pycxxfilt/__main__.py +27 -0
- pycxxfilt-0.1.0/src/pycxxfilt/_cxxfilt.c +130 -0
- pycxxfilt-0.1.0/src/pycxxfilt/_cxxfilt.pyi +12 -0
- pycxxfilt-0.1.0/src/pycxxfilt/meson.build +23 -0
- pycxxfilt-0.1.0/src/pycxxfilt/py.typed +0 -0
- pycxxfilt-0.1.0/tests/conftest.py +87 -0
- pycxxfilt-0.1.0/tests/test_cli.py +79 -0
- pycxxfilt-0.1.0/tests/test_demangle.py +99 -0
- pycxxfilt-0.1.0/tox.ini +39 -0
- pycxxfilt-0.1.0/update-vendor.sh +44 -0
- pycxxfilt-0.1.0/vendor/.clang-format +1 -0
- pycxxfilt-0.1.0/vendor/DemangleTestCases.inc +30222 -0
- pycxxfilt-0.1.0/vendor/LLVM_TAG +1 -0
- pycxxfilt-0.1.0/vendor/__cxxabi_config.h +17 -0
- pycxxfilt-0.1.0/vendor/abort_message.h +37 -0
- pycxxfilt-0.1.0/vendor/cxa_demangle.cpp +408 -0
- pycxxfilt-0.1.0/vendor/demangle/DemangleConfig.h +122 -0
- pycxxfilt-0.1.0/vendor/demangle/ItaniumDemangle.h +6212 -0
- pycxxfilt-0.1.0/vendor/demangle/ItaniumNodes.def +104 -0
- pycxxfilt-0.1.0/vendor/demangle/README.txt +61 -0
- pycxxfilt-0.1.0/vendor/demangle/StringViewExtras.h +38 -0
- pycxxfilt-0.1.0/vendor/demangle/Utility.h +243 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# PEP 7 style for CPython extension modules
|
|
3
|
+
BasedOnStyle: LLVM
|
|
4
|
+
IndentWidth: 4
|
|
5
|
+
ColumnLimit: 79
|
|
6
|
+
BreakBeforeBraces: Linux
|
|
7
|
+
AlwaysBreakAfterReturnType: TopLevelDefinitions
|
|
8
|
+
AllowShortFunctionsOnASingleLine: None
|
|
9
|
+
UseTab: Never
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
version: 2
|
|
3
|
+
updates:
|
|
4
|
+
- package-ecosystem: github-actions
|
|
5
|
+
directory: /
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
groups:
|
|
9
|
+
actions:
|
|
10
|
+
patterns: ["*"]
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: pip
|
|
13
|
+
directory: /
|
|
14
|
+
schedule:
|
|
15
|
+
interval: weekly
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Build & Publish
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
pull_request:
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
sdist:
|
|
19
|
+
name: Build sdist
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
25
|
+
with:
|
|
26
|
+
persist-credentials: false
|
|
27
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
28
|
+
- name: Build sdist
|
|
29
|
+
run: uv build --sdist
|
|
30
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
31
|
+
with:
|
|
32
|
+
name: sdist
|
|
33
|
+
path: dist/*.tar.gz
|
|
34
|
+
|
|
35
|
+
wheels-linux:
|
|
36
|
+
name: Build Linux wheels (${{ matrix.arch }})
|
|
37
|
+
needs: sdist
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
arch: [x86_64, aarch64, ppc64le, s390x]
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
45
|
+
with:
|
|
46
|
+
name: sdist
|
|
47
|
+
path: dist
|
|
48
|
+
- name: Resolve sdist path
|
|
49
|
+
id: sdist
|
|
50
|
+
run: echo "path=$(ls dist/*.tar.gz)" >> "$GITHUB_OUTPUT"
|
|
51
|
+
shell: bash
|
|
52
|
+
- name: Set up QEMU
|
|
53
|
+
if: matrix.arch != 'x86_64'
|
|
54
|
+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
|
55
|
+
with:
|
|
56
|
+
platforms: linux/${{ matrix.arch }}
|
|
57
|
+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
|
|
58
|
+
with:
|
|
59
|
+
package-dir: ${{ steps.sdist.outputs.path }}
|
|
60
|
+
env:
|
|
61
|
+
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
|
|
62
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
63
|
+
with:
|
|
64
|
+
name: wheels-linux-${{ matrix.arch }}
|
|
65
|
+
path: wheelhouse/*.whl
|
|
66
|
+
|
|
67
|
+
wheels-macos:
|
|
68
|
+
name: Build macOS wheels (${{ matrix.arch }})
|
|
69
|
+
needs: sdist
|
|
70
|
+
runs-on: macos-latest
|
|
71
|
+
strategy:
|
|
72
|
+
fail-fast: false
|
|
73
|
+
matrix:
|
|
74
|
+
arch: [x86_64, arm64]
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
77
|
+
with:
|
|
78
|
+
name: sdist
|
|
79
|
+
path: dist
|
|
80
|
+
- name: Resolve sdist path
|
|
81
|
+
id: sdist
|
|
82
|
+
run: echo "path=$(ls dist/*.tar.gz)" >> "$GITHUB_OUTPUT"
|
|
83
|
+
shell: bash
|
|
84
|
+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
|
|
85
|
+
with:
|
|
86
|
+
package-dir: ${{ steps.sdist.outputs.path }}
|
|
87
|
+
env:
|
|
88
|
+
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
|
|
89
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
90
|
+
with:
|
|
91
|
+
name: wheels-macos-${{ matrix.arch }}
|
|
92
|
+
path: wheelhouse/*.whl
|
|
93
|
+
|
|
94
|
+
wheels-windows:
|
|
95
|
+
name: Build Windows wheels
|
|
96
|
+
needs: sdist
|
|
97
|
+
runs-on: windows-latest
|
|
98
|
+
steps:
|
|
99
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
100
|
+
with:
|
|
101
|
+
name: sdist
|
|
102
|
+
path: dist
|
|
103
|
+
- name: Resolve sdist path
|
|
104
|
+
id: sdist
|
|
105
|
+
run: echo "path=$(ls dist/*.tar.gz)" >> "$GITHUB_OUTPUT"
|
|
106
|
+
shell: bash
|
|
107
|
+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
|
108
|
+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
|
|
109
|
+
with:
|
|
110
|
+
package-dir: ${{ steps.sdist.outputs.path }}
|
|
111
|
+
env:
|
|
112
|
+
CIBW_ARCHS_WINDOWS: AMD64
|
|
113
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
114
|
+
with:
|
|
115
|
+
name: wheels-windows-AMD64
|
|
116
|
+
path: wheelhouse/*.whl
|
|
117
|
+
|
|
118
|
+
publish:
|
|
119
|
+
name: Publish to PyPI
|
|
120
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
121
|
+
needs: [sdist, wheels-linux, wheels-macos, wheels-windows]
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
environment: pypi
|
|
124
|
+
permissions:
|
|
125
|
+
id-token: write
|
|
126
|
+
attestations: write
|
|
127
|
+
contents: read
|
|
128
|
+
steps:
|
|
129
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
130
|
+
with:
|
|
131
|
+
path: dist
|
|
132
|
+
merge-multiple: true
|
|
133
|
+
- name: Publish to PyPI
|
|
134
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
135
|
+
with:
|
|
136
|
+
attestations: true
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build-package:
|
|
18
|
+
name: Build & verify package
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
22
|
+
with:
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
- uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0
|
|
25
|
+
with:
|
|
26
|
+
include-free-threaded: 'false'
|
|
27
|
+
|
|
28
|
+
lint:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
32
|
+
with:
|
|
33
|
+
persist-credentials: false
|
|
34
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
35
|
+
- run: uvx ruff check src/ tests/
|
|
36
|
+
- run: uvx ruff format --check src/ tests/
|
|
37
|
+
- run: clang-format --dry-run --Werror src/pycxxfilt/_cxxfilt.c
|
|
38
|
+
|
|
39
|
+
typecheck:
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
43
|
+
with:
|
|
44
|
+
persist-credentials: false
|
|
45
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
46
|
+
- run: uvx ty check src/
|
|
47
|
+
|
|
48
|
+
test-linux:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
strategy:
|
|
51
|
+
fail-fast: true
|
|
52
|
+
matrix:
|
|
53
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
56
|
+
with:
|
|
57
|
+
persist-credentials: false
|
|
58
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
59
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
60
|
+
with:
|
|
61
|
+
python-version: ${{ matrix.python-version }}
|
|
62
|
+
- name: Build and install
|
|
63
|
+
run: uv pip install --system ".[test]"
|
|
64
|
+
- name: Run tests
|
|
65
|
+
run: python -m pytest tests/ -q
|
|
66
|
+
|
|
67
|
+
test-linux-qemu:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
strategy:
|
|
70
|
+
fail-fast: true
|
|
71
|
+
matrix:
|
|
72
|
+
arch: [ppc64le, s390x]
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
75
|
+
with:
|
|
76
|
+
persist-credentials: false
|
|
77
|
+
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
|
78
|
+
with:
|
|
79
|
+
platforms: linux/${{ matrix.arch }}
|
|
80
|
+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
|
|
81
|
+
env:
|
|
82
|
+
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
|
|
83
|
+
CIBW_BUILD: cp314-manylinux*
|
|
84
|
+
CIBW_TEST_COMMAND: python -m pytest {project}/tests/ -q --ignore={project}/tests/test_demangle.py
|
|
85
|
+
|
|
86
|
+
test-macos:
|
|
87
|
+
runs-on: macos-latest
|
|
88
|
+
strategy:
|
|
89
|
+
fail-fast: true
|
|
90
|
+
matrix:
|
|
91
|
+
python-version: ["3.14"]
|
|
92
|
+
steps:
|
|
93
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
94
|
+
with:
|
|
95
|
+
persist-credentials: false
|
|
96
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
97
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
98
|
+
with:
|
|
99
|
+
python-version: ${{ matrix.python-version }}
|
|
100
|
+
- name: Build and install
|
|
101
|
+
run: uv pip install --system ".[test]"
|
|
102
|
+
- name: Run tests
|
|
103
|
+
run: python -m pytest tests/ -q
|
|
104
|
+
|
|
105
|
+
test-windows:
|
|
106
|
+
runs-on: windows-latest
|
|
107
|
+
strategy:
|
|
108
|
+
fail-fast: true
|
|
109
|
+
matrix:
|
|
110
|
+
python-version: ["3.14"]
|
|
111
|
+
steps:
|
|
112
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
113
|
+
with:
|
|
114
|
+
persist-credentials: false
|
|
115
|
+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
|
116
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
117
|
+
with:
|
|
118
|
+
python-version: ${{ matrix.python-version }}
|
|
119
|
+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
|
120
|
+
- name: Build and install
|
|
121
|
+
run: uv pip install --system ".[test]"
|
|
122
|
+
- name: Run tests
|
|
123
|
+
run: python -m pytest tests/ -q
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: CodeQL
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
pull_request:
|
|
8
|
+
schedule:
|
|
9
|
+
# Weekly on Sundays
|
|
10
|
+
- cron: "0 3 * * 0"
|
|
11
|
+
|
|
12
|
+
permissions: {}
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
analyze:
|
|
20
|
+
continue-on-error: true
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
security-events: write
|
|
24
|
+
contents: read
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
language: [python, c-cpp]
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
31
|
+
with:
|
|
32
|
+
persist-credentials: false
|
|
33
|
+
- uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
34
|
+
with:
|
|
35
|
+
languages: ${{ matrix.language }}
|
|
36
|
+
- if: matrix.language == 'c-cpp'
|
|
37
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.14"
|
|
40
|
+
- if: matrix.language == 'c-cpp'
|
|
41
|
+
run: pip install -v .
|
|
42
|
+
- uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
43
|
+
with:
|
|
44
|
+
category: "/language:${{ matrix.language }}"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
name: Scorecard
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
schedule:
|
|
8
|
+
# Weekly on Saturdays
|
|
9
|
+
- cron: "30 1 * * 6"
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
analysis:
|
|
15
|
+
continue-on-error: true
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
security-events: write
|
|
19
|
+
id-token: write
|
|
20
|
+
contents: read
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
26
|
+
with:
|
|
27
|
+
results_file: results.sarif
|
|
28
|
+
results_format: sarif
|
|
29
|
+
publish_results: true
|
|
30
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
31
|
+
with:
|
|
32
|
+
name: SARIF file
|
|
33
|
+
path: results.sarif
|
|
34
|
+
retention-days: 5
|
|
35
|
+
- uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
36
|
+
with:
|
|
37
|
+
sarif_file: results.sarif
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Claude Code
|
|
2
|
+
.claude/
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
*.dylib
|
|
12
|
+
*.pyd
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
build/
|
|
16
|
+
dist/
|
|
17
|
+
eggs/
|
|
18
|
+
*.egg-info/
|
|
19
|
+
*.egg
|
|
20
|
+
sdist/
|
|
21
|
+
wheels/
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
.venv/
|
|
25
|
+
venv/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# Install
|
|
29
|
+
*.install
|
|
30
|
+
|
|
31
|
+
# Meson
|
|
32
|
+
builddir/
|
|
33
|
+
subprojects/
|
|
34
|
+
|
|
35
|
+
# C/C++ objects and libraries
|
|
36
|
+
*.o
|
|
37
|
+
*.a
|
|
38
|
+
*.lib
|
|
39
|
+
*.obj
|
|
40
|
+
|
|
41
|
+
# IDE / editor
|
|
42
|
+
.vscode/
|
|
43
|
+
.idea/
|
|
44
|
+
*.swp
|
|
45
|
+
*.swo
|
|
46
|
+
*~
|
|
47
|
+
|
|
48
|
+
# OS
|
|
49
|
+
.DS_Store
|
|
50
|
+
Thumbs.db
|
|
51
|
+
|
|
52
|
+
# pytest
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
|
|
55
|
+
# Coverage
|
|
56
|
+
htmlcov/
|
|
57
|
+
.coverage
|
|
58
|
+
.coverage.*
|
|
59
|
+
coverage.xml
|
|
60
|
+
|
|
61
|
+
# mypy
|
|
62
|
+
.mypy_cache/
|
pycxxfilt-0.1.0/AGENT.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
|
|
3
|
+
# Agent instructions
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Use [uv](https://docs.astral.sh/uv/) to create a venv and install
|
|
8
|
+
dependencies:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
uv venv .venv && source .venv/bin/activate
|
|
12
|
+
uv pip install meson-python meson
|
|
13
|
+
uv pip install --no-build-isolation -e ".[test]"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Testing
|
|
17
|
+
|
|
18
|
+
Run the test suite with pytest:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
python -m pytest tests/ -q
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## tox
|
|
25
|
+
|
|
26
|
+
Use tox for the full CI matrix (lint, typecheck, tests across Python
|
|
27
|
+
versions):
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
tox run # all environments
|
|
31
|
+
tox run -e lint # ruff check + format check
|
|
32
|
+
tox run -e fix # ruff auto-fix + format
|
|
33
|
+
tox run -e typecheck # ty type checker
|
|
34
|
+
tox run -e py314 # tests with specific Python version
|
|
35
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
- C++20 compiler (GCC, Clang, or MSVC)
|
|
6
|
+
- Python 3.11+
|
|
7
|
+
- [uv](https://docs.astral.sh/uv/)
|
|
8
|
+
|
|
9
|
+
## Building from source
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
uv venv .venv && source .venv/bin/activate
|
|
13
|
+
uv pip install meson-python meson
|
|
14
|
+
uv pip install --no-build-isolation -e ".[test]"
|
|
15
|
+
python -m pytest tests/ -q
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## tox environments
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
tox run # all test envs + lint + typecheck
|
|
22
|
+
tox run -e lint # ruff check + format check
|
|
23
|
+
tox run -e fix # ruff auto-fix + format
|
|
24
|
+
tox run -e typecheck # ty type checker
|
|
25
|
+
tox run -e py314 # run tests with a specific Python version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Vendored LLVM sources
|
|
29
|
+
|
|
30
|
+
The Itanium demangler is vendored from LLVM's libcxxabi, release tag
|
|
31
|
+
**llvmorg-22.1.3**. The following files are copied from the LLVM source
|
|
32
|
+
tree:
|
|
33
|
+
|
|
34
|
+
| Local path | LLVM source |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `vendor/cxa_demangle.cpp` | `libcxxabi/src/cxa_demangle.cpp` |
|
|
37
|
+
| `vendor/demangle/DemangleConfig.h` | `libcxxabi/src/demangle/DemangleConfig.h` |
|
|
38
|
+
| `vendor/demangle/ItaniumDemangle.h` | `libcxxabi/src/demangle/ItaniumDemangle.h` |
|
|
39
|
+
| `vendor/demangle/ItaniumNodes.def` | `libcxxabi/src/demangle/ItaniumNodes.def` |
|
|
40
|
+
| `vendor/demangle/StringViewExtras.h` | `libcxxabi/src/demangle/StringViewExtras.h` |
|
|
41
|
+
| `vendor/demangle/Utility.h` | `libcxxabi/src/demangle/Utility.h` |
|
|
42
|
+
| `vendor/demangle/README.txt` | `libcxxabi/src/demangle/README.txt` |
|
|
43
|
+
| `vendor/DemangleTestCases.inc` | `libcxxabi/test/DemangleTestCases.inc` |
|
|
44
|
+
| `LICENSE.llvm` | `llvm/LICENSE.TXT` |
|
|
45
|
+
|
|
46
|
+
The update script patches `cxa_demangle.cpp` and `DemangleConfig.h` to
|
|
47
|
+
wrap all symbols in a `pycxxfilt` namespace.
|
|
48
|
+
|
|
49
|
+
Two **shim headers** provide the libcxxabi-internal symbols that the
|
|
50
|
+
original code depends on:
|
|
51
|
+
|
|
52
|
+
- `vendor/abort_message.h` -- replaces `libcxxabi/src/abort_message.h`
|
|
53
|
+
- `vendor/__cxxabi_config.h` -- replaces `libcxxabi/include/__cxxabi_config.h`
|
|
54
|
+
|
|
55
|
+
These shim files must be maintained manually if the upstream API changes.
|
|
56
|
+
|
|
57
|
+
### Updating to a newer LLVM release
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
./update-vendor.sh llvmorg-XX.Y.Z
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This downloads all files, applies namespace patches, and records the
|
|
64
|
+
tag. The shim headers are **not** overwritten. After updating, verify
|
|
65
|
+
that the shims are still compatible and run the test suite.
|
|
66
|
+
|
|
67
|
+
## Releasing
|
|
68
|
+
|
|
69
|
+
1. Update the version in `pyproject.toml` and `meson.build`.
|
|
70
|
+
2. Commit and tag: `git tag v0.1.0`
|
|
71
|
+
3. Push the tag: `git push origin v0.1.0`
|
|
72
|
+
4. The `build.yml` GitHub Actions workflow builds wheels and sdist, then
|
|
73
|
+
publishes to PyPI via trusted publishing.
|
|
74
|
+
|
|
75
|
+
PyPI trusted publishing must be configured once:
|
|
76
|
+
|
|
77
|
+
- Go to PyPI project settings → Publishing → Add a new publisher
|
|
78
|
+
- Repository: `tiran/pycxxfilt`
|
|
79
|
+
- Workflow: `build.yml`
|
|
80
|
+
- Environment: `pypi`
|