Skip to content

Commit

Permalink
BUG: fix typo in MACOSX_DEPLOYMENT_TARGET environment variable name
Browse files Browse the repository at this point in the history
The X got lost in the big refactoring in #202.
  • Loading branch information
stefanv authored and dnicolodi committed Feb 15, 2023
1 parent 868806a commit a500136
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/reference/environment-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Environment variables
Please check our :ref:`how-to-guides-editable-installs` guide for more
information on how to use it.

* - ``MACOS_DEPLOYMENT_TARGET``
* - ``MACOSX_DEPLOYMENT_TARGET``
- Specify the target macOS version.

If ``MACOSX_DEPLOYMENT_TARGET`` is set, we will use the selected version
Expand Down
4 changes: 2 additions & 2 deletions mesonpy/_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def _get_macosx_platform_tag() -> str:
pass

# Override the macOS version if one is provided via the
# MACOS_DEPLOYMENT_TARGET environment variable.
# MACOSX_DEPLOYMENT_TARGET environment variable.
try:
version = tuple(map(int, os.environ.get('MACOS_DEPLOYMENT_TARGET', '').split('.')))[:2]
version = tuple(map(int, os.environ.get('MACOSX_DEPLOYMENT_TARGET', '').split('.')))[:2]
except ValueError:
version = tuple(map(int, ver.split('.')))[:2]

Expand Down
4 changes: 2 additions & 2 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def test_wheel_tag():
@pytest.mark.skipif(platform.system() != 'Darwin', reason='macOS specific test')
def test_macos_platform_tag(monkeypatch):
for minor in range(9, 16):
monkeypatch.setenv('MACOS_DEPLOYMENT_TARGET', f'10.{minor}')
monkeypatch.setenv('MACOSX_DEPLOYMENT_TARGET', f'10.{minor}')
assert next(packaging.tags.mac_platforms((10, minor))) == mesonpy._tags.get_platform_tag()
for major in range(11, 20):
for minor in range(3):
monkeypatch.setenv('MACOS_DEPLOYMENT_TARGET', f'{major}.{minor}')
monkeypatch.setenv('MACOSX_DEPLOYMENT_TARGET', f'{major}.{minor}')
assert next(packaging.tags.mac_platforms((major, minor))) == mesonpy._tags.get_platform_tag()


Expand Down

0 comments on commit a500136

Please sign in to comment.