Skip to content

Commit a0cfc5d

Browse files
committed
Zstandard scaffold
1 parent 93c78cc commit a0cfc5d

File tree

9 files changed

+100
-4
lines changed

9 files changed

+100
-4
lines changed

Misc/externals.spdx.json

+21
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,27 @@
190190
"name": "zlib-ng",
191191
"primaryPackagePurpose": "SOURCE",
192192
"versionInfo": "2.2.4"
193+
},
194+
{
195+
"SPDXID": "SPDXRef-PACKAGE-zstd",
196+
"checksums": [
197+
{
198+
"algorithm": "SHA256",
199+
"checksumValue": "f24b52470d12f466e9fa4fcc94e6c530625ada51d7b36de7fdc6ed7e6f499c8e"
200+
}
201+
],
202+
"downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/zstd-1.5.7.tar.gz",
203+
"externalRefs": [
204+
{
205+
"referenceCategory": "SECURITY",
206+
"referenceLocator": "cpe:2.3:a:facebook:zstandard:1.5.7:*:*:*:*:*:*:*",
207+
"referenceType": "cpe23Type"
208+
}
209+
],
210+
"licenseConcluded": "NOASSERTION",
211+
"name": "zstd",
212+
"primaryPackagePurpose": "SOURCE",
213+
"versionInfo": "1.5.7"
193214
}
194215
],
195216
"spdxVersion": "SPDX-2.3"

PCbuild/get_externals.bat

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.15.
6161
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.15.0
6262
set libraries=%libraries% xz-5.2.5
6363
set libraries=%libraries% zlib-ng-2.2.4
64+
set libraries=%libraries% zstd-1.5.7
6465

6566
for %%e in (%libraries%) do (
6667
if exist "%EXTERNALS_DIR%\%%e" (

PCbuild/pcbuild.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<ExtensionModules Include="_asyncio;_remotedebugging;_zoneinfo;_decimal;_elementtree;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid;_wmi" />
7070
<ExtensionModules Include="_ctypes" Condition="$(IncludeCTypes)" />
7171
<!-- Extension modules that require external sources -->
72-
<ExternalModules Include="_bz2;_lzma;_sqlite3" />
72+
<ExternalModules Include="_bz2;_lzma;_sqlite3;_zstd" />
7373
<!-- venv launchers -->
7474
<Projects Include="venvlauncher.vcxproj;venvwlauncher.vcxproj" />
7575
<!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->

PCbuild/pcbuild.sln

+68
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib-ng", "zlib-ng.vcxproj"
165165
EndProject
166166
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_remotedebugging", "_remotedebugging.vcxproj", "{4D7C112F-3083-4D9E-9754-9341C14D9B39}"
167167
EndProject
168+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_zstd", "_zstd.vcxproj", "{07029B86-F3E9-443E-86FB-78AA6D47FED1}"
169+
EndProject
170+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd.vcxproj", "{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}"
171+
EndProject
168172
Global
169173
GlobalSection(SolutionConfigurationPlatforms) = preSolution
170174
Debug|ARM = Debug|ARM
@@ -1750,6 +1754,70 @@ Global
17501754
{4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|Win32.Build.0 = Release|Win32
17511755
{4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|x64.ActiveCfg = Release|x64
17521756
{4D7C112F-3083-4D9E-9754-9341C14D9B39}.Release|x64.Build.0 = Release|x64
1757+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM.ActiveCfg = Debug|ARM
1758+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM.Build.0 = Debug|ARM
1759+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM64.ActiveCfg = Debug|ARM64
1760+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|ARM64.Build.0 = Debug|ARM64
1761+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|Win32.ActiveCfg = Debug|Win32
1762+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|Win32.Build.0 = Debug|Win32
1763+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|x64.ActiveCfg = Debug|x64
1764+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Debug|x64.Build.0 = Debug|x64
1765+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM
1766+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM.Build.0 = PGInstrument|ARM
1767+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64
1768+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64
1769+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
1770+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
1771+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
1772+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGInstrument|x64.Build.0 = PGInstrument|x64
1773+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM
1774+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM.Build.0 = PGUpdate|ARM
1775+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64
1776+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64
1777+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
1778+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
1779+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
1780+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.PGUpdate|x64.Build.0 = PGUpdate|x64
1781+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM.ActiveCfg = Release|ARM
1782+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM.Build.0 = Release|ARM
1783+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM64.ActiveCfg = Release|ARM64
1784+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|ARM64.Build.0 = Release|ARM64
1785+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|Win32.ActiveCfg = Release|Win32
1786+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|Win32.Build.0 = Release|Win32
1787+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|x64.ActiveCfg = Release|x64
1788+
{07029B86-F3E9-443E-86FB-78AA6D47FED1}.Release|x64.Build.0 = Release|x64
1789+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|ARM.ActiveCfg = Debug|ARM
1790+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|ARM.Build.0 = Debug|ARM
1791+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|ARM64.ActiveCfg = Debug|ARM64
1792+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|ARM64.Build.0 = Debug|ARM64
1793+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|Win32.ActiveCfg = Debug|Win32
1794+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|Win32.Build.0 = Debug|Win32
1795+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|x64.ActiveCfg = Debug|x64
1796+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Debug|x64.Build.0 = Debug|x64
1797+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|ARM.ActiveCfg = PGInstrument|ARM
1798+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|ARM.Build.0 = PGInstrument|ARM
1799+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|ARM64.ActiveCfg = PGInstrument|ARM64
1800+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|ARM64.Build.0 = PGInstrument|ARM64
1801+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
1802+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
1803+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
1804+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGInstrument|x64.Build.0 = PGInstrument|x64
1805+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|ARM.ActiveCfg = PGUpdate|ARM
1806+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|ARM.Build.0 = PGUpdate|ARM
1807+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|ARM64.ActiveCfg = PGUpdate|ARM64
1808+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|ARM64.Build.0 = PGUpdate|ARM64
1809+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
1810+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
1811+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
1812+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.PGUpdate|x64.Build.0 = PGUpdate|x64
1813+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|ARM.ActiveCfg = Release|ARM
1814+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|ARM.Build.0 = Release|ARM
1815+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|ARM64.ActiveCfg = Release|ARM64
1816+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|ARM64.Build.0 = Release|ARM64
1817+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|Win32.ActiveCfg = Release|Win32
1818+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|Win32.Build.0 = Release|Win32
1819+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|x64.ActiveCfg = Release|x64
1820+
{8D80E018-6A7D-4B46-A7BE-D9E02A20D473}.Release|x64.Build.0 = Release|x64
17531821
EndGlobalSection
17541822
GlobalSection(SolutionProperties) = preSolution
17551823
HideSolutionNode = FALSE

PCbuild/python.props

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
8888
<zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.3.1\</zlibDir>
8989
<zlibNgDir Condition="$(zlibNgDir) == ''">$(ExternalsDir)\zlib-ng-2.2.4\</zlibNgDir>
90+
<zstdDir Condition="$(zstdDir) == ''">$(ExternalsDir)\zstd-1.5.7\lib\</zstdDir>
9091
</PropertyGroup>
9192

9293
<PropertyGroup>

PCbuild/readme.txt

+4
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ zlib-ng
262262

263263
Sources for zlib-ng are imported unmodified into our source
264264
repository at https://github.com/python/cpython-source-deps.
265+
_zstd
266+
Python wrapper for version 1.5.7 of the Zstandard compression library
267+
Homepage:
268+
https://facebook.github.io/zstd/
265269

266270

267271
Getting External Sources

PCbuild/regen.targets

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157
<_LicenseSources Include="$(PySourcePath)LICENSE;
158158
$(PySourcePath)PC\crtlicense.txt;
159159
$(bz2Dir)LICENSE;
160-
$(libffiDir)LICENSE;" />
160+
$(libffiDir)LICENSE;
161+
$(zstdDir)..\LICENSE;" />
161162
<_LicenseSources Include="$(opensslOutDir)LICENSE.txt" Condition="Exists('$(opensslOutDir)LICENSE.txt')" />
162163
<_LicenseSources Include="$(opensslOutDir)LICENSE" Condition="!Exists('$(opensslOutDir)LICENSE.txt')" />
163164
<_LicenseSources Include="$(tcltkDir)tcllicense.terms;

Tools/msi/freethreaded/freethreaded_files.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
</ComponentGroup>
104104
</Fragment>
105105

106-
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_wmi;_zoneinfo;_testcapi;_ctypes_test;_testbuffer;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testinternalcapi;_testclinic;_testclinic_limited;_tkinter ?>
106+
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_wmi;_zoneinfo;_zstd;_testcapi;_ctypes_test;_testbuffer;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testinternalcapi;_testclinic;_testclinic_limited;_tkinter ?>
107107
<Fragment>
108108
<DirectoryRef Id="Lib_venv_scripts_nt__freethreaded" />
109109

Tools/msi/lib/lib_files.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3-
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_wmi;_zoneinfo ?>
3+
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_wmi;_zoneinfo;_zstd ?>
44
<Fragment>
55
<DirectoryRef Id="Lib_venv_scripts_nt" />
66

0 commit comments

Comments
 (0)