Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb0b78a

Browse files
authored
Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)
This reverts commit 468a15a.
1 parent 8452ca1 commit cb0b78a

52 files changed

Lines changed: 331 additions & 3085 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azure-pipelines/windows-appx-test.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
# Specific binary files
2121
Lib/test/sndhdrdata/sndhdr.* binary
22-
PC/classicAppCompat.* binary
2322

2423
# Text files that should not be subject to eol conversion
2524
Lib/test/cjkencodings/* -text

Doc/make.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@ if not exist "%BUILDDIR%" mkdir "%BUILDDIR%"
117117

118118
if exist ..\Misc\NEWS (
119119
echo.Copying Misc\NEWS to build\NEWS
120-
if not exist build mkdir build
121120
copy ..\Misc\NEWS build\NEWS > nul
122121
) else if exist ..\Misc\NEWS.D (
123122
if defined BLURB (
124123
echo.Merging Misc/NEWS with %BLURB%
125-
if not exist build mkdir build
126124
%BLURB% merge -f build\NEWS
127125
) else (
128126
echo.No Misc/NEWS file and Blurb is not available.

Lib/test/test_pathlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ def test_resolve_common(self):
15211521
# resolves to 'dirB/..' first before resolving to parent of dirB.
15221522
self._check_resolve_relative(p, P(BASE, 'foo', 'in', 'spam'), False)
15231523
# Now create absolute symlinks
1524-
d = support._longpath(tempfile.mkdtemp(suffix='-dirD', dir=os.getcwd()))
1524+
d = support._longpath(tempfile.mkdtemp(suffix='-dirD'))
15251525
self.addCleanup(support.rmtree, d)
15261526
os.symlink(os.path.join(d), join('dirA', 'linkX'))
15271527
os.symlink(join('dirB'), os.path.join(d, 'linkY'))

Lib/test/test_venv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ def test_isolation(self):
243243
self.assertIn('include-system-site-packages = %s\n' % s, data)
244244

245245
@unittest.skipUnless(can_symlink(), 'Needs symlinks')
246-
@unittest.skipIf(os.name == 'nt', 'Symlinks are never used on Windows')
247246
def test_symlinking(self):
248247
"""
249248
Test symlinking works as expected

Lib/venv/__init__.py

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ def create(self, env_dir):
6464
self.system_site_packages = False
6565
self.create_configuration(context)
6666
self.setup_python(context)
67-
if not self.upgrade:
68-
self.setup_scripts(context)
6967
if self.with_pip:
7068
self._setup_pip(context)
7169
if not self.upgrade:
70+
self.setup_scripts(context)
7271
self.post_setup(context)
7372
if true_system_site_packages:
7473
# We had set it to False before, now
@@ -159,6 +158,14 @@ def create_configuration(self, context):
159158
f.write('include-system-site-packages = %s\n' % incl)
160159
f.write('version = %d.%d.%d\n' % sys.version_info[:3])
161160

161+
if os.name == 'nt':
162+
def include_binary(self, f):
163+
if f.endswith(('.pyd', '.dll')):
164+
result = True
165+
else:
166+
result = f.startswith('python') and f.endswith('.exe')
167+
return result
168+
162169
def symlink_or_copy(self, src, dst, relative_symlinks_ok=False):
163170
"""
164171
Try symlinking a file, and if that fails, fall back to copying.
@@ -188,9 +195,9 @@ def setup_python(self, context):
188195
binpath = context.bin_path
189196
path = context.env_exe
190197
copier = self.symlink_or_copy
198+
copier(context.executable, path)
191199
dirname = context.python_dir
192200
if os.name != 'nt':
193-
copier(context.executable, path)
194201
if not os.path.islink(path):
195202
os.chmod(path, 0o755)
196203
for suffix in ('python', 'python3'):
@@ -202,22 +209,26 @@ def setup_python(self, context):
202209
if not os.path.islink(path):
203210
os.chmod(path, 0o755)
204211
else:
205-
# For normal cases, the venvlauncher will be copied from
206-
# our scripts folder. For builds, we need to copy it
207-
# manually.
208-
if sysconfig.is_python_build(True):
209-
suffix = '.exe'
210-
if context.python_exe.lower().endswith('_d.exe'):
211-
suffix = '_d.exe'
212-
213-
src = os.path.join(dirname, "venvlauncher" + suffix)
214-
dst = os.path.join(binpath, context.python_exe)
215-
copier(src, dst)
216-
217-
src = os.path.join(dirname, "venvwlauncher" + suffix)
218-
dst = os.path.join(binpath, "pythonw" + suffix)
219-
copier(src, dst)
212+
# See bpo-34011. When using a proper install, we should only need to
213+
# copy the top-level of DLLs.
214+
include = self.include_binary
215+
files = [f for f in os.listdir(dirname) if include(f)]
216+
for f in files:
217+
src = os.path.join(dirname, f)
218+
dst = os.path.join(binpath, f)
219+
if dst != context.env_exe: # already done, above
220+
copier(src, dst)
220221

222+
# When creating from a build directory, we continue to copy all files.
223+
if sysconfig.is_python_build(True):
224+
subdir = 'DLLs'
225+
dirname = os.path.join(dirname, subdir)
226+
if os.path.isdir(dirname):
227+
files = [f for f in os.listdir(dirname) if include(f)]
228+
for f in files:
229+
src = os.path.join(dirname, f)
230+
dst = os.path.join(binpath, f)
231+
copier(src, dst)
221232
# copy init.tcl over
222233
for root, dirs, files in os.walk(context.python_dir):
223234
if 'init.tcl' in files:
@@ -315,7 +326,7 @@ def install_scripts(self, context, path):
315326
dstfile = os.path.join(dstdir, f)
316327
with open(srcfile, 'rb') as f:
317328
data = f.read()
318-
if not srcfile.endswith(('.exe', '.pdb')):
329+
if not srcfile.endswith('.exe'):
319330
try:
320331
data = data.decode('utf-8')
321332
data = self.replace_variables(data, context)

Misc/NEWS.d/next/Windows/2018-10-30-13-39-17.bpo-34977.0l7_QV.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

PC/classicAppCompat.can.xml

Lines changed: 0 additions & 1 deletion
This file was deleted.

PC/classicAppCompat.cat

-10.7 KB
Binary file not shown.

PC/classicAppCompat.sccd

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)