-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust various maintainer and contributor-focused documents after recent maintainer conversations and generally anything I noticed was wrong or outdated as I went through these.
- Loading branch information
1 parent
ab6a7ed
commit ae94d9e
Showing
6 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Python libraries exist to be imported by other Python modules; they are often de | |
|
||
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`. 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. Similarly, libraries that have non-trivial amounts of native code and have a long compilation as a result can be good candidates. If in doubt, though: do not package libraries. | ||
|
||
Applications should unconditionally bundle all their Python-language dependencies and libraries and should install any unsatisfied dependencies; these strategies are discussed in depth in the following sections. | ||
|
||
|
@@ -18,8 +18,6 @@ Applications should unconditionally bundle all their Python-language dependencie | |
|
||
Formulae for apps that require Python 3 **should** declare an unconditional dependency on `"[email protected]"`. These apps **must** work with the current Homebrew Python 3.x formula. | ||
|
||
Applications that are compatible with Python 2 **should** use the Apple-provided system Python in `/usr/bin` on systems that provide Python 2.7. No explicit Python dependency is needed since `/usr/bin` is always in `PATH` for Homebrew formulae. | ||
|
||
### Installing applications | ||
|
||
Applications should be installed into a Python [virtualenv](https://virtualenv.pypa.io/en/stable/) environment rooted in `libexec`. This prevents the app's Python modules from contaminating the system `site-packages` and vice versa. | ||
|
@@ -119,8 +117,6 @@ in case you need to do different things for different resources. | |
|
||
To add bindings for Python 3, please add `depends_on "[email protected]"` to work with the current Homebrew Python 3.x formula. | ||
|
||
Build Python 2 bindings with the system Python by default (don't add an option) and they should be usable with any binary-compatible Python. If that isn't the case, it's an upstream bug; [here's some advice for resolving it](https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/). | ||
|
||
### Dependencies for bindings | ||
|
||
Bindings should follow the same advice for Python module dependencies as libraries; see below for more. | ||
|
@@ -147,11 +143,11 @@ Sometimes we have to edit a `Makefile` on-the-fly to use our prefix for the Pyth | |
|
||
## Libraries | ||
|
||
### Python declarations for libraries | ||
Remember: there are very limited cases for libraries (e.g. significant amounts of native code is compiled) so, if in doubt, do not package them. | ||
|
||
Libraries built for Python 3 should include `depends_on "[email protected]"`, which will bottle against Homebrew's Python 3.x. Python 2.x libraries must function when they are installed against either the system Python or brewed Python. | ||
### Python declarations for libraries | ||
|
||
Python 2 libraries need a `uses_from_macos "python@2"` declaration; they will be built with the system Python, but should still be usable with any other Python 2.7. If not, it's an upstream bug; [here's some advice for resolving it](https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/). | ||
Libraries built for Python 3 should include `depends_on "python@3.x"`, which will bottle against Homebrew's Python 3.x. | ||
|
||
### Installing libraries | ||
|
||
|