wangyu5 / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

gyp installation on Windows does not install gyp.bat #170

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout gyp sources.
2. Run python setup.py install on Windows.

What is the expected output? What do you see instead?
Expected: gyp.bat is copied to <Python installation folder>/Scripts.
Actual: only "svn/trunk/gyp" is copied to Scripts which is not sufficient to 
run gyp from command line on Windows.

What version of the product are you using? On what operating system?
MS Windows

Original issue reported on code.google.com by vvavryc...@gmail.com on 21 Dec 2010 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by vvavryc...@gmail.com on 30 Dec 2010 at 6:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by thestig@chromium.org on 31 May 2011 at 11:24

GoogleCodeExporter commented 9 years ago
Workaround is to just copy gyp.bat manually, or conditionally add gyp.bat to 
the scripts array in setup.py:

scripts = ['gyp'] if os.name != 'nt' else ['gyp', 'gyp.bat'],

Here's a patch:

Index: setup.py
===================================================================
--- setup.py    (revision 1463)
+++ setup.py    (working copy)
@@ -8,6 +8,7 @@
 from distutils.command.install import install
 from distutils.command.install_lib import install_lib
 from distutils.command.install_scripts import install_scripts
+import os

 setup(
   name='gyp',
@@ -19,7 +20,7 @@
   package_dir = {'': 'pylib'},
   packages=['gyp', 'gyp.generator'],

-  scripts = ['gyp'],
+  scripts = ['gyp'] if os.name != 'nt' else ['gyp', 'gyp.bat'],
   cmdclass = {'install': install,
               'install_lib': install_lib,
               'install_scripts': install_scripts},

Original comment by aarone@one-shore.com on 9 Aug 2012 at 3:20

Attachments:

GoogleCodeExporter commented 9 years ago
I wonder how how this issue has been open for over 2 years. It's such a trivial 
fix, but wastes a lot of time for a person trying to figure out why gyp doesn't 
work.

Original comment by vvnicho...@gmail.com on 25 Feb 2013 at 4:47