Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ r = Rectangle(4, 5)

## Tips

- Use `examples/shapes` as a starting point.
- See the [pybind11 docs](https://pybind11.readthedocs.io/) for help on pybind11
- Use `examples/shapes` or `examples/cells` as a starting point.
- See the [pybind11 documentation](https://pybind11.readthedocs.io/) for help on pybind11
wrapper code.
5 changes: 1 addition & 4 deletions cppwg/info/module_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Module information structure."""

import os
from pathlib import Path
from typing import Any, Dict, List, Optional

Expand Down Expand Up @@ -173,9 +172,7 @@ def compare(a: CppClassInfo, b: CppClassInfo) -> int:
cache[(b, a)] = 0
return 0

self.class_collection.sort(
key=lambda x: (os.path.dirname(x.source_file_path), x.name)
)
self.class_collection.sort(key=lambda x: x.name)

i = 0
n = len(self.class_collection)
Expand Down
8 changes: 6 additions & 2 deletions cppwg/writers/module_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ def write_module_wrapper(self) -> None:
Example output:

```
#include <pybind11/pybind11.h> #include "Foo.cppwg.hpp"
#include <pybind11/pybind11.h>
#include "Foo.cppwg.hpp"
#include "Bar.cppwg.hpp"

PYBIND11_MODULE(_packagename_modulename, m) {
PYBIND11_MODULE(_packagename_modulename, m)
{
register_Foo_class(m);
register_Bar_class(m);
}
```
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#include "Node_3.cppwg.hpp"
#include "AbstractMesh_2_2.cppwg.hpp"
#include "AbstractMesh_3_3.cppwg.hpp"
#include "PetscUtils.cppwg.hpp"
#include "PottsMesh_2.cppwg.hpp"
#include "PottsMesh_3.cppwg.hpp"
#include "MeshFactory_PottsMesh_2.cppwg.hpp"
#include "MeshFactory_PottsMesh_3.cppwg.hpp"
#include "PetscUtils.cppwg.hpp"
#include "Scene_2.cppwg.hpp"
#include "Scene_3.cppwg.hpp"

Expand All @@ -23,11 +23,11 @@ PYBIND11_MODULE(_pycells_all, m)
register_Node_3_class(m);
register_AbstractMesh_2_2_class(m);
register_AbstractMesh_3_3_class(m);
register_PetscUtils_class(m);
register_PottsMesh_2_class(m);
register_PottsMesh_3_class(m);
register_MeshFactory_PottsMesh_2_class(m);
register_MeshFactory_PottsMesh_3_class(m);
register_PetscUtils_class(m);
register_Scene_2_class(m);
register_Scene_3_class(m);
}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = cppwg
version = 0.3.1
version = 0.3.3
author = Chaste Developers
author_email = chaste-users@maillist.ox.ac.uk
description = An automatic Python wrapper generator for C++ code
Expand Down