Skip to content

Commit

Permalink
Making plural "extensions" singular.
Browse files Browse the repository at this point in the history
The pluralization comes from many releases past when there was
a 1-1 mapping between binary extension modules and Fortran
submodules.
  • Loading branch information
dhermes committed Jan 8, 2020
1 parent 8484579 commit 00c1e61
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 45 deletions.
22 changes: 11 additions & 11 deletions DEVELOPMENT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ variable:
Using ``distutils`` and ``numpy.distutils`` to compile Fortran is not
"fully-supported" (i.e. the tooling is ad-hoc). As a result, there is a
decent amount of code in ``setup.py``, ``setup_helpers.py``,
``setup_helpers_macos.py`` and ``setup_helpers_windows.py`` to specify the build
process. To make sure these are working as expected, it's possible to
track **how** extensions are being installed. To actually make sure the
``setup_helpers_macos.py`` and ``setup_helpers_windows.py`` to specify the
build process. To make sure these are working as expected, it's possible to
track **how** the extension is being installed. To actually make sure the
correct compiler commands are invoked, provide a filename as the
``BEZIER_JOURNAL`` environment variable and then the commands invoked will
be written there:
Expand All @@ -69,7 +69,7 @@ be written there:
$ BEZIER_JOURNAL=$(pwd)/journal.txt python setup.py build_ext --inplace
The ``nox`` session ``check_journal`` uses this journaling option to verify
the commands used to compile the extensions in Linux on `CircleCI`_, in
the commands used to compile the extension in Linux on `CircleCI`_, in
macOS on `Travis CI`_ and in Windows on `AppVeyor`_.

As the build complexity grows, it may make more sense to transition the steps
Expand All @@ -78,12 +78,12 @@ out of Python and into `CMake`_, `SCons`_ or another build tool.
.. _CMake: https://cmake.org
.. _SCons: http://scons.org

To explicitly disable the building of extensions, the ``BEZIER_NO_EXTENSIONS``
environment variable can be used:
To explicitly disable the building of the extension, the
``BEZIER_NO_EXTENSION`` environment variable can be used:

.. code-block:: console
$ BEZIER_NO_EXTENSIONS=True .../bin/python -m pip install .
$ BEZIER_NO_EXTENSION=True .../bin/python -m pip install .
This environment variable is actually used for the ``nox -s docs`` session
to emulate the `RTD`_ build environment (where no Fortran compiler is
Expand Down Expand Up @@ -119,7 +119,7 @@ We recommend using `Nox`_ to run unit tests:
$ nox -s unit # Run all versions
However, `pytest`_ can be used directly (though it won't
manage dependencies or build extensions):
manage dependencies or build the binary extension):

.. code-block:: console
Expand Down Expand Up @@ -446,8 +446,8 @@ On Travis CI, Matthew Brett's `multibuild`_ is used to install "official"
python.org CPython binaries for macOS. Then tests are run in 64-bit
mode (NumPy has `discontinued`_ 32-bit support).

On AppVeyor, all extensions are built and tested with both 32-bit and 64-bit
Python binaries.
On AppVeyor, the binary extension is built and tested with both 32-bit and
64-bit Python binaries.

.. _CircleCI: https://circleci.com/gh/dhermes/bezier
.. _Travis CI: https://travis-ci.org/dhermes/bezier
Expand Down Expand Up @@ -532,7 +532,7 @@ This project uses environment variables for building the
- ``BEZIER_JOURNAL``: If set to a path on the filesystem, all compiler
commands executed while building the binary extension will be logged to
the journal file
- ``BEZIER_NO_EXTENSIONS``: If set, this will indicate that only the pure
- ``BEZIER_NO_EXTENSION``: If set, this will indicate that only the pure
Python package should be built and installed (i.e. without the binary
extension).
- ``BEZIER_WHEEL``: Indicates that the source is being built into a wheel.
Expand Down
22 changes: 11 additions & 11 deletions DEVELOPMENT.rst.template
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ variable:
Using ``distutils`` and ``numpy.distutils`` to compile Fortran is not
"fully-supported" (i.e. the tooling is ad-hoc). As a result, there is a
decent amount of code in ``setup.py``, ``setup_helpers.py``,
``setup_helpers_macos.py`` and ``setup_helpers_windows.py`` to specify the build
process. To make sure these are working as expected, it's possible to
track **how** extensions are being installed. To actually make sure the
``setup_helpers_macos.py`` and ``setup_helpers_windows.py`` to specify the
build process. To make sure these are working as expected, it's possible to
track **how** the extension is being installed. To actually make sure the
correct compiler commands are invoked, provide a filename as the
``BEZIER_JOURNAL`` environment variable and then the commands invoked will
be written there:
Expand All @@ -69,7 +69,7 @@ be written there:
$ BEZIER_JOURNAL=$(pwd)/journal.txt python setup.py build_ext --inplace

The ``nox`` session ``check_journal`` uses this journaling option to verify
the commands used to compile the extensions in Linux on `CircleCI`_, in
the commands used to compile the extension in Linux on `CircleCI`_, in
macOS on `Travis CI`_ and in Windows on `AppVeyor`_.

As the build complexity grows, it may make more sense to transition the steps
Expand All @@ -78,12 +78,12 @@ out of Python and into `CMake`_, `SCons`_ or another build tool.
.. _CMake: https://cmake.org
.. _SCons: http://scons.org

To explicitly disable the building of extensions, the ``BEZIER_NO_EXTENSIONS``
environment variable can be used:
To explicitly disable the building of the extension, the
``BEZIER_NO_EXTENSION`` environment variable can be used:

.. code-block:: console

$ BEZIER_NO_EXTENSIONS=True .../bin/python -m pip install .
$ BEZIER_NO_EXTENSION=True .../bin/python -m pip install .

This environment variable is actually used for the ``nox -s docs`` session
to emulate the `RTD`_ build environment (where no Fortran compiler is
Expand Down Expand Up @@ -119,7 +119,7 @@ We recommend using `Nox`_ to run unit tests:
$ nox -s unit # Run all versions

However, `pytest`_ can be used directly (though it won't
manage dependencies or build extensions):
manage dependencies or build the binary extension):

.. code-block:: console

Expand Down Expand Up @@ -446,8 +446,8 @@ On Travis CI, Matthew Brett's `multibuild`_ is used to install "official"
python.org CPython binaries for macOS. Then tests are run in 64-bit
mode (NumPy has `discontinued`_ 32-bit support).

On AppVeyor, all extensions are built and tested with both 32-bit and 64-bit
Python binaries.
On AppVeyor, the binary extension is built and tested with both 32-bit and
64-bit Python binaries.

.. _CircleCI: https://circleci.com/gh/dhermes/bezier
.. _Travis CI: https://travis-ci.org/dhermes/bezier
Expand Down Expand Up @@ -532,7 +532,7 @@ This project uses environment variables for building the
- ``BEZIER_JOURNAL``: If set to a path on the filesystem, all compiler
commands executed while building the binary extension will be logged to
the journal file
- ``BEZIER_NO_EXTENSIONS``: If set, this will indicate that only the pure
- ``BEZIER_NO_EXTENSION``: If set, this will indicate that only the pure
Python package should be built and installed (i.e. without the binary
extension).
- ``BEZIER_WHEEL``: Indicates that the source is being built into a wheel.
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ The ``bezier`` Python package can be installed with `pip`_:
$ python -m pip install --upgrade bezier
$ python3.8 -m pip install --upgrade bezier
To install a pure Python version (i.e. with no binary extensions):
To install a pure Python version (i.e. with no binary extension):

.. code-block:: console
$ BEZIER_NO_EXTENSIONS=true \
$ BEZIER_NO_EXTENSION=true \
> python -m pip install --upgrade bezier --no-binary=bezier
``bezier`` is open-source, so you can alternatively grab the source
Expand Down
4 changes: 2 additions & 2 deletions README.rst.release.template
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ The ``bezier`` Python package can be installed with `pip`_:
$ python -m pip install --upgrade bezier
$ python3.8 -m pip install --upgrade bezier

To install a pure Python version (i.e. with no binary extensions):
To install a pure Python version (i.e. with no binary extension):

.. code-block:: console

$ BEZIER_NO_EXTENSIONS=true \
$ BEZIER_NO_EXTENSION=true \
> python -m pip install --upgrade bezier --no-binary=bezier

``bezier`` is open-source, so you can alternatively grab the source
Expand Down
4 changes: 2 additions & 2 deletions README.rst.template
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ The ``bezier`` Python package can be installed with `pip`_:
$ python -m pip install --upgrade bezier
$ python3.8 -m pip install --upgrade bezier

To install a pure Python version (i.e. with no binary extensions):
To install a pure Python version (i.e. with no binary extension):

.. code-block:: console

$ BEZIER_NO_EXTENSIONS=true \
$ BEZIER_NO_EXTENSION=true \
> python -m pip install --upgrade bezier --no-binary=bezier

``bezier`` is open-source, so you can alternatively grab the source
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ The ``bezier`` Python package can be installed with `pip`_:
$ python -m pip install --upgrade bezier
$ python3.8 -m pip install --upgrade bezier
To install a pure Python version (i.e. with no binary extensions):
To install a pure Python version (i.e. with no binary extension):

.. code-block:: console
$ BEZIER_NO_EXTENSIONS=true \
$ BEZIER_NO_EXTENSION=true \
> python -m pip install --upgrade bezier --no-binary=bezier
``bezier`` is open-source, so you can alternatively grab the source
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst.release.template
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ The ``bezier`` Python package can be installed with `pip`_:
$ python -m pip install --upgrade bezier
$ python3.8 -m pip install --upgrade bezier

To install a pure Python version (i.e. with no binary extensions):
To install a pure Python version (i.e. with no binary extension):

.. code-block:: console

$ BEZIER_NO_EXTENSIONS=true \
$ BEZIER_NO_EXTENSION=true \
> python -m pip install --upgrade bezier --no-binary=bezier

``bezier`` is open-source, so you can alternatively grab the source
Expand Down
2 changes: 1 addition & 1 deletion docs/releases/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Documentation
-------------

- Updating install instructions to show how to disable the binary extension
via ``BEZIER_NO_EXTENSIONS``
via ``BEZIER_NO_EXTENSION``
(`6262594 <https://github.com/dhermes/bezier/commit/626259493997a9d83924d100900189f32b87e6c5>`__).
Fixed `#147 <https://github.com/dhermes/bezier/issues/147>`__.
- Adding "Citation" section to landing page
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def docs(session):
# Install all dependencies.
session.install(*DOCS_DEPS)
# Install this package.
install_bezier(session, env={"BEZIER_NO_EXTENSIONS": "True"})
install_bezier(session, env={"BEZIER_NO_EXTENSION": "True"})
# Run the script for building docs.
command = get_path("scripts", "build_docs.sh")
session.run(command, external=True)
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This repository is intended to be used as a fully-functional environment for installing / running / testing `bezier`. Provides:

- CPython 3.6, 3.7, 3.8 and PyPy 3.6 (version 7.2.0)
- NumPy pre-installed (needed for installing extensions)
- NumPy pre-installed (needed for installing the binary extension)
- `/wheelhouse` directory with NumPy and SciPy pre-built for PyPy 3
- `gfortran` compiler
- `nox` test runner
Expand Down
6 changes: 3 additions & 3 deletions scripts/docker/bezier.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RUN python3.8 -m pip install --no-cache-dir \
"py == 1.8.1" \
"virtualenv == 16.7.9"

# Install `gfortran` (for Fortran extensions), `libatlas-base-dev`,
# `libblas-dev`, `liblapack-dev` (for SciPy) and `lcov` for
# Fortran code coverage.
# Install `gfortran` (for building the Fortran code used by the binary
# extension), `libatlas-base-dev`, `libblas-dev`, `liblapack-dev` (for SciPy)
# and `lcov` for Fortran code coverage.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gfortran \
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
MISSING_F90_MESSAGE = """\
No Fortran 90 compiler found.
Skipping Fortran extension speedups.
Skipping Fortran speedups via binary extension module.
"""
NO_EXTENSIONS_ENV = "BEZIER_NO_EXTENSIONS"
NO_EXTENSION_ENV = "BEZIER_NO_EXTENSION"
NO_SPEEDUPS_MESSAGE = """\
The {} environment variable has been used to explicitly disable the
building of extension modules.
building of the binary extension module.
""".format(
NO_EXTENSIONS_ENV
NO_EXTENSION_ENV
)
REQUIREMENTS = ("numpy >= 1.18.1",)
EXTRAS_REQUIRE = {}
Expand All @@ -70,7 +70,7 @@ def require_numpy():


def extension_modules():
if NO_EXTENSIONS_ENV in os.environ:
if NO_EXTENSION_ENV in os.environ:
print(NO_SPEEDUPS_MESSAGE, file=sys.stderr)
return []

Expand Down
4 changes: 2 additions & 2 deletions setup_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
JOURNAL_ENV = "BEZIER_JOURNAL"
"""Environment variable to specify a text file for saving compiler commands.
Can be used to determine how extension modules were compiled. This can be
useful, for example, to track changes across different systems or simple
Can be used to determine how the binary extension was compiled. This can be
useful, for example, to track changes across different systems or simply
to make sure the build is occurring as expected.
"""
QUADPACK_DIR = "quadpack"
Expand Down

0 comments on commit 00c1e61

Please sign in to comment.