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

virtualenv.link_scripts is still referenced in Python-for-Formula-Authors.md #2740

Closed
mbroomfield-r7 opened this issue Jun 6, 2017 · 4 comments

Comments

@mbroomfield-r7
Copy link

I'd submit a PR but I wouldn't know how to address the comments around the link_scripts usage.

@MikeMcQuaid
Copy link
Member

Can you add a bit more detail here? Thanks!

@MikeMcQuaid
Copy link
Member

Also CC @tdsmith.

@mbroomfield-r7
Copy link
Author

mbroomfield-r7 commented Jun 6, 2017

Search for

def install
  # Create a virtualenv in `libexec`. If your app needs Python 3, make sure that
  # `depends_on :python3` is declared, and use `virtualenv_create(libexec, "python3")`.
  venv = virtualenv_create(libexec)
  # Install all of the resources declared on the formula into the virtualenv.
  venv.pip_install resources
  # `link_scripts` takes a look at the virtualenv's bin directory before and
  # after executing the block which is passed into it. If the block caused any
  # new scripts to be written to the virtualenv's bin directory, link_scripts
  # will symlink those scripts into the path given as its argument (here, the
  # formula's `bin` directory in the Cellar.)
  # `pip_install buildpath` will install the package that the formula points to,
  # because buildpath is the location where the formula's tarball was unpacked.
  venv.link_scripts(bin) { venv.pip_install buildpath }
end

In the file Python-for-Formula-Authors.md

Notice the use of venv.link_scripts. This method is out of date and was recently replaced.

I'd simply submit a PR instead of an issue, but I do not feel comfortable updating the comments which explain the usage of link_scripts.

This commit removes some references, but left some still in the documentation:
43e38df

@MikeMcQuaid
Copy link
Member

CC @tdsmith again as I'm not sure what the correct usage is here.

tdsmith added a commit to tdsmith/brew that referenced this issue Jun 15, 2017
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants