From: JinWang An Date: Mon, 27 Mar 2023 08:02:36 +0000 (+0900) Subject: Imported Upstream version 58.2.0 X-Git-Tag: upstream/58.2.0^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fda5312ee38d6ac50d299ca0010fc2cc45755102;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 58.2.0 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c7fab7f..0ed3563 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.1.0 +current_version = 58.2.0 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index a77a8f1..0a002fe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,19 @@ +v58.2.0 +------- + + +Changes +^^^^^^^ +* #2757: Add windows arm64 launchers for scripts generated by easy_install. +* #2800: Added ``--owner`` and ``--group`` options to the ``sdist`` command, + for specifying file ownership within the produced tarball (similarly + to the corresponding distutils ``sdist`` options). + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2792: Document how the legacy and non-legacy versions are compared, and reference to the `PEP 440 `_ scheme. + + v58.1.0 ------- diff --git a/docs/userguide/distribution.rst b/docs/userguide/distribution.rst index 377f7bb..19bed1f 100644 --- a/docs/userguide/distribution.rst +++ b/docs/userguide/distribution.rst @@ -161,7 +161,10 @@ without Cython. Specifying Your Project's Version --------------------------------- -Setuptools can work well with most versioning schemes; there are, however, a +Setuptools can work well with most versioning schemes. Over the years, +setuptools has tried to closely follow the +`PEP 440 `_ scheme, but it +also supports legacy versions. There are, however, a few special things to watch out for, in order to ensure that setuptools and other tools can always tell what version of your package is newer than another version. Knowing these things will also help you correctly specify what @@ -181,9 +184,13 @@ tag. Pre-release tags make a version be considered *older* than the version they are appended to. So, revision ``2.4`` is *newer* than revision ``2.4c1``, which in turn is newer than ``2.4b1`` or ``2.4a1``. Postrelease tags make a version be considered *newer* than the version they are appended to. So, -revisions like ``2.4-1`` and ``2.4pl3`` are newer than ``2.4``, but are *older* +revisions like ``2.4-1`` are newer than ``2.4``, but *older* than ``2.4.1`` (which has a higher release number). +In the case of legacy versions (for example, ``2.4pl1``), they are considered +older than non-legacy versions. Taking that in count, a revision ``2.4pl1`` +is *older* than ``2.4`` + A pre-release tag is a series of letters that are alphabetically before "final". Some examples of prerelease tags would include ``alpha``, ``beta``, ``a``, ``c``, ``dev``, and so on. You do not have to place a dot or dash diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 551e02e..61da2d6 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -38,7 +38,7 @@ included manually in the following manner: packages=['mypkg1', 'mypkg2'] ) -This can get tiresome reallly quickly. To speed things up, we introduce two +This can get tiresome really quickly. To speed things up, we introduce two functions provided by setuptools: .. tab:: setup.cfg diff --git a/msvc-build-launcher-arm64.cmd b/msvc-build-launcher-arm64.cmd new file mode 100644 index 0000000..8e63506 --- /dev/null +++ b/msvc-build-launcher-arm64.cmd @@ -0,0 +1,19 @@ +@echo off + +REM Build with jaraco/windows Docker image + +set PATH_OLD=%PATH% +set PATH=C:\BuildTools\VC\Auxiliary\Build;%PATH_OLD% + +REM now for arm 64-bit +REM Cross compile for arm64 +call VCVARSx86_arm64 +if "%ERRORLEVEL%"=="0" ( + cl /D "GUI=0" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:arm64 /SUBSYSTEM:CONSOLE /out:setuptools/cli-arm64.exe + cl /D "GUI=1" /D "WIN32_LEAN_AND_MEAN" launcher.c /O2 /link /MACHINE:arm64 /SUBSYSTEM:WINDOWS /out:setuptools/gui-arm64.exe +) else ( + echo Visual Studio 2019 with arm64 toolchain not installed +) + +set PATH=%PATH_OLD% + diff --git a/setup.cfg b/setup.cfg index 0bee3cf..d7236be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.1.0 +version = 58.2.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages diff --git a/setuptools/cli-arm64.exe b/setuptools/cli-arm64.exe new file mode 100644 index 0000000..7a87ce4 Binary files /dev/null and b/setuptools/cli-arm64.exe differ diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5e0f97c..b88c3e9 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2263,7 +2263,10 @@ def get_win_launcher(type): """ launcher_fn = '%s.exe' % type if is_64bit(): - launcher_fn = launcher_fn.replace(".", "-64.") + if get_platform() == "win-arm64": + launcher_fn = launcher_fn.replace(".", "-arm64.") + else: + launcher_fn = launcher_fn.replace(".", "-64.") else: launcher_fn = launcher_fn.replace(".", "-32.") return resource_string('setuptools', launcher_fn) diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 4a01428..e8062f2 100644 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -31,6 +31,10 @@ class sdist(sdist_add_defaults, orig.sdist): ('dist-dir=', 'd', "directory to put the source distribution archive(s) in " "[default: dist]"), + ('owner=', 'u', + "Owner name used when creating a tar file [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file [default: current group]"), ] negative_opt = {} diff --git a/setuptools/gui-arm64.exe b/setuptools/gui-arm64.exe new file mode 100644 index 0000000..5730f11 Binary files /dev/null and b/setuptools/gui-arm64.exe differ diff --git a/setuptools/tests/test_windows_wrappers.py b/setuptools/tests/test_windows_wrappers.py index 27853aa..8ac9bd0 100644 --- a/setuptools/tests/test_windows_wrappers.py +++ b/setuptools/tests/test_windows_wrappers.py @@ -13,6 +13,7 @@ are to wrap. """ import sys +import platform import textwrap import subprocess @@ -51,10 +52,20 @@ class WrapperTester: f.write(w) +def win_launcher_exe(prefix): + """ A simple routine to select launcher script based on platform.""" + assert prefix in ('cli', 'gui') + if platform.machine() == "ARM64": + return "{}-arm64.exe".format(prefix) + else: + return "{}-32.exe".format(prefix) + + class TestCLI(WrapperTester): script_name = 'foo-script.py' - wrapper_source = 'cli-32.exe' wrapper_name = 'foo.exe' + wrapper_source = win_launcher_exe('cli') + script_tmpl = textwrap.dedent(""" #!%(python_exe)s import sys @@ -155,7 +166,7 @@ class TestGUI(WrapperTester): ----------------------- """ script_name = 'bar-script.pyw' - wrapper_source = 'gui-32.exe' + wrapper_source = win_launcher_exe('gui') wrapper_name = 'bar.exe' script_tmpl = textwrap.dedent("""