-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change: Mac OS X -> macOS #2062
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ setuptools.egg-info | |
.cache | ||
.idea/ | ||
.pytest_cache/ | ||
.mypy_cache/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Change 'Mac OS X' to 'macOS' in code. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,10 +179,10 @@ def get_supported_platform(): | |
"""Return this platform's maximum compatible version. | ||
|
||
distutils.util.get_platform() normally reports the minimum version | ||
of Mac OS X that would be required to *use* extensions produced by | ||
of macOS that would be required to *use* extensions produced by | ||
distutils. But what we want when checking compatibility is to know the | ||
version of Mac OS X that we are *running*. To allow usage of packages that | ||
explicitly require a newer version of Mac OS X, we must also know the | ||
version of macOS that we are *running*. To allow usage of packages that | ||
explicitly require a newer version of macOS, we must also know the | ||
current version of the OS. | ||
|
||
If this condition occurs for any other platform with a version in its | ||
|
@@ -192,9 +192,9 @@ def get_supported_platform(): | |
m = macosVersionString.match(plat) | ||
if m is not None and sys.platform == "darwin": | ||
try: | ||
plat = 'macosx-%s-%s' % ('.'.join(_macosx_vers()[:2]), m.group(3)) | ||
plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3)) | ||
except ValueError: | ||
# not Mac OS X | ||
# not macOS | ||
pass | ||
return plat | ||
|
||
|
@@ -365,7 +365,7 @@ def get_provider(moduleOrReq): | |
return _find_adapter(_provider_factories, loader)(module) | ||
|
||
|
||
def _macosx_vers(_cache=[]): | ||
def _macos_vers(_cache=[]): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While we're at it, let's rename these to |
||
if not _cache: | ||
version = platform.mac_ver()[0] | ||
# fallback for MacPorts | ||
|
@@ -381,26 +381,26 @@ def _macosx_vers(_cache=[]): | |
return _cache[0] | ||
|
||
|
||
def _macosx_arch(machine): | ||
def _macos_arch(machine): | ||
return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine) | ||
|
||
|
||
def get_build_platform(): | ||
"""Return this platform's string for platform-specific distributions | ||
|
||
XXX Currently this is the same as ``distutils.util.get_platform()``, but it | ||
needs some hacks for Linux and Mac OS X. | ||
needs some hacks for Linux and macOS. | ||
""" | ||
from sysconfig import get_platform | ||
|
||
plat = get_platform() | ||
if sys.platform == "darwin" and not plat.startswith('macosx-'): | ||
try: | ||
version = _macosx_vers() | ||
version = _macos_vers() | ||
machine = os.uname()[4].replace(" ", "_") | ||
return "macosx-%d.%d-%s" % ( | ||
int(version[0]), int(version[1]), | ||
_macosx_arch(machine), | ||
_macos_arch(machine), | ||
) | ||
except ValueError: | ||
# if someone is running a non-Mac darwin system, this will fall | ||
|
@@ -426,7 +426,7 @@ def compatible_platforms(provided, required): | |
# easy case | ||
return True | ||
|
||
# Mac OS X special cases | ||
# macOS special cases | ||
reqMac = macosVersionString.match(required) | ||
if reqMac: | ||
provMac = macosVersionString.match(provided) | ||
|
@@ -435,15 +435,15 @@ def compatible_platforms(provided, required): | |
if not provMac: | ||
# this is backwards compatibility for packages built before | ||
# setuptools 0.6. All packages built after this point will | ||
# use the new macosx designation. | ||
# use the new macOS designation. | ||
provDarwin = darwinVersionString.match(provided) | ||
if provDarwin: | ||
dversion = int(provDarwin.group(1)) | ||
macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2)) | ||
if dversion == 7 and macosversion >= "10.3" or \ | ||
dversion == 8 and macosversion >= "10.4": | ||
return True | ||
# egg isn't macosx or legacy darwin | ||
# egg isn't macOS or legacy darwin | ||
return False | ||
|
||
# are they the same major version and machine type? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,9 @@ | |
See <http://github.com/ActiveState/appdirs> for details and usage. | ||
""" | ||
# Dev Notes: | ||
# - MSDN on where to store app data files: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert anything in _vendor. These files are maintained upstream. You'll want to contribute this change to the upstream package. |
||
# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120 | ||
# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html | ||
# - XDG spec for Un*x: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html | ||
# - MSDN on where to store app data files: (TODO: needs new link) | ||
# - macOS: (TODO: needs new link) | ||
# - XDG spec for Un*x: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html | ||
|
||
__version_info__ = (1, 4, 3) | ||
__version__ = '.'.join(map(str, __version_info__)) | ||
|
@@ -64,7 +63,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False): | |
for a discussion of issues. | ||
|
||
Typical user data directories are: | ||
Mac OS X: ~/Library/Application Support/<AppName> | ||
macOS: ~/Library/Application Support/<AppName> | ||
Unix: ~/.local/share/<AppName> # or in $XDG_DATA_HOME, if defined | ||
Win XP (not roaming): C:\Documents and Settings\<username>\Application Data\<AppAuthor>\<AppName> | ||
Win XP (roaming): C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName> | ||
|
@@ -118,7 +117,7 @@ def site_data_dir(appname=None, appauthor=None, version=None, multipath=False): | |
if XDG_DATA_DIRS is not set | ||
|
||
Typical site data directories are: | ||
Mac OS X: /Library/Application Support/<AppName> | ||
macOS: /Library/Application Support/<AppName> | ||
Unix: /usr/local/share/<AppName> or /usr/share/<AppName> | ||
Win XP: C:\Documents and Settings\All Users\Application Data\<AppAuthor>\<AppName> | ||
Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) | ||
|
@@ -185,7 +184,7 @@ def user_config_dir(appname=None, appauthor=None, version=None, roaming=False): | |
for a discussion of issues. | ||
|
||
Typical user config directories are: | ||
Mac OS X: same as user_data_dir | ||
macOS: same as user_data_dir | ||
Unix: ~/.config/<AppName> # or in $XDG_CONFIG_HOME, if defined | ||
Win *: same as user_data_dir | ||
|
||
|
@@ -223,7 +222,7 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False) | |
returned, or '/etc/xdg/<AppName>', if XDG_CONFIG_DIRS is not set | ||
|
||
Typical site config directories are: | ||
Mac OS X: same as site_data_dir | ||
macOS: same as site_data_dir | ||
Unix: /etc/xdg/<AppName> or $XDG_CONFIG_DIRS[i]/<AppName> for each value in | ||
$XDG_CONFIG_DIRS | ||
Win *: same as site_data_dir | ||
|
@@ -273,7 +272,7 @@ def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True): | |
discussion below. | ||
|
||
Typical user cache directories are: | ||
Mac OS X: ~/Library/Caches/<AppName> | ||
macOS: ~/Library/Caches/<AppName> | ||
Unix: ~/.cache/<AppName> (XDG default) | ||
Win XP: C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Cache | ||
Vista: C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>\Cache | ||
|
@@ -333,7 +332,7 @@ def user_state_dir(appname=None, appauthor=None, version=None, roaming=False): | |
for a discussion of issues. | ||
|
||
Typical user state directories are: | ||
Mac OS X: same as user_data_dir | ||
macOS: same as user_data_dir | ||
Unix: ~/.local/state/<AppName> # or in $XDG_STATE_HOME, if defined | ||
Win *: same as user_data_dir | ||
|
||
|
@@ -372,7 +371,7 @@ def user_log_dir(appname=None, appauthor=None, version=None, opinion=True): | |
base cache dir for Unix. See discussion below. | ||
|
||
Typical user log directories are: | ||
Mac OS X: ~/Library/Logs/<AppName> | ||
macOS: ~/Library/Logs/<AppName> | ||
Unix: ~/.cache/<AppName>/log # or under $XDG_CACHE_HOME if defined | ||
Win XP: C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Logs | ||
Vista: C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>\Logs | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to change the entries in the changelog? After all, at the time, it was called OS X.