Skip to content

Commit 46e45ee

Browse files
authored
Merge branch 'master' into python-perf-prep
2 parents 8997df5 + 7350c36 commit 46e45ee

File tree

9 files changed

+18
-227
lines changed

9 files changed

+18
-227
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -500,23 +500,21 @@ jobs:
500500
sh phpUnionVectorTest.sh
501501
502502
build-swift:
503-
name: Test Swift
503+
name: Test Swift Linux
504504
strategy:
505505
matrix:
506506
swift: ["5.10", "6.1", "6.2"]
507507
# Only 22.04 has swift at the moment https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L30
508508
runs-on: ubuntu-22.04
509509
steps:
510510
- uses: actions/checkout@v3
511-
- uses: vapor/swiftly-action@v0.2
511+
- uses: swift-actions/setup-swift@v2
512512
with:
513-
toolchain: ${{ matrix.swift }}
513+
swift-version: ${{ matrix.swift }}
514514
- name: Get swift version
515515
run: swift --version
516516
- name: test
517-
run: |
518-
swift build --build-tests
519-
swift test
517+
run: swift test
520518

521519
build-swift-windows:
522520
name: Test swift windows

conan/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

conan/build.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

conan/test_package/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

conan/test_package/conanfile.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

conan/test_package/test_package.cpp

Lines changed: 0 additions & 35 deletions
This file was deleted.

conanfile.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

docs/source/building.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ CC=clang PATH=$PATH:$(pwd)/swift-${SWIFT_VERSION}-RELEASE-debian12/usr/bin bazel
8989

9090
If you are unsure which versions to use, check our CI config at `.bazelci/presubmit.yml`.
9191

92+
## Building with Conan
93+
94+
You can download and install flatbuffers using the [Conan](https://conan.io/) dependency manager:
95+
96+
conan install --requires="flatbuffers/[*]" --build=missing
97+
98+
The flatbuffers package in Conan Center is maintained by
99+
[ConanCenterIndex](https://github.com/conan-io/conan-center-index) community.
100+
If the version is out of date or the package does not work,
101+
please create an issue or pull request on the [Conan Center Index repository](https://github.com/conan-io/conan-center-index).
102+
92103
## Building with VCPKG
93104

94105
You can download and install flatbuffers using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:

src/idl_gen_python.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ class PythonGenerator : public BaseGenerator {
12391239
auto& code = *code_ptr;
12401240

12411241
code += "\n";
1242-
code += "def Create" + namer_.Type(struct_def);
1242+
code += "def Create" + namer_.Function(struct_def);
12431243
code += "(builder";
12441244
}
12451245

@@ -2884,7 +2884,8 @@ class PythonGenerator : public BaseGenerator {
28842884
parser_.opts.one_file ? path_ : namer_.Directories(ns.components);
28852885
EnsureDirExists(directories);
28862886

2887-
for (size_t i = path_.size() + 1; i != std::string::npos;
2887+
for (size_t i = directories.find(kPathSeparator, path_.size());
2888+
i != std::string::npos;
28882889
i = directories.find(kPathSeparator, i + 1)) {
28892890
const std::string init_py =
28902891
directories.substr(0, i) + kPathSeparator + "__init__.py";

0 commit comments

Comments
 (0)