1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
From: Sascha Girrulat <sascha@girrulat.de>
Date: Sun, 1 Nov 2015 00:20:00 +0100
Subject: Use x_ignore_nofocus from /usr/lib/firefoxdriver
---
py/selenium/webdriver/firefox/firefox_binary.py | 7 ++++---
setup.py | 4 +---
2 files changed, 5 insertions(+), 6 deletions(-)
Index: python-selenium/py/selenium/webdriver/firefox/firefox_binary.py
===================================================================
--- python-selenium.orig/py/selenium/webdriver/firefox/firefox_binary.py
+++ python-selenium/py/selenium/webdriver/firefox/firefox_binary.py
@@ -185,14 +185,15 @@ class FirefoxBinary(object):
def _extract_and_check(self, profile, no_focus_so_name, x86, amd64):
+ os_lib_path = '/usr/lib/firefoxdriver'
+
paths = [x86, amd64]
built_path = ""
for path in paths:
library_path = os.path.join(profile.path, path)
- if not os.path.exists(library_path):
- os.makedirs(library_path)
+ os.makedirs(library_path)
import shutil
- shutil.copy(os.path.join(os.path.dirname(__file__), path,
+ shutil.copy(os.path.join(os_lib_path, path,
self.NO_FOCUS_LIBRARY_NAME),
library_path)
built_path += library_path + ":"
Index: python-selenium/setup.py
===================================================================
--- python-selenium.orig/setup.py
+++ python-selenium/setup.py
@@ -71,10 +71,8 @@ setup_args = {
'selenium.webdriver.remote',
'selenium.webdriver.support', ],
'package_data': {
- 'selenium.webdriver.firefox': ['*.xpi', 'webdriver_prefs.json'],
+ 'selenium.webdriver.firefox': ['webdriver_prefs.json'],
},
- 'data_files': [('selenium/webdriver/firefox/x86', ['py/selenium/webdriver/firefox/x86/x_ignore_nofocus.so']),
- ('selenium/webdriver/firefox/amd64', ['py/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so'])],
'include_package_data': True,
'zip_safe': False
}
|