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
13 changes: 0 additions & 13 deletions pythonfmu/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,19 +288,6 @@ def build_FMU(
# Add information for the Python loader
zip_fmu.writestr(str(resource.joinpath("slavemodule.txt")), module_name)

# Add FMI API wrapping Python class source
source_node = SubElement(type_node, "SourceFiles")
sources = Path("sources")
src = HERE / "pythonfmu-export"
for f in itertools.chain(
src.rglob("*.hpp"), src.rglob("*.cpp"), src.rglob("CMakeLists.txt")
):
relative_f = f.relative_to(src)
SubElement(
source_node, "File", attrib={"name": relative_f.as_posix()}
)
zip_fmu.write(f, arcname=(sources / relative_f))

# Add FMI API wrapping Python class library
binaries = Path("binaries")
src_binaries = HERE / "resources" / "binaries"
Expand Down
11 changes: 1 addition & 10 deletions pythonfmu/tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_zip_content(tmp_path):
module_file = "/".join(("resources", "slavemodule.txt"))
assert module_file in names

nfiles = 20
nfiles = 16
if FmuBuilder.has_binary():
assert (
"/".join(("binaries", get_platform(), f"PythonSlave.{lib_extension}"))
Expand All @@ -47,15 +47,6 @@ def test_zip_content(tmp_path):
else:
nfiles -= 1

# Check sources
src_folder = Path(pythonfmu.__path__[0]) / "pythonfmu-export"
for f in itertools.chain(
src_folder.rglob("*.hpp"),
src_folder.rglob("*.cpp"),
src_folder.rglob("CMakeLists.txt"),
):
assert "/".join(("sources", f.relative_to(src_folder).as_posix())) in names

# Check pythonfmu is embedded
pkg_folder = Path(pythonfmu.__path__[0])
for f in pkg_folder.rglob("*.py"):
Expand Down