Code Monkey home page Code Monkey logo

Comments (7)

nixjdm avatar nixjdm commented on July 22, 2024

and 3 ought to be the default.

from lektor-website.

andoresuperesu avatar andoresuperesu commented on July 22, 2024

@nixjdm This is done, those seem like bs fixes, but i've tested both and comply with the minimum requirements. Please make clear if python2 compatibility is required or if a selection should be offered. Otherwise it is ready.

from lektor-website.

runfalk avatar runfalk commented on July 22, 2024

I think we should support Python 2 only as long as we officially support Python 2. I guess that means one more release?

from lektor-website.

andoresuperesu avatar andoresuperesu commented on July 22, 2024

Ok I'll figure a way to test for both and pass the script to the right one. Another question @runfalk : in case both are installed (weird but possible) which should be prioritized? I'm guessing python3 should, right?

from lektor-website.

runfalk avatar runfalk commented on July 22, 2024

I think having both is really common, at least it was very common in Linux distros until recently.

I think prioritizing Python 3 makes most sense since Python 2 is dying. I guess the check could be something like:

  if hash python3 2> /dev/null; then
    PYTHON_BIN="python3"
  elif hash python 2> /dev/null; then
    PYTHON_BIN="python"
  else
    echo "Error: To use this script you need to have Python installed"
    exit 1
  fi

  $PYTHON_BIN - <<'EOF'

from lektor-website.

andoresuperesu avatar andoresuperesu commented on July 22, 2024

I'll test and add to PR.

from lektor-website.

xlotlu avatar xlotlu commented on July 22, 2024

Closed in 1a059fa... sort of. The installer is now python, and works with 2 and 3. Hopefully the user decides to use 3, as suggested by the docs.

from lektor-website.

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.