Browse Source

Fix separator in CUDA_ARCHITECTURES

kickbutt 1 year ago
parent
commit
fe742a0b69

+ 3 - 2
build/scripts/link_exe.py

@@ -55,7 +55,7 @@ def prune_cuda_libraries(cmd, prune_arches, nvprune_exe, build_root):
     tmp_names_gen = name_generator('cuda_pruned_libs')
 
     arch_args = []
-    for arch in prune_arches.split(','):
+    for arch in prune_arches.split(':'):
         arch_args.append('-gencode')
         arch_args.append('arch={},code={}'.format(compute_arch(arch), arch))
 
@@ -200,7 +200,8 @@ def parse_args():
     parser.add_option('--source-root')
     parser.add_option('--clang-ver')
     parser.add_option('--dynamic-cuda', action='store_true')
-    parser.add_option('--cuda-architectures')
+    parser.add_option('--cuda-architectures',
+                      help='List of supported CUDA architectures, separated by ":" (e.g. "sm_52:compute_70:lto_90a"')
     parser.add_option('--nvprune-exe')
     parser.add_option('--build-root')
     parser.add_option('--arch')

+ 2 - 2
build/ymake_conf.py

@@ -2396,7 +2396,7 @@ class Cuda(object):
         host, target = self.build.host_target
         if not target.is_linux_x86_64:
             # do not impose any restrictions, when build not for "linux 64-bit"
-            return []
+            return ''
 
         # do not include 'lto' type,
         # because we already perform static linking
@@ -2422,7 +2422,7 @@ class Cuda(object):
                               for typ in supported_types
                               for ver in supported_vers]
 
-        return ','.join(cuda_architectures)
+        return ':'.join(cuda_architectures)
 
     def auto_use_arcadia_cuda(self):
         return not self.cuda_root.from_user

+ 15 - 9
contrib/python/Pillow/py3/.dist-info/METADATA

@@ -1,22 +1,20 @@
 Metadata-Version: 2.1
-Name: Pillow
-Version: 10.1.0
+Name: pillow
+Version: 10.2.0
 Summary: Python Imaging Library (Fork)
-Home-page: https://python-pillow.org
-Author: Jeffrey A. Clark (Alex)
-Author-email: aclark@aclark.net
+Author-email: "Jeffrey A. Clark (Alex)" <aclark@aclark.net>
 License: HPND
+Project-URL: Changelog, https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
 Project-URL: Documentation, https://pillow.readthedocs.io
-Project-URL: Source, https://github.com/python-pillow/Pillow
 Project-URL: Funding, https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi
+Project-URL: Homepage, https://python-pillow.org
+Project-URL: Mastodon, https://fosstodon.org/@pillow
 Project-URL: Release notes, https://pillow.readthedocs.io/en/stable/releasenotes/index.html
-Project-URL: Changelog, https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
+Project-URL: Source, https://github.com/python-pillow/Pillow
 Project-URL: Twitter, https://twitter.com/PythonPillow
-Project-URL: Mastodon, https://fosstodon.org/@pillow
 Keywords: Imaging
 Classifier: Development Status :: 6 - Mature
 Classifier: License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)
-Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3 :: Only
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
@@ -41,6 +39,10 @@ Requires-Dist: sphinx-copybutton ; extra == 'docs'
 Requires-Dist: sphinx-inline-tabs ; extra == 'docs'
 Requires-Dist: sphinx-removed-in ; extra == 'docs'
 Requires-Dist: sphinxext-opengraph ; extra == 'docs'
+Provides-Extra: fpx
+Requires-Dist: olefile ; extra == 'fpx'
+Provides-Extra: mic
+Requires-Dist: olefile ; extra == 'mic'
 Provides-Extra: tests
 Requires-Dist: check-manifest ; extra == 'tests'
 Requires-Dist: coverage ; extra == 'tests'
@@ -52,6 +54,10 @@ Requires-Dist: pyroma ; extra == 'tests'
 Requires-Dist: pytest ; extra == 'tests'
 Requires-Dist: pytest-cov ; extra == 'tests'
 Requires-Dist: pytest-timeout ; extra == 'tests'
+Provides-Extra: typing
+Requires-Dist: typing-extensions ; (python_version < "3.10") and extra == 'typing'
+Provides-Extra: xmp
+Requires-Dist: defusedxml ; extra == 'xmp'
 
 <p align="center">
     <img width="248" height="250" src="https://raw.githubusercontent.com/python-pillow/pillow-logo/main/pillow-logo-248x250.png" alt="Pillow logo">

+ 114 - 6
contrib/python/Pillow/py3/CHANGES.rst

@@ -2,6 +2,114 @@
 Changelog (Pillow)
 ==================
 
+10.2.0 (2024-01-02)
+-------------------
+
+- Add ``keep_rgb`` option when saving JPEG to prevent conversion of RGB colorspace #7553
+  [bgilbert, radarhere]
+
+- Trim glyph size in ImageFont.getmask() #7669, #7672
+  [radarhere, nulano]
+
+- Deprecate IptcImagePlugin helpers #7664
+  [nulano, hugovk, radarhere]
+
+- Allow uncompressed TIFF images to be saved in chunks #7650
+  [radarhere]
+
+- Concatenate multiple JPEG EXIF markers #7496
+  [radarhere]
+
+- Changed IPTC tile tuple to match other plugins #7661
+  [radarhere]
+
+- Do not assign new fp attribute when exiting context manager #7566
+  [radarhere]
+
+- Support arbitrary masks for uncompressed RGB DDS images #7589
+  [radarhere, akx]
+
+- Support setting ROWSPERSTRIP tag #7654
+  [radarhere]
+
+- Apply ImageFont.MAX_STRING_LENGTH to ImageFont.getmask() #7662
+  [radarhere]
+
+- Optimise ``ImageColor`` using ``functools.lru_cache`` #7657
+  [hugovk]
+
+- Restricted environment keys for ImageMath.eval() #7655
+  [wiredfool, radarhere]
+
+- Optimise ``ImageMode.getmode`` using ``functools.lru_cache`` #7641
+  [hugovk, radarhere]
+
+- Fix incorrect color blending for overlapping glyphs #7497
+  [ZachNagengast, nulano, radarhere]
+
+- Attempt memory mapping when tile args is a string #7565
+  [radarhere]
+
+- Fill identical pixels with transparency in subsequent frames when saving GIF #7568
+  [radarhere]
+
+- Corrected duration when combining multiple GIF frames into single frame #7521
+  [radarhere]
+
+- Handle disposing GIF background from outside palette #7515
+  [radarhere]
+
+- Seek past the data when skipping a PSD layer #7483
+  [radarhere]
+
+- Import plugins relative to the module #7576
+  [deliangyang, jaxx0n]
+
+- Translate encoder error codes to strings; deprecate ``ImageFile.raise_oserror()`` #7609
+  [bgilbert, radarhere]
+
+- Support reading BC4U and DX10 BC1 images #6486
+  [REDxEYE, radarhere, hugovk]
+
+- Optimize ImageStat.Stat.extrema #7593
+  [florath, radarhere]
+
+- Handle pathlib.Path in FreeTypeFont #7578
+  [radarhere, hugovk, nulano]
+
+- Added support for reading DX10 BC4 DDS images #7603
+  [sambvfx, radarhere]
+
+- Optimized ImageStat.Stat.count #7599
+  [florath]
+
+- Correct PDF palette size when saving #7555
+  [radarhere]
+
+- Fixed closing file pointer with olefile 0.47 #7594
+  [radarhere]
+
+- Raise ValueError when TrueType font size is not greater than zero #7584, #7587
+  [akx, radarhere]
+
+- If absent, do not try to close fp when closing image #7557
+  [RaphaelVRossi, radarhere]
+
+- Allow configuring JPEG restart marker interval on save #7488
+  [bgilbert, radarhere]
+
+- Decrement reference count for PyObject #7549
+  [radarhere]
+
+- Implement ``streamtype=1`` option for tables-only JPEG encoding #7491
+  [bgilbert, radarhere]
+
+- If save_all PNG only has one frame, do not create animated image #7522
+  [radarhere]
+
+- Fixed frombytes() for images with a zero dimension #7493
+  [radarhere]
+
 10.1.0 (2023-10-15)
 -------------------
 
@@ -2191,7 +2299,7 @@ Changelog (Pillow)
 - Cache EXIF information #3498
   [Glandos]
 
-- Added transparency for all PNG greyscale modes #3744
+- Added transparency for all PNG grayscale modes #3744
   [radarhere]
 
 - Fix deprecation warnings in Python 3.8 #3749
@@ -4693,7 +4801,7 @@ Changelog (Pillow)
 - Fix Bicubic interpolation #970
   [homm]
 
-- Support for 4-bit greyscale TIFF images #980
+- Support for 4-bit grayscale TIFF images #980
   [hugovk]
 
 - Updated manifest #957
@@ -6768,7 +6876,7 @@ The test suite includes 750 individual tests.
 
 - You can now convert directly between all modes supported by
   PIL.  When converting colour images to "P", PIL defaults to
-  a "web" palette and dithering.  When converting greyscale
+  a "web" palette and dithering.  When converting grayscale
   images to "1", PIL uses a thresholding and dithering.
 
 - Added a "dither" option to "convert".  By default, "convert"
@@ -6846,13 +6954,13 @@ The test suite includes 530 individual tests.
 - Fixed "paste" to allow a mask also for mode "F" images.
 
 - The BMP driver now saves mode "1" images.  When loading images, the mode
-  is set to "L" for 8-bit files with greyscale palettes, and to "P" for
+  is set to "L" for 8-bit files with grayscale palettes, and to "P" for
   other 8-bit files.
 
 - The IM driver now reads and saves "1" images (file modes "0 1" or "L 1").
 
 - The JPEG and GIF drivers now saves "1" images.  For JPEG, the image
-  is saved as 8-bit greyscale (it will load as mode "L").  For GIF, the
+  is saved as 8-bit grayscale (it will load as mode "L").  For GIF, the
   image will be loaded as a "P" image.
 
 - Fixed a potential buffer overrun in the GIF encoder.
@@ -7156,7 +7264,7 @@ The test suite includes 400 individual tests.
   drawing capabilities can be used to render vector and metafile
   formats.
 
-- Added restricted drivers for images from Image Tools (greyscale
+- Added restricted drivers for images from Image Tools (grayscale
   only) and LabEye/IFUNC (common interchange modes only).
 
 - Some minor improvements to the sample scripts provided in the

+ 1 - 1
contrib/python/Pillow/py3/LICENSE

@@ -5,7 +5,7 @@ The Python Imaging Library (PIL) is
 
 Pillow is the friendly PIL fork. It is
 
-    Copyright © 2010-2023 by Jeffrey A. Clark (Alex) and contributors.
+    Copyright © 2010-2024 by Jeffrey A. Clark (Alex) and contributors.
 
 Like PIL, Pillow is licensed under the open source HPND License:
 

+ 16 - 5
contrib/python/Pillow/py3/PIL/BdfFontFile.py

@@ -20,7 +20,9 @@
 """
 Parse X Bitmap Distribution Format (BDF)
 """
+from __future__ import annotations
 
+from typing import BinaryIO
 
 from . import FontFile, Image
 
@@ -36,7 +38,17 @@ bdf_slant = {
 bdf_spacing = {"P": "Proportional", "M": "Monospaced", "C": "Cell"}
 
 
-def bdf_char(f):
+def bdf_char(
+    f: BinaryIO,
+) -> (
+    tuple[
+        str,
+        int,
+        tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int]],
+        Image.Image,
+    ]
+    | None
+):
     # skip to STARTCHAR
     while True:
         s = f.readline()
@@ -56,13 +68,12 @@ def bdf_char(f):
         props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii")
 
     # load bitmap
-    bitmap = []
+    bitmap = bytearray()
     while True:
         s = f.readline()
         if not s or s[:7] == b"ENDCHAR":
             break
-        bitmap.append(s[:-1])
-    bitmap = b"".join(bitmap)
+        bitmap += s[:-1]
 
     # The word BBX
     # followed by the width in x (BBw), height in y (BBh),
@@ -92,7 +103,7 @@ def bdf_char(f):
 class BdfFontFile(FontFile.FontFile):
     """Font file plugin for the X11 BDF format."""
 
-    def __init__(self, fp):
+    def __init__(self, fp: BinaryIO):
         super().__init__()
 
         s = fp.readline()

+ 1 - 0
contrib/python/Pillow/py3/PIL/BlpImagePlugin.py

@@ -28,6 +28,7 @@ BLP files come in many different flavours:
   - DXT3 compression is used if alpha_encoding == 1.
   - DXT5 compression is used if alpha_encoding == 7.
 """
+from __future__ import annotations
 
 import os
 import struct

+ 7 - 7
contrib/python/Pillow/py3/PIL/BmpImagePlugin.py

@@ -22,7 +22,7 @@
 #
 # See the README file for information on usage and redistribution.
 #
-
+from __future__ import annotations
 
 import os
 
@@ -230,21 +230,21 @@ class BmpImageFile(ImageFile.ImageFile):
             else:
                 padding = file_info["palette_padding"]
                 palette = read(padding * file_info["colors"])
-                greyscale = True
+                grayscale = True
                 indices = (
                     (0, 255)
                     if file_info["colors"] == 2
                     else list(range(file_info["colors"]))
                 )
 
-                # ----------------- Check if greyscale and ignore palette if so
+                # ----------------- Check if grayscale and ignore palette if so
                 for ind, val in enumerate(indices):
                     rgb = palette[ind * padding : ind * padding + 3]
                     if rgb != o8(val) * 3:
-                        greyscale = False
+                        grayscale = False
 
-                # ------- If all colors are grey, white or black, ditch palette
-                if greyscale:
+                # ------- If all colors are gray, white or black, ditch palette
+                if grayscale:
                     self._mode = "1" if file_info["colors"] == 2 else "L"
                     raw_mode = self.mode
                 else:
@@ -396,7 +396,7 @@ def _save(im, fp, filename, bitmap_header=True):
     dpi = info.get("dpi", (96, 96))
 
     # 1 meter == 39.3701 inches
-    ppm = tuple(map(lambda x: int(x * 39.3701 + 0.5), dpi))
+    ppm = tuple(int(x * 39.3701 + 0.5) for x in dpi)
 
     stride = ((im.size[0] * bits + 7) // 8 + 3) & (~3)
     header = 40  # or 64 for OS/2 version 2

+ 1 - 0
contrib/python/Pillow/py3/PIL/BufrStubImagePlugin.py

@@ -8,6 +8,7 @@
 #
 # See the README file for information on usage and redistribution.
 #
+from __future__ import annotations
 
 from . import Image, ImageFile
 

+ 13 - 12
contrib/python/Pillow/py3/PIL/ContainerIO.py

@@ -13,18 +13,19 @@
 #
 # See the README file for information on usage and redistribution.
 #
-
+from __future__ import annotations
 
 import io
+from typing import IO, AnyStr, Generic, Literal
 
 
-class ContainerIO:
+class ContainerIO(Generic[AnyStr]):
     """
     A file object that provides read access to a part of an existing
     file (for example a TAR file).
     """
 
-    def __init__(self, file, offset, length):
+    def __init__(self, file: IO[AnyStr], offset: int, length: int) -> None:
         """
         Create file object.
 
@@ -32,7 +33,7 @@ class ContainerIO:
         :param offset: Start of region, in bytes.
         :param length: Size of region, in bytes.
         """
-        self.fh = file
+        self.fh: IO[AnyStr] = file
         self.pos = 0
         self.offset = offset
         self.length = length
@@ -41,10 +42,10 @@ class ContainerIO:
     ##
     # Always false.
 
-    def isatty(self):
+    def isatty(self) -> bool:
         return False
 
-    def seek(self, offset, mode=io.SEEK_SET):
+    def seek(self, offset: int, mode: Literal[0, 1, 2] = io.SEEK_SET) -> None:
         """
         Move file pointer.
 
@@ -63,7 +64,7 @@ class ContainerIO:
         self.pos = max(0, min(self.pos, self.length))
         self.fh.seek(self.offset + self.pos)
 
-    def tell(self):
+    def tell(self) -> int:
         """
         Get current file pointer.
 
@@ -71,7 +72,7 @@ class ContainerIO:
         """
         return self.pos
 
-    def read(self, n=0):
+    def read(self, n: int = 0) -> AnyStr:
         """
         Read data.
 
@@ -84,17 +85,17 @@ class ContainerIO:
         else:
             n = self.length - self.pos
         if not n:  # EOF
-            return b"" if "b" in self.fh.mode else ""
+            return b"" if "b" in self.fh.mode else ""  # type: ignore[return-value]
         self.pos = self.pos + n
         return self.fh.read(n)
 
-    def readline(self):
+    def readline(self) -> AnyStr:
         """
         Read a line of text.
 
         :returns: An 8-bit string.
         """
-        s = b"" if "b" in self.fh.mode else ""
+        s: AnyStr = b"" if "b" in self.fh.mode else ""  # type: ignore[assignment]
         newline_character = b"\n" if "b" in self.fh.mode else "\n"
         while True:
             c = self.read(1)
@@ -105,7 +106,7 @@ class ContainerIO:
                 break
         return s
 
-    def readlines(self):
+    def readlines(self) -> list[AnyStr]:
         """
         Read multiple lines of text.
 

Some files were not shown because too many files changed in this diff