Package Details: depot-tools-git r7308.7f3861357-1

Git Clone URL: https://aur.archlinux.org/depot-tools-git.git (read-only, click to copy)
Package Base: depot-tools-git
Description: Tools for working with Chromium development
Upstream URL: https://chromium.googlesource.com/chromium/tools/depot_tools
Keywords: chromium google
Licenses: custom
Submitter: aperez
Maintainer: relrel
Last Packager: relrel
Votes: 84
Popularity: 0.90
First Submitted: 2014-07-07 14:25
Last Updated: 2020-09-25 11:21

Dependencies (2)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

AWhetter commented on 2015-10-30 21:15

As a bit of a quick and dirty way of doing the python2 substitutions I used the following:
for i in $(find -type f -not -path .git); do sed -i -e '1s/env python$/env python2/' -e 's/exec python /exec python2 /' -e 's/^python /python2 /' $i; done

aperez commented on 2015-07-23 12:32

@ausbin: Yeah, you are right: the fixed list of scripts in which to edit shebangs is quite annoying to maintain. In the end I have made a quick Python script which will edit them only in the first line, and only for scripts which already had a shebang beforehand. This is now run from the “prepare()” function.

Also, notice how I had to leave still some fixing to “sed” because there are some shell scripts which do “exec python ...”, and those have to be changed to “exec python2 ...”. The latter are just a few, and quite unlikely to change, so I have opted for keeping a static list for those.

ausbin commented on 2015-07-18 21:23

Hey, thanks a bunch for this package. It's saved me a lot of time.

I think your hard-coded list of scripts is out of date, though. (it missed a few shebangs for me, at least). Instead of fixing the list every time the scripts shuffle around in git, maybe you could try something like the following: http://ix.io/jOw. It just replaces every instance of the wrong (python 3) shebang with the right (python 2) one. It ain't pretty -- it replaces *all* matching lines, not just the first -- but it works.

As a side note to future readers: in general, I'd suggest against following stubb's suggestion of symlinking /usr/bin/python to /usr/bin/python2. Sure, it'll work, but you run the risk of breaking scripts such as youtube-dl that (correctly) expect /usr/bin/python to be Python 3. Simply replacing the bad shebangs in the package you're building avoids such issues and doesn't prevent you from installing Python 3 later.

twelveeighty commented on 2014-12-06 13:52

@stubb, okay, I'll try that instead of the repo_fix script. Thanks!

stubb commented on 2014-12-01 23:46

@twelveeighty Looks like you missed that simply symlink trick https://wiki.archlinux.org/index.php/Python#Python_2

twelveeighty commented on 2014-12-01 16:12

Folks, I need some pointers. I'm using depot-tools to build mod_pagespeed. I keep getting the Python 3 vs. 2 problem (error code below), so I'm sure I'm missing something that has to be fixed with that repo_fix.sh script included in this package. But, I can't seem to find the folder that I need to run that script against. There's no ".repo" folder I can find?

________ running '/usr/bin/python2 src/build/gyp_chromium -Dchromium_revision=256281' in '/mnt/encrypted/data/twelveeighty/work/builds/mod_pagespeed'
Updating projects from gyp files...
File "../build/linux/detect_host_arch.py", line 31
print host_arch
^
SyntaxError: Missing parentheses in call to 'print'
gyp: Call to 'python ../build/linux/detect_host_arch.py' returned exit status 1.

twelveeighty commented on 2014-12-01 16:11

Folks, I need some pointers. I'm using depot-tools to build mod_pagespeed. I keep getting the Python 3 vs. 2 problem (error code below), so I'm sure I'm missing something that has to be fixed with that repo_fix.sh script included in this package. But, I can't seem to find the folder that I need to run that script against. There's no ".repo" folder I can find?

________ running '/usr/bin/python2 src/build/gyp_chromium -Dchromium_revision=256281' in '/mnt/encrypted/data/fvanderham/work/builds/mod_pagespeed'
Updating projects from gyp files...
File "../build/linux/detect_host_arch.py", line 31
print host_arch
^
SyntaxError: Missing parentheses in call to 'print'
gyp: Call to 'python ../build/linux/detect_host_arch.py' returned exit status 1.

aperez commented on 2014-09-21 14:29

@emanueLczirai: Fixed, thanks for noticing the issue.

abandonedaccount commented on 2014-09-21 04:58

the following:

,fetch,download_from_google_storage,gn,clang-format,git-runhooks,roll-dep

were needed to be added to this line:

for script in {apply_issue,drover,gcl,git-cl,git-gs,git-try,hammer,weekly,wtf,update_depot_tools}

aperez commented on 2014-09-02 16:41

@sl1pkn07: Fixed, the new version of the PKGBUILD patches “gclient” to always use “python2” as executable name.