Giter Club home page Giter Club logo

Comments (6)

danhper avatar danhper commented on May 13, 2024 1

I just created a Python plugin.
https://github.com/tuvistavie/asdf-python
It only handles cpython, not other flavors.

The handling of the python executable is a little hacky, any idea if there is a better way to do this?
https://github.com/tuvistavie/asdf-python/blob/master/shims/python
The issue here is that Python3 does not have a python executable and so python gives no such command, which I do not think is desirable.

Also, for Python it is a little bit of an issue not to be allowed to set multiple versions of a language.
For example, pyenv allows to set

3.5.1
2.7.11

if the command exists in 3.5.11, it will use it, otherwise fallback to 2.7.11.

There are a lot of scripts in Python which uses #!/usr/bin/env python2 or #!/usr/bin/env python3, and these would break if the currently set version does not match.

@HashNuke Do you think we could modify asdf to be able to write something such as

python 3.5.1 2.7.11

in .tool-versions, to use the second version as a fallback for the command?

from asdf.

danhper avatar danhper commented on May 13, 2024 1

Python plugin should work fine, closing 😄

from asdf.

HashNuke avatar HashNuke commented on May 13, 2024

@tuvistavie Ah. That's a pretty huge edge case. If that's what it takes to support python, yes - whatever changes required.

from asdf.

danhper avatar danhper commented on May 13, 2024

@HashNuke Yeah, Python is really problematic for these things. I'm going to give it a try, I want to stop using pyenv 😄

from asdf.

HashNuke avatar HashNuke commented on May 13, 2024

@tuvistavie anything I can do?

from asdf.

danhper avatar danhper commented on May 13, 2024

@HashNuke It should simply be a matter of changing asdf-exec a little, so it should not take too long, thank you 😃

from asdf.

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.