Skip to content
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

Being able to install packages #222

Open
facundobatista opened this issue Jul 21, 2016 · 2 comments
Open

Being able to install packages #222

facundobatista opened this issue Jul 21, 2016 · 2 comments
Milestone

Comments

@facundobatista
Copy link
Member

We've been talking a lot with @sils1297 about the best way for a project developer to tell their users to install a package without having to care about virtualenvs, and we found the best way would be to have an option like:

    sudo fades --install=mypackage

In this case, fades would:

  • create a virtualenv, as usual (even reuse one if already has it!)
    • note1: user could do --install=mypackage==1.3
    • note2: or even do --install=mypackage=1.3 -d dep1 -d dep2 (but we really expect that 'mypackage' would have dependencies already defined at setup.py, directly usable by pip)
  • find out the scripts or entry-points defined in mypackage (possibly exploring mypackage's setup.py manually); these scripts/entrypoints were handled properly by setuptools in the virtualenv (it just copies the scripts, or create specific .py for the entry points)
  • copy those scripts to the same system path from where 'fades' is being executed (which AFAIK it would be the better way to know, in a sane multiplatformly way) which is the default system path)

Let's see for example what would happen with a sample project, 'coala':

  • you'll do: sudo fades --install=coala
  • it will create a virtualenv, install coala there, and you'll see how setuptools created scripts for coala's entry points:
    $ ls -l ~/.local/share/fades/d9127346-8e11-4731-a9ef-fd9763c5b851/bin/
    total 56
    ...
    -rwxrwxr-x 1 facundo facundo  278 jul 21 11:44 coala
    -rwxrwxr-x 1 facundo facundo  281 jul 21 11:44 coala-ci
    -rwxrwxr-x 1 facundo facundo  283 jul 21 11:44 coala-dbus
    -rwxrwxr-x 1 facundo facundo  290 jul 21 11:44 coala-delete-orig
    -rwxrwxr-x 1 facundo facundo  285 jul 21 11:44 coala-format
    -rwxrwxr-x 1 facundo facundo  283 jul 21 11:44 coala-json
    ...
  • fades would copy those scripts to /usr/bin because...
    $ which fades
    /usr/bin/fades
@sils
Copy link

sils commented Jul 21, 2016

From a usability POV I'd rather prefer if you'd use subcommands: fades install coala, without --. On the long run it'll bite you if you don't. (It's biting us :P)

@facundobatista
Copy link
Member Author

Do we need this functionality in fades, existing pipsi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants