Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enrich class parse #2

Merged
merged 10 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/mac-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
run: |
pip install -U pip

- name: Install llvm-14
- name: Install llvm
run: |
brew update
brew install llvm

- name: Install
Expand All @@ -44,5 +45,5 @@ jobs:
run: |
pytest
env:
CPPYGEN_COMPILE_FLAGS: -isystem/usr/local/opt/llvm/lib/clang/15.0.7/include
CPPYGEN_COMPILE_FLAGS: -nostdinc -isystem/usr/local/opt/llvm/bin/../include/c++/v1 -isystem/usr/local/opt/llvm/lib/clang/17/include -isystem/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include
CPPYGEN_LIBCLANG_PATH: /usr/local/opt/llvm/lib/libclang.dylib
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ jobs:
run: |
pip install -U pip

- name: Install llvm-14 and llvm-15
- name: Install llvm-15 and llvm-16
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14 all
sudo ./llvm.sh 15 all
sudo ./llvm.sh 16 all
sudo apt install clang-15 llvm-15 llvm-15-dev libclang-15-dev

- name: Install
run: |
pip install .

- name: Tests (llvm-14)
- name: Tests (llvm-15)
run: |
pytest
env:
CPPYGEN_LIBCLANG_PATH: /usr/lib/llvm-14/lib/libclang.so
CPPYGEN_LIBCLANG_PATH: /usr/lib/llvm-15/lib/libclang.so

- name: Tests (llvm-15)
- name: Tests (llvm-16)
run: |
pytest
env:
CPPYGEN_LIBCLANG_PATH: /usr/lib/llvm-15/lib/libclang.so
CPPYGEN_LIBCLANG_PATH: /usr/lib/llvm-16/lib/libclang.so
3 changes: 3 additions & 0 deletions cppygen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ def run():
for i in headers:
cppygen.parse_from_file(i, lang="hpp", flags=configs.get("flags", []))
else:
with_diagnostic = configs.get("diagnostic", False)
cppygen.parse(
source="\n".join([f"#include<{i}>" for i in headers]),
filename="tmp.hpp",
lang="hpp",
with_diagnostic=with_diagnostic,
flags=flags,
mode="header",
)

Expand Down
7 changes: 3 additions & 4 deletions cppygen/_clang/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#===- __init__.py - Clang Python Bindings --------------------*- python -*--===#
# ===- __init__.py - Clang Python Bindings --------------------*- python -*--===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------------------------------------------------------------------===#
# ===------------------------------------------------------------------------===#

r"""
Clang Library Bindings
Expand All @@ -19,5 +19,4 @@
Bindings for the Clang indexing library.
"""

__all__ = ['cindex']

__all__ = ["cindex"]
Loading