Skip to content

Commit abacb1d

Browse files
committed
centos7: disable brp-python-bytecompile
Signed-off-by: Shizuo Fujita <[email protected]>
1 parent ecdf14c commit abacb1d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

fluent-package/Rakefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,10 +1164,6 @@ class BuildTask
11641164
rm_f(static_library)
11651165
end
11661166
end
1167-
Dir.glob("#{fluent_package_staging_dir}/**/libffi/**/*.py").each do |python_file|
1168-
# Remove unnecessary python file to avoid error in brp-python-bytecompile on CentOS 7
1169-
remove_files(python_file)
1170-
end
11711167
Dir.glob("#{fluent_package_staging_dir}/**/.git").each do |git_dir|
11721168
remove_files(git_dir, true)
11731169
end

fluent-package/yum/fluent-package.spec.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@
3636
%define install_plugins /tmp/@PACKAGE_DIR@/.install_plugins
3737
%define pid_for_auto_restart /tmp/@PACKAGE_DIR@/.pid_for_auto_restart
3838

39-
# Omit the brp-python-bytecompile automagic because post hook for ffi fails on AmazonLinux 2.
40-
%if %{_amazon_ver} == 2
39+
# Disable to use old python on CentOS 7 because it causes error in brp-python-bytecompile.
40+
# Only `%global __brp_python_bytecompile %{nil}`, it does not solve the error...
41+
%if %{_centos_ver} == 7
42+
%global __python %{nil}
43+
%endif
44+
45+
# Omit the brp-python-bytecompile automagic because post hook for ffi fails on AmazonLinux 2 and CentOS 7.
46+
%if %{_amazon_ver} == 2 || %{_centos_ver} == 7
4147
%global __brp_python_bytecompile %{nil}
4248
%endif
4349

0 commit comments

Comments
 (0)