-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 2.7 build dependency #59838
Comments
The complete bootprocess is written in python (2) afaik. Have a look at https://github.com/rust-lang/rust/blob/master/x.py and start working from there on. |
Hmmm a better question, If i was to change all the python related files to python3 most likely breaking python2 compatability completely would that be an acceptable pr? |
Unfortunately LLVM currently has a hard dependency on Python 2, mostly for debuginfo tests. There's also Mac OS to consider, which doesn't ship Python 3 but ships Python 2. However, the Rust project is in a pretty good state for Python 3 compatibility, and the project is open to patches that fix Python 3 compatibility while preserving Python 2 compatibility. As far as I know, all scripts in the Rust repository run with both interpreters. |
Tbh i havent actually done a test compile yet but if it does acually work on python3 i guess the readme is lieing then, and i checked out llvm the list python >=2.7 as a dependancy. I got but windows and linux i can test on, i gues ill try a test build on both with using python3 and if it does work i think it be pretty safe for me to exit the readme to match llvms req of >=2.7 replcacing what it says about python 3 not working.Because I'm pretty sure 3 is greater than or equal to 2.7 |
Take a look at these lines from LLVM's CMake configuration: I wouldn't say the Rust README is lying, it's just that using Python 3 is unsupported. You can try to use Python 3 to build, but there's a caveat that it might not work. |
I can confirm that rustc compiles successfully on windows 10 with msvc 2017 python 3.7.3. 166 tests failed tho, all complaining about failing to spawn make. I didn't see any python tracebacks tho. |
Also note that Travis is planning to update the default Python version to 3.6. From #59873:
|
cc @rust-lang/infra |
That Travis thing shouldn't affect us: they talk about the default language when you use I'll let @Mark-Simulacrum or @alexcrichton comment on |
We have long held the policy of supporting 3.x in our scripts while keeping backwards compatibility with 2.7. Do we know what LLVMs plans are for the migration? |
to be honest that travis thing is just anouther sign that python3 should be used, its just going to get harder and harder as time goes on to keep using python2. |
I can pick this up! |
I don't think we have a concrete plan yet; the next step seems to be to investigate when and how LLVM will be migrating to 3.x python. |
So should we update the README? It currently says:
Maybe it should be revised to:
|
Seems that LLVM is supporting python 3 since very recently: cf. https://reviews.llvm.org/D64443 & https://reviews.llvm.org/D64894; the former is part of 9.0.0-rc1 already. |
Closing in favor of #65063. |
I notice python 2.7 is specified as a dependency to compile rustc. Python2.7 will be end of life next year. Just wondering if anything is actively being done to remove this dependency. This might be something I could work on, just need pointing the right direction.
The text was updated successfully, but these errors were encountered: