aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-07-09 21:13:43 +0100
committerGitHub2017-07-09 21:13:43 +0100
commit4cb839132d75ab3342579de47bdc40d98cdf7076 (patch)
tree9a3258d07004b59c5682bb3e1f50279b85f91491
parenteb02612393e961bbf023ca646b43c065a401718f (diff)
parent491bb469e75c772d897c29645453a0988a1c7a4a (diff)
downloadbrew-4cb839132d75ab3342579de47bdc40d98cdf7076.tar.bz2
Merge pull request #2869 from alsemyonov/patch-1
Add example links in “Python for Formula Authors”
-rw-r--r--docs/Python-for-Formula-Authors.md8
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/Python-for-Formula-Authors.md b/docs/Python-for-Formula-Authors.md
index 8b4bc2cb4..5b9d6ced6 100644
--- a/docs/Python-for-Formula-Authors.md
+++ b/docs/Python-for-Formula-Authors.md
@@ -2,13 +2,13 @@
This document explains how to successfully use Python in a Homebrew formula.
-Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are `ansible` and `jrnl`.
+Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are [`ansible`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansible.rb) and [`jrnl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/jrnl.rb).
-Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful from a Terminal.app command line. Examples of libraries are `py2cairo` and the bindings that are installed by `protobuf --with-python`.
+Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful from a Terminal.app command line. Examples of libraries are [`py2cairo`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/py2cairo.rb) and the bindings that are installed by [`protobuf --with-python`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/protobuf.rb).
Bindings are a special case of libraries that allow Python code to interact with a library or application implemented in another language.
-Homebrew is happy to accept applications that are built in Python, whether the apps are available from PyPI or not. Homebrew generally won't accept libraries that can be installed correctly with `pip install foo`. Libraries that can be `pip`-installed but have several Homebrew dependencies may be appropriate for the [homebrew/python](https://github.com/Homebrew/homebrew-python) tap. Bindings may be installed for packages that provide them, especially if equivalent functionality isn't available through pip.
+Homebrew is happy to accept applications that are built in Python, whether the apps are available from PyPI or not. Homebrew generally won't accept libraries that can be installed correctly with `pip install foo`. Bindings may be installed for packages that provide them, especially if equivalent functionality isn't available through pip.
## Running `setup.py`
@@ -40,8 +40,6 @@ If you submit a formula with this syntax to core, you may be asked to rewrite it
## Applications
-`ansible.rb` and `jrnl.rb` are good examples of applications that follow this advice.
-
### Python declarations
Applications that are compatible with Python 2 **should** use the Apple-provided system Python in `/usr/bin` on systems that provide Python 2.7. To do this, declare: