Loading system/gd/setup.py +22 −7 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ # limitations under the License. from distutils import log import logging import os from setuptools import setup, find_packages from setuptools.command.install import install from setuptools.command.develop import develop import stat import subprocess import sys Loading @@ -27,6 +27,11 @@ install_requires = [ 'grpcio', ] host_executables = [ 'root-canal', 'bluetooth_stack_with_facade', ] def setup_acts_for_cmd_or_die(cmd_str): acts_framework_dir = os.path.abspath('acts_framework') Loading @@ -35,6 +40,17 @@ def setup_acts_for_cmd_or_die(cmd_str): subprocess.check_call(cmd, cwd=acts_framework_dir) def set_permssions_for_host_executables(outputs): for file in outputs: if os.path.basename(file) in host_executables: current_mode = os.stat(file).st_mode new_mode = current_mode | stat.S_IEXEC os.chmod(file, new_mode) log.log( log.INFO, "Changed file mode of %s from %s to %s" % (file, oct(current_mode), oct(new_mode))) class InstallLocalPackagesForInstallation(install): def run(self): Loading @@ -42,15 +58,17 @@ class InstallLocalPackagesForInstallation(install): setup_acts_for_cmd_or_die("install") self.announce('ACTS installed for installation.', log.INFO) install.run(self) set_permssions_for_host_executables(self.get_outputs()) class InstallLocalPackagesForDevelopment(develop): def run(self): logging.info('Installing ACTS for development') log.log(log.INFO, 'Installing ACTS for development') setup_acts_for_cmd_or_die("develop") logging.info('ACTS installed for development') log.log(log.INFO, 'ACTS installed for development') develop.run(self) set_permssions_for_host_executables(self.get_outputs()) def main(): Loading @@ -70,10 +88,7 @@ def main(): packages=[''] + find_packages(exclude='acts_framework'), install_requires=install_requires, package_data={ '': [ 'root-canal', 'bluetooth_stack_with_facade', '*.so', 'lib64/*.so', 'target/*' ], '': host_executables + ['*.so', 'lib64/*.so', 'target/*'], 'cert': ['all_test_cases'], }, cmdclass={ Loading Loading
system/gd/setup.py +22 −7 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ # limitations under the License. from distutils import log import logging import os from setuptools import setup, find_packages from setuptools.command.install import install from setuptools.command.develop import develop import stat import subprocess import sys Loading @@ -27,6 +27,11 @@ install_requires = [ 'grpcio', ] host_executables = [ 'root-canal', 'bluetooth_stack_with_facade', ] def setup_acts_for_cmd_or_die(cmd_str): acts_framework_dir = os.path.abspath('acts_framework') Loading @@ -35,6 +40,17 @@ def setup_acts_for_cmd_or_die(cmd_str): subprocess.check_call(cmd, cwd=acts_framework_dir) def set_permssions_for_host_executables(outputs): for file in outputs: if os.path.basename(file) in host_executables: current_mode = os.stat(file).st_mode new_mode = current_mode | stat.S_IEXEC os.chmod(file, new_mode) log.log( log.INFO, "Changed file mode of %s from %s to %s" % (file, oct(current_mode), oct(new_mode))) class InstallLocalPackagesForInstallation(install): def run(self): Loading @@ -42,15 +58,17 @@ class InstallLocalPackagesForInstallation(install): setup_acts_for_cmd_or_die("install") self.announce('ACTS installed for installation.', log.INFO) install.run(self) set_permssions_for_host_executables(self.get_outputs()) class InstallLocalPackagesForDevelopment(develop): def run(self): logging.info('Installing ACTS for development') log.log(log.INFO, 'Installing ACTS for development') setup_acts_for_cmd_or_die("develop") logging.info('ACTS installed for development') log.log(log.INFO, 'ACTS installed for development') develop.run(self) set_permssions_for_host_executables(self.get_outputs()) def main(): Loading @@ -70,10 +88,7 @@ def main(): packages=[''] + find_packages(exclude='acts_framework'), install_requires=install_requires, package_data={ '': [ 'root-canal', 'bluetooth_stack_with_facade', '*.so', 'lib64/*.so', 'target/*' ], '': host_executables + ['*.so', 'lib64/*.so', 'target/*'], 'cert': ['all_test_cases'], }, cmdclass={ Loading