Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
5d6fe655
Commit
5d6fe655
authored
May 03, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2062.
parents
3aeec3f0
8c360dfd
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
20 deletions
+31
-20
.gitignore
.gitignore
+1
-0
changelog.d/2062.change.rst
changelog.d/2062.change.rst
+1
-0
docs/history.txt
docs/history.txt
+1
-1
docs/pkg_resources.txt
docs/pkg_resources.txt
+3
-3
pkg_resources/__init__.py
pkg_resources/__init__.py
+13
-13
pkg_resources/api_tests.txt
pkg_resources/api_tests.txt
+2
-2
setuptools/package_index.py
setuptools/package_index.py
+1
-1
tools/finalize.py
tools/finalize.py
+8
-0
tox.ini
tox.ini
+1
-0
No files found.
.gitignore
View file @
5d6fe655
...
...
@@ -19,3 +19,4 @@ setuptools.egg-info
.cache
.idea/
.pytest_cache/
.mypy_cache/
changelog.d/2062.change.rst
0 → 100644
View file @
5d6fe655
Change 'Mac OS X' to 'macOS' in code.
docs/history.txt
View file @
5d6fe655
...
...
@@ -12,7 +12,7 @@ Credits
* The original design for the ``.egg`` format and the ``pkg_resources`` API was
co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first
version of ``pkg_resources``, and supplied the
OS X
operating system version
version of ``pkg_resources``, and supplied the
macOS
operating system version
compatibility algorithm.
* Ian Bicking implemented many early "creature comfort" features of
...
...
docs/pkg_resources.txt
View file @
5d6fe655
...
...
@@ -1621,7 +1621,7 @@ Platform Utilities
``get_build_platform()``
Return this platform's identifier string. For Windows, the return value
is ``"win32"``, and for
Mac OS X
it is a string of the form
is ``"win32"``, and for
macOS
it is a string of the form
``"macosx-10.4-ppc"``. All other platforms return the same uname-based
string that the ``distutils.util.get_platform()`` function returns.
This string is the minimum platform version required by distributions built
...
...
@@ -1641,7 +1641,7 @@ Platform Utilities
considered a wildcard, and the platforms are therefore compatible.
Likewise, if the platform strings are equal, they're also considered
compatible, and ``True`` is returned. Currently, the only non-equal
platform strings that are considered compatible are
Mac OS X
platform
platform strings that are considered compatible are
macOS
platform
strings with the same hardware type (e.g. ``ppc``) and major version
(e.g. ``10``) with the `provided` platform's minor version being less than
or equal to the `required` platform's minor version.
...
...
@@ -1674,7 +1674,7 @@ File/Path Utilities
the same filesystem location if they have equal ``normalized_path()``
values. Specifically, this is a shortcut for calling ``os.path.realpath``
and ``os.path.normcase`` on `path`. Unfortunately, on certain platforms
(notably Cygwin and
Mac OS X
) the ``normcase`` function does not accurately
(notably Cygwin and
macOS
) the ``normcase`` function does not accurately
reflect the platform's case-sensitivity, so there is always the possibility
of two apparently-different paths being equal on such platforms.
...
...
pkg_resources/__init__.py
View file @
5d6fe655
...
...
@@ -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
(
_macos
x
_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
_macos
x
_vers
(
_cache
=
[]):
def
_macos_vers
(
_cache
=
[]):
if
not
_cache
:
version
=
platform
.
mac_ver
()[
0
]
# fallback for MacPorts
...
...
@@ -381,7 +381,7 @@ def _macosx_vers(_cache=[]):
return
_cache
[
0
]
def
_macos
x
_arch
(
machine
):
def
_macos_arch
(
machine
):
return
{
'PowerPC'
:
'ppc'
,
'Power_Macintosh'
:
'ppc'
}.
get
(
machine
,
machine
)
...
...
@@ -389,18 +389,18 @@ 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
=
_macos
x
_vers
()
version
=
_macos_vers
()
machine
=
os
.
uname
()[
4
].
replace
(
" "
,
"_"
)
return
"macosx-%d.%d-%s"
%
(
int
(
version
[
0
]),
int
(
version
[
1
]),
_macos
x
_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,7 +435,7 @@ 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 mac
osx
designation.
# use the new mac
OS
designation.
provDarwin = darwinVersionString.match(provided)
if provDarwin:
dversion = int(provDarwin.group(1))
...
...
@@ -443,7 +443,7 @@ def compatible_platforms(provided, required):
if dversion == 7 and macosversion >= "
10.3
" or
\
dversion == 8 and macosversion >= "
10.4
":
return True
# egg isn't mac
osx
or legacy darwin
# egg isn't mac
OS
or legacy darwin
return False
# are they the same major version and machine type?
...
...
pkg_resources/api_tests.txt
View file @
5d6fe655
...
...
@@ -290,8 +290,8 @@ Platform Compatibility Rules
----------------------------
On the Mac, there are potential compatibility issues for modules compiled
on newer versions of
Mac OS X
than what the user is running. Additionally,
Mac OS X
will soon have two platforms to contend with: Intel and PowerPC.
on newer versions of
macOS
than what the user is running. Additionally,
macOS
will soon have two platforms to contend with: Intel and PowerPC.
Basic equality works as on other platforms::
...
...
setuptools/package_index.py
View file @
5d6fe655
...
...
@@ -1053,7 +1053,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
parsed = urllib.parse.urlparse(url)
scheme, netloc, path, params, query, frag = parsed
# Double scheme does not raise on
Mac OS X
as revealed by a
# Double scheme does not raise on
macOS
as revealed by a
# failing test. We would expect "nonnumeric port". Refs #20.
if netloc.endswith(':'):
raise http_client.InvalidURL("nonnumeric port: ''")
...
...
tools/finalize.py
View file @
5d6fe655
...
...
@@ -53,7 +53,15 @@ def bump_version():
subprocess
.
check_call
(
cmd
)
def
ensure_config
():
"""
Double-check that Git has an e-mail configured.
"""
subprocess
.
check_output
([
'git'
,
'config'
,
'user.email'
])
if
__name__
==
'__main__'
:
print
(
"Cutting release at"
,
get_version
())
ensure_config
()
update_changelog
()
bump_version
()
tox.ini
View file @
5d6fe655
...
...
@@ -65,6 +65,7 @@ skip_install = True
deps
=
towncrier
bump2version
passenv
=
*
commands
=
python
tools/finalize.py
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment