Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
ed48d912
Commit
ed48d912
authored
Sep 02, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chromedriver
parent
26ecd101
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
+48
-9
component/chromium/buildout.cfg
component/chromium/buildout.cfg
+48
-9
No files found.
component/chromium/buildout.cfg
View file @
ed48d912
...
...
@@ -161,25 +161,64 @@ script =
os.system('"${findutils:location}/bin/find" "%(location)s" -type f -exec "${coreutils:location}/bin/chmod" a+r {} \;')
os.chmod(wrapper_location, 0755)
[chromedriver-wrapper-2.41]
<= chromedriver-wrapper
wrapper-name = chromedriver-2.41
part = ${chromedriver-2.41:location}
[chromedriver-wrapper]
# generate a wrapper named ${:wrapper-name} setting $LD_LIBRARY_PATH,
# using chromedriver installed from ${:part}
wrapper-name = chromedriver
part = ${chromium:location}
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:wrapper-name}
script =
chromium = self.options['part']
part = self.buildout[os.path.basename(chromium)]
with open(%(location)r, 'w') as f:
f.write("""#!/bin/sh -e
cd {}
export LD_LIBRARY_PATH=$PWD:{}
export PATH={}:$PATH
exec ./chromedriver "$@"
""".format(
chromium,
':'.join(part['library'].split()),
':'.join(part['path'].split()),
))
os.fchmod(f.fileno(), 0o755)
[chromedriver]
<= chromedriver-2.41
[chromedriver-2.41]
<= chromedriver-
base
<= chromedriver-
download
version = 2.41
# Supports Chrome v67-69
x86_64-md5sum = fbd8b9561575054e0e7e9cc53b680a70
md5sum-x86_64 = fbd8b9561575054e0e7e9cc53b680a70
[chromedriver-base]
# Installs chromedriver ${version}
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:_buildout_section_name_}
[chromedriver-download]
# Installs chromedriver ${version}.
# This chromedriver is not usable directly, it needs a wrapper.
version =
md5sum-x86_64 =
x86-64 = https://chromedriver.storage.googleapis.com/${:version}/chromedriver_linux64.zip
recipe = slapos.recipe.build
x86-64 = https://chromedriver.storage.googleapis.com/${:version}/chromedriver_linux64.zip ${:md5sum-x86_64}
library =
${nss:location}/lib
${nspr:location}/lib
path =
script =
url, md5sum = self.options[guessPlatform()].split()
extract_dir = self.extract(self.download(url, md5sum))
shutil.copy(extract_dir + '/chromedriver', %(location)r)
\ No newline at end of file
os.mkdir(%(location)r)
shutil.copy(extract_dir + '/chromedriver', %(location)r)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment