Comments (17)
Patch welcome whenever you're ready with one.
Original comment by [email protected]
on 6 Aug 2009 at 6:25
- Added labels: Priority-Low
- Removed labels: Priority-Medium
from gyp.
any progress on this?
Original comment by [email protected]
on 15 Oct 2011 at 11:14
from gyp.
It's been almost 4 years. Any progress?
Original comment by [email protected]
on 26 Mar 2013 at 8:53
from gyp.
Аny person from google not familiar with python3. As usual one way - make
patch myself.
Original comment by [email protected]
on 17 Apr 2013 at 8:39
from gyp.
This problem actual:
http://code.google.com/p/gyp/issues/detail?id=334&thanks=334&ts=1366256817
New issue 2633 by [email protected]: v8 not complile with py3k.
http://code.google.com/p/v8/issues/detail?id=2633
Need porting v8 from obsolete python2 to new version python3.
./2to3 partitallly help, but python2 package compiler, used in v8, removed
from python3, and automatical porting fails:
build/gyp_v8 --depth=. -Dcomponent=shared_library
-Dsoname_version=3.17.16.2 -Dv8_target_arch=x64 -Dconsole=readline -Dwerror=
Traceback (most recent call last):
File "build/gyp_v8", line 50, in <module>
import gyp
File "./build/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "./build/gyp/pylib/gyp/input.py", line 5, in <module>
from compiler.ast import Const
ImportError: No module named 'compiler'
Original comment by [email protected]
on 18 Apr 2013 at 3:49
from gyp.
Would patches need to be backwards compatible with Python2?
Original comment by [email protected]
on 19 May 2013 at 4:05
from gyp.
should be able to just delete the `compiler.` part of that.
Original comment by [email protected]
on 2 Mar 2014 at 6:51
from gyp.
node-gyp depends on gyp, and lots of Node modules with native dependencies use
node-gyp to build their projects. So this actually has pretty broad
ramifications.
I don't think I'm the right candidate to actually fix this. :( Just raising
awareness of the scope of the issue.
Original comment by konklone
on 10 May 2014 at 5:11
from gyp.
I just want to be sure, what is the reason for the lack of Python 3 support?
Because as a non-Python guy, it looks really lame to me. Python 3.0 was
released in 2008(!!). Not supporting Python 3 is like a Windows app not
supporting Vista and above and only working with XP. It's that bad.
I checked the project members, and, man, Gyp is aparently not some guy's
abandoned weekend project. So what gives?
Original comment by [email protected]
on 26 Jul 2014 at 10:04
from gyp.
I've started a petition, you can sign it there:
https://www.change.org/petitions/google-inc-upgrade-gyp-to-support-phyton-3
Original comment by [email protected]
on 14 Aug 2014 at 7:43
from gyp.
What is the minimum Python version that must be supported by gyp? The post two
years ago at
https://groups.google.com/d/msg/gyp-developer/tsqTJr4MMZQ/pqjY_jPSl3AJ mentions
that the Chromium build requires Python 2.6 at minimum. Would a patch set that
worked unmodified on Python 2.6, 2.7, and 3.2+ be accepted?
Original comment by [email protected]
on 27 Aug 2014 at 6:57
from gyp.
FYI Google seems to be on the path to replace GYP with GN:
https://code.google.com/p/chromium/wiki/gn
Original comment by saghul
on 28 Aug 2014 at 8:00
from gyp.
Does anyone know what would need to be done to get a GYP version that works
with python3? I'm willing to tackle the problem as long as I understand what
needs to be done. If all we have to do is make the GYP source code python3
compatible then this seems feasible.
Original comment by [email protected]
on 23 Feb 2015 at 3:18
from gyp.
I tried this once and it really is much more complicated than you would think.
It seems that Google is replacing gyp with GN. The other big project I know of
using gyp is nodejs, and I'm not sure what their plan is for the future. In
any event, porting it seems like a lot of work, and it is especially not worth
it if the world is moving on to others things and if Google seems to ignore all
discussion here.
My two cents.
Original comment by [email protected]
on 23 Feb 2015 at 7:46
from gyp.
Many systems will continue using gyp even in the face of GN replacing it.
It would really help out the community if gyp continued to receive support,
specifically for Python 3 compatibility.
Original comment by [email protected]
on 23 Feb 2015 at 10:36
from gyp.
> It would really help out the community if gyp continued to receive support,
specifically for Python 3 compatibility.
What community/communities would benefit, specifically, by python3
compatibility? I think it's important to answer this question before
proceeding.
Since I've taken a crack at porting to python3 in the past, I'll add my
thoughts on how this should proceed. I tried a few different ways, and I
ultimately think this is the best path forward.
The goal should be to make incremental changes that move toward python3
compatibility while still allowing gyp to work under python2.
The `2to3` program will do many transformations automatically, and you'll want
to use it, because there are way too many changes necessary to make them all
manually. But using it on automatic mode is not going to work for you.
For instance, the following command will replace all `print` statements with
`print` functions:
2to3 -w -n -f print .
Unfortunately, `2to3` in its default mode will make code that runs correctly
only on python3. So after running the above command, you'll want to go through
each file that was modified and add `from __future__ import print_function` at
the top.
At this point, by far the best way to proceed would be for google to accept
this patch upstream. Since this is such an invasive change, it's going to be a
chore to integrate any further upstream gyp changes unless this is merged and
upstream cooperates. (From the lack of response by google to this thread in
several years, this seems unlikely, but I'd love to see it happen. In any
event, merging it will mean that only python versions 2.6 and higher will be
supported by gyp, as the `print` function was introduced in 2.6. Hence my
question above on Aug 27, 2014.)
At this point, I would then go through each one of the possible `2to3` changes
one by one, making each transformation into its own commit. Since some `2to3`
changes will make code that only works on python3, it will be helpful to make
slight modifications to the output of the `2to3` tool each time, quite possibly
changing gyp to use the python `six` library, which is meant for 2/3 joint
compatibility of a single codebase. These changes will need to be made
manually, but at least `2to3` will recognize and mark most/all of the changes
that need to be made. And at every point in the commit history, it should be
possible to keep everything working correctly under python2.
Then comes the tricky part: working on string handling such that gyp will work
under python3. I have a vague recollection that gyp treats strings as both
bytestrings and user-facing strings interchangeably, and this is not going to
fly under python3. From looking at the code myself, it was not obvious which
strings should be what, and where. So some amount of understanding of the gyp
code base is going to be necessary.
There might be some other obstacles that I have not considered, but this is
what I would expect the general process to look like. Godspeed to whomever is
brave enough to take it on!
Original comment by [email protected]
on 24 Feb 2015 at 1:40
from gyp.
FWIW, I worked in a GYP fork which only has Ninja as the generator and works
with Python 3 (tested on 3.4).
It's here: https://github.com/saghul/gyn
It's not fully finished (porting tests is missing), but I could build iojs with
it: https://github.com/iojs/io.js/issues/133#issuecomment-75736337
Original comment by saghul
on 24 Feb 2015 at 11:05
from gyp.
Related Issues (20)
- ninja generator doesn't handle LinkTimeCodeGeneration/ProfileGuidedDatabase for PGO HOT 3
- Ninja generator: spaces & other special characters not properly escaped
- gyp --build does not work with VS 2010 Express
- Dependency on file list targets breaks when the build directory is renamed HOT 2
- ninja generator is not aware of VCLinkerTool.GenerateManifest HOT 1
- Xcode seems to turn strings files into binary plists, mac_tools isn't following that HOT 4
- _CopyStringsFile mac_tool.py not using binary format HOT 1
- Would like syntax for specifying assembly references in Visual Studio/MSBuild projects HOT 1
- Allow latin-1 character encoding in user directory HOT 2
- Would like a way to set the .NET framework version
- Would like a way to specify /clr:nostdlib for MSBuild/VS projects HOT 1
- run libtool command more explicitly HOT 1
- ninja thinks loadable_module targets with no exports are always out of date HOT 4
- dead code path in mac_tool HOT 1
- xcode link with library in <(PRODUCT_DIR) instead of what defined in "product_dir"
- Included gypi values overwrite including gypi file's
- "xcassets" entry for the file type extension map HOT 1
- Python 2.6 + OSX problem HOT 1
- None portable dict comprehension for versions of python below 2.7 HOT 1
- GYP_MSVS_VERSION=2013 ignored when other versions of VS are installed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gyp.