Giter VIP home page Giter VIP logo

Comments (4)

dpgeorge avatar dpgeorge commented on August 24, 2024

Yep, this needs to be fixed.

If you have a python2.7 binary, then surely you have a python2 symlink to it? Or maybe not, since such a naming scheme is only needed when you also have python3 living on your system... But then you would have python3 if you want the tests/ to run.

from micropython.

piranna avatar piranna commented on August 24, 2024

What about moving all the Python2 dependencies to Python3? It would make
more sense, being this the future version and also being MicroPython based
on CPython 3.3...

2014/1/2 Damien George [email protected]

Yep, this needs to be fixed.

If you have a python2.7 binary, then surely you have a python2 symlink to
it? Or maybe not, since such a naming scheme is only needed when you also
have python3 living on your system... But then you would have python3 if
you want the tests/ to run.


Reply to this email directly or view it on GitHubhttps://github.com//issues/33#issuecomment-31477971
.

"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton
de sitios diferentes, simplemente escribe un sistema operativo Unix."
– Linus Tordvals, creador del sistema operativo Linux

from micropython.

pfalcon avatar pfalcon commented on August 24, 2024

If you have a python2.7 binary, then surely you have a python2 symlink to it? Or maybe not, since such a naming scheme is only needed when you also have python3 living on your system...

Having a symlink "python2" pointing to the "best" available python 2.x version is a common idiom, which is usually handled by a python package or distro package manager. If some system lacks it, the good strategy to resolve it is: 1) Create it manually; 2) Report bug to the particular distro/package provider which don't follow the best practices.

Damien, while we're on the subject of python versions, tests/basics/run-tests requires not less than python 3.3, it fails at least one test with 3.2. 3.2 is still default on many systems, and tests/bytecode/run-tests already expilcitly uses python3.3. So can you apply following patch:

--- a/tests/basics/run-tests
+++ b/tests/basics/run-tests
@@ -1,7 +1,8 @@
 #!/usr/bin/env bash

 RM="/bin/rm -f"
-CPYTHON3=python3
+# Note: At least python 3.3 is required
+CPYTHON3=python3.3
 MP_PY=../../unix/py

 numtests=0

I'd submit pull request, but I kinda hate all the merge commits spaghetti we get with such small pull requests (that's github's fault, they should get from under the rock and support fast-forward/rebase merges).

from micropython.

iabdalkader avatar iabdalkader commented on August 24, 2024

Actually on my old Ubuntu 11.04 machine I have Python 3 installed too but still no python2 link, it exists along side Python 2.x and there's a python symlink which points to python2.7 to avoid compatibility issues.

However, that's not the issue, I agree there's a dependency on Python 2, if someone has just Python 3 installed, the script won't work because it uses Python 2 syntax...

so I think it needs to be changed either way, so I made some minor changes to the script to use Python 3 syntax, but it's still remains compatible with Python 2, I tested it with python2.6 and python3.2 and confirmed with diff the dfu images are identical to the old one, now the Makefile can just call python which will work regardless of the python version installed. I will send a pull request.

from micropython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.