Skip to content

Commit

Permalink
macOS Homebrew and developer installation.
Browse files Browse the repository at this point in the history
This commit documents Homebrew-based installation of `beartype` on
macOS, again thanks entirely to duck-loving MacPorts Portfile maintainer
@harens. Relatedly, this commit also adds developer-specific
instructions for forking, and installing, and modifying `beartype` in a
live manner. (*Unceremonious cerebellum!*)
  • Loading branch information
leycec committed Jan 27, 2021
1 parent e0632fe commit e6784ba
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
34 changes: 24 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,21 @@ Let's install ``beartype`` with Anaconda_, because corporate standards are
macOS
-----

Let's install ``beartype`` with MacPorts_ on macOS_, because HomeBrew_ `hates
packaging Python packages <HomeBrew Python packaging_>`__, because they
secretly want you to use MacPorts_ instead – which you should do:
Let's install ``beartype`` with Homebrew_ on macOS_ courtesy `our third-party
tap <beartype Homebrew_>`__:

.. code-block:: shell-session
brew install beartype/beartype/beartype
Let's install ``beartype`` with MacPorts_ on macOS_:

.. code-block:: shell-session
sudo port install py-beartype
Thanks to `MacPorts maintainer @harens <harens_>`__ for `packaging beartype for
our macOS audience <beartype MacPorts_>`__!
Thanks to `macOS package maintainer @harens <harens_>`__ for `packaging
beartype for our Apple-appreciating audience <beartype MacPorts_>`__!

Linux
-----
Expand Down Expand Up @@ -865,6 +870,8 @@ Let's chart current and future compliance with Python's `typing`_ landscape:
+------------------+-----------------------------------------+-------------------------------+---------------------------+
| | `Gentoo Linux <beartype Gentoo_>`__ | **0.2.0**\ \ *current* ||
+------------------+-----------------------------------------+-------------------------------+---------------------------+
| | `macOS Homebrew <beartype Homebrew_>`__ | **0.5.1**\ \ *current* ||
+------------------+-----------------------------------------+-------------------------------+---------------------------+
| | `macOS MacPorts <beartype MacPorts_>`__ | **0.5.1**\ \ *current* ||
+------------------+-----------------------------------------+-------------------------------+---------------------------+
| Python | 3.5 | **0.1.0**\ \ **0.3.0** ||
Expand Down Expand Up @@ -2260,9 +2267,16 @@ And thanks for merely reading this! Like all open-source software, ``beartype``
thrives on community contributions, activity, and interest. *This means you,
stalwart Python hero.*

``beartype`` has two problem spots (listed below in order of decreasing
importance and increasing complexity) that could *always* benefit from a
volunteer army of good GitHub Samaritans. Let's take this from the top.
``beartype`` has `two problem spots (listed below in order of decreasing
importance and increasing complexity) <Moar Depth_>`__ that could *always*
benefit from a volunteer army of good GitHub Samaritans.

Workflow
--------

Let's take this from the top.

#. Create a [GitHub user account]().

Moar Depth
----------
Expand Down Expand Up @@ -2536,6 +2550,8 @@ application stack at tool rather than Python runtime) include:
https://anaconda.org/conda-forge/beartype
.. _beartype Gentoo:
https://github.com/leycec/raiagent
.. _beartype Homebrew:
github.com/beartype/homebrew-beartype
.. _beartype MacPorts:
https://ports.macports.org/port/py-beartype
.. _beartype PyPI:
Expand Down Expand Up @@ -2636,8 +2652,6 @@ application stack at tool rather than Python runtime) include:
https://en.wikipedia.org/wiki/MacOS
.. _HomeBrew:
https://brew.sh
.. _HomeBrew Python packaging:
https://github.com/numpy/numpy/issues/11454#issuecomment-401423500
.. _MacPorts:
https://www.macports.org

Expand Down
11 changes: 4 additions & 7 deletions beartype/_util/cache/pool/utilcachepoollistfixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
'''

# ....................{ CLASSES }....................
#FIXME: Override the superclass:
#
#* __reduce_ex__() dunder method to pickle this fixed list. Avoid defining the
# __reduce__() dunder method, which has been entirely obsoleted by
# __reduce_ex__().
class FixedList(list):
'''
**Fixed list** (i.e., :class:`list` constrained to a fixed length defined
Expand All @@ -63,8 +58,10 @@ class FixedList(list):
'''

# ..................{ CLASS VARIABLES }..................
# Slot *ALL* instance variables defined on this object to minimize space
# and time complexity across frequently called @beartype decorations.
# Slot all instance variables defined on this object to minimize the time
# complexity of both reading and writing variables across frequently
# called @beartype decorations. Slotting has been shown to reduce read and
# write costs by approximately ~10%, which is non-trivial.
__slots__ = ()

# ..................{ INITIALIZER }..................
Expand Down

0 comments on commit e6784ba

Please sign in to comment.