Imported Upstream version 58.2.0 upstream/58.2.0
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
docs/userguide/distribution.rst
docs/userguide/package_discovery.rst
msvc-build-launcher-arm64.cmd [new file with mode: 0644]
setup.cfg
setuptools/cli-arm64.exe [new file with mode: 0644]
setuptools/command/easy_install.py
setuptools/command/sdist.py
setuptools/gui-arm64.exe [new file with mode: 0644]
setuptools/tests/test_windows_wrappers.py

index c7fab7fc0bddb2027f46066f202403f99a1b20bd..0ed356322d40b67b02717d4efe00acd6b7eec8ac 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 58.1.0
+current_version = 58.2.0
 commit = True
 tag = True
 
index a77a8f1c40c8536a2459293f21ccce282d482790..0a002fe544f612fbbad422f78ed0325a0977a6f1 100644 (file)
@@ -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 <https://www.python.org/dev/peps/pep-0440/>`_ scheme.
+
+
 v58.1.0
 -------
 
index 377f7bb4f1fc2c23c8588b1063daff1fdb819555..19bed1f9d6ff498b72c0ca3e43230011b5b161d2 100644 (file)
@@ -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 <https://www.python.org/dev/peps/pep-0440/>`_ 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
index 551e02e685ed92ea356e95f3fb3557daf0398bd4..61da2d662cbb2f7a15b0295893a2e19c27ee2827 100644 (file)
@@ -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 (file)
index 0000000..8e63506
--- /dev/null
@@ -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%
+
index 0bee3cf35f117589a4accf3d716b12461cfa7358..d7236be6fc8581ad69ed363b75d1d310f3ef8837 100644 (file)
--- 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 (file)
index 0000000..7a87ce4
Binary files /dev/null and b/setuptools/cli-arm64.exe differ
index 5e0f97cfea5484ea1ea139e0f4b8e8553b80b00d..b88c3e9a5abf788e2cb5de4689fbf03ba90a2e0f 100644 (file)
@@ -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)
index 4a014283c8650112323007992fe702702707ad66..e8062f2e41830cb70902d9971df670c1f5a550f6 100644 (file)
@@ -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 (file)
index 0000000..5730f11
Binary files /dev/null and b/setuptools/gui-arm64.exe differ
index 27853aae7857c4eb163fbad10e8be7e479000374..8ac9bd072c05fd004581ea4847a291734a555a94 100644 (file)
@@ -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("""