[ruby] fixing path to gcc such that users can use gem to install nati… (#17141)

* [ruby] fixing path to gcc such that users can use gem to install native gems to their home directory

* [ruby] working on making flake8 happier

* [ruby] Line can't really be split cleanly. Enhancing flake8's calm.

ya learn something new every day...

* [ruby] line break where requested

* [ruby] make raw string

* [ruby] only running for x86_64-linux everything else is untested

* [ruby] finding rbconfig.rb in a cross platform manner
This commit is contained in:
Jen Herting 2020-06-30 10:27:48 -04:00 committed by GitHub
parent 6d46fbb6f7
commit f25d6e64f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,3 +114,14 @@ def post_install(self):
'rubygems',
'ssl_certs')
install(rubygems_updated_cert_path, rubygems_certs_path)
rbconfig = find(self.prefix, 'rbconfig.rb')[0]
filter_file(r'^(\s*CONFIG\["CXX"\]\s*=\s*).*',
r'\1"{0}"'.format(self.compiler.cxx),
rbconfig)
filter_file(r'^(\s*CONFIG\["CC"\]\s*=\s*).*',
r'\1"{0}"'.format(self.compiler.cc),
rbconfig)
filter_file(r'^(\s*CONFIG\["MJIT_CC"\]\s*=\s*).*',
r'\1"{0}"'.format(self.compiler.cc),
rbconfig)