<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>126512</bug_id>
          
          <creation_ts>2014-01-06 00:29:38 -0800</creation_ts>
          <short_desc>Web Inspector: jsmin.py uses shebang #!/usr/bin/python</short_desc>
          <delta_ts>2014-01-06 11:45:01 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kerrick Staley">bugs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>964565</commentid>
    <comment_count>0</comment_count>
    <who name="Kerrick Staley">bugs</who>
    <bug_when>2014-01-06 00:29:38 -0800</bug_when>
    <thetext>WebCore/inspector/Scripts/jsmin.py uses the shebang #!/usr/bin/python; the correct shebang is #!/usr/bin/python2. See http://www.python.org/dev/peps/pep-0394/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964566</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-01-06 00:29:50 -0800</bug_when>
    <thetext>&lt;rdar://problem/15751675&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964675</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-01-06 11:02:17 -0800</bug_when>
    <thetext>What platforms does this affect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964681</commentid>
    <comment_count>3</comment_count>
    <who name="Kerrick Staley">bugs</who>
    <bug_when>2014-01-06 11:17:04 -0800</bug_when>
    <thetext>It affects Arch Linux and derived distros (e.g. Parabola).

All major Linux distros include the /usr/bin/python2 symlink, but OS X doesn&apos;t include it out-of-the-box. If you&apos;re concerned about out-of-the-box operation on OS X, you could make the shebang configurable using e.g. automake.

AFAIK the official Python installer for OS X *does* install /usr/bin/python2 by default and has done so for several years; not sure why it&apos;s not present on OS X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964686</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-01-06 11:21:50 -0800</bug_when>
    <thetext>Yes, out of the box on OS X is critical to keep working.

Would &quot;#!/usr/bin/env python&quot; be the right thing to do? That is what our other scripts in Tools/Scripts do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964692</commentid>
    <comment_count>5</comment_count>
    <who name="Kerrick Staley">bugs</who>
    <bug_when>2014-01-06 11:32:51 -0800</bug_when>
    <thetext>No, that won&apos;t work :(

The usual solution is that Arch Linux patches the upstream when creating packages, but I&apos;m using a less sophisticated build system that doesn&apos;t allow automatic patching, and so manual action is needed before every build. It&apos;d be nice if this weren&apos;t necessary.

Could you possibly look into why OS X doesn&apos;t provide /usr/bin/python2 ? It&apos;d be nice if /usr/bin/python2 could work everywhere. Arch Linux changing /usr/bin/python was stupid IMHO, but upstream agrees with the eventual goal of making this change, and has recommended that scripts switch to /usr/bin/python2 now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>964694</commentid>
    <comment_count>6</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-01-06 11:45:01 -0800</bug_when>
    <thetext>OS X switching to /usr/bin/python2 is out of our control and would be 1-2 years in the future if it happened. Plus WebKit supports building on OS X versions that will always only have /usr/bin/python.

This is a problem that needs solved on/by the affected platforms, not WebKit. As I mentioned all other scripts in WebKit use /usr/bin/python or /usr/bin/env python not just jsmin.py.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>