Issue #85 new

Set up version specific installations

Ian Cordasco avatarIan Cordasco created an issue

This can be done through entry points, e.g.,

    'console_scripts': [

This allows for parallel installations of flake8 on python3 and python2.

Comments (6)

  1. Ian Cordasco

    You can do it just as easily with the old % operator 'flake8-%s=flake8.main.main' % sys.version[:3]. sys.version is a string, and we're just taking the major and minor version from it in an easy way.

  2. Ian Cordasco

    Florent Xicluna and I discussed this on IRC at one point and I believe we mentioned the possibility of having a separate bash script to call the version of flake8 installed on which ever version of python you want.

    I think this is far more worthwhile than people having to type: flake8-3.3 or flake8-2.6 or having to remember which one flake8 links to.

    The default would be whichever version of python is linked to by /usr/bin/python, and I think we could indicate a change in version with the -p flag. I don't believe that overlaps with anything else currently and is similar to virtualenv's -p flag for specifying a different version of python to use in the new env.


  3. Ian Cordasco

    Even simpler, and I think I'm only just remembering Florent Xicluna 's suggestion about this now, is the fact that modules are installed without issue on different versions of python assuming (of course) that they support that version. With that said, we could distribute flake8 as a module that could be run like python -m flake8 [options] which would allow the bash script far more freedom. The problem with the above is how horribly inconsistent that behaviour is between Python 2.5, 2.6, 2.7 and 3.x (if I remember Florent Xicluna 's complains well enough).

    Also, to elaborate on my last comment, usage of the bash script could look something like: flake8 -p3 flake8/ to get which ever version of Python 3.x is linked to /usr/bin/python3 and do flake8 -p3.3 flake8 for more specific control over which one exactly is used. Naturally, /usr/bin won't be assumed for all installations either.

    The only issue with this is the question of what then happens to Windows users.

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.