Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Suggest homebrew-pypi-poet instead of mkpydeps
Browse files Browse the repository at this point in the history
  • Loading branch information
tdsmith committed Feb 5, 2015
1 parent b50bbb1 commit a2e0b75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion share/doc/homebrew/Python-for-Formula-Authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ The first line copies all of the executables to bin. The second line writes stub

All Python dependencies of applications that are not packaged by Homebrew (and those dependencies' Python dependencies, recursively) **should** be unconditionally downloaded as `Resource`s and installed into the application keg's `libexec/"vendor"` path. This prevents the state of the system Python packages from being affected by installing an app with Homebrew and guarantees that apps use versions of their dependencies that are known to work together. `libexec/"vendor"` is preferred to `libexec` so that formulæ don't accidentally install executables belonging to their dependencies, which can cause linking conflicts.

Each dependency **should** be explicitly installed; please do not rely on setup.py or pip to perform automatic dependency resolution, for the [reasons described here](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Acceptable-Formulae.md#we-dont-like-install-scripts-that-download-things). This [mkpydeps script](https://github.com/tdsmith/labmisc/blob/master/mkpydeps) may help you generate resource stanzas; to use it, `pip install tl.eggdeps`, install your package with e.g. `pip install foo`, and run `mkpydeps foo` to generate resource stanzas for each of your package's (recursive) dependencies. The resource stanzas are not printed in any useful order. Consult `eggdeps foo` to view your module's dependency graph to decide how to order the resources; the most deeply indented packages should be listed first.
Each dependency **should** be explicitly installed; please do not rely on setup.py or pip to perform automatic dependency resolution, for the [reasons described here](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Acceptable-Formulae.md#we-dont-like-install-scripts-that-download-things).

You can use [homebrew-pypi-poet](https://pypi.python.org/pypi/homebrew-pypi-poet) to help you write resource stanzas. To use it, set up a virtualenv and install your package and all its dependencies. Then, `pip install homebrew-pypi-poet` into the same virtualenv. `poet -f foo` will draft a complete formula for you, or `poet foo` will just generate the resource stanzas.

Set `PYTHONPATH` to include the `libexec/"vendor"` site-packages path with:
```ruby
Expand Down

1 comment on commit a2e0b75

@youtux
Copy link
Contributor

@youtux youtux commented on a2e0b75 Feb 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

Please sign in to comment.