diff --git a/make_rpm_ubuntu26.py b/make_rpm_ubuntu26.py index 955caf7..6ed7b98 100755 --- a/make_rpm_ubuntu26.py +++ b/make_rpm_ubuntu26.py @@ -114,7 +114,6 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea 'tests', 'new_docker_build.sh', 'specs', - 'include', 'translations', 'CTestCustom.ctest', '.gitignore', @@ -125,6 +124,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea 'lts-cc.conf' ] + # Directories to exclude from include folder (bundled libraries not needed for release) + include_exclude = ['GeographicLib'] + if with_subdirs: for root, dirs, files in os.walk(srcdir): # Filter directories for release scope @@ -148,6 +150,9 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea elif rel_root.startswith('TetraIF'): # Keep all subdirectories under TetraIF pass + elif rel_root == 'include': + # In include directory, exclude bundled libraries + dirs[:] = [d for d in dirs if d not in include_exclude] else: # Skip other directories dirs[:] = [] @@ -164,6 +169,7 @@ def copy_src_dir_to_dest_dir(srcdir, dstdir, perm=None, with_subdirs=True, relea if release_scope and rel_root == '.': if file not in release_items and not any(file == item.split('/')[0] for item in release_items if '/' in item): continue + # Include 'include' directory but GeographicLib will be filtered during walk src_path = os.path.join(root, file) # Skip broken symlinks if os.path.islink(src_path) and not os.path.exists(src_path):