Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 3c70a99

Browse files
committed
Post 3.6.0b1 merge
2 parents 4a94bbe + 41fca9d commit 3c70a99

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

Objects/methodobject.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack,
273273
Py_ssize_t nargs, PyObject *kwnames)
274274
{
275275
PyObject *kwdict, *result;
276-
Py_ssize_t nkwargs;
276+
Py_ssize_t nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames);
277277

278278
assert(PyCFunction_Check(func));
279279
assert(nargs >= 0);
@@ -282,7 +282,6 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack,
282282
/* kwnames must only contains str strings, no subclass, and all keys must
283283
be unique */
284284

285-
nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames);
286285
if (nkwargs > 0) {
287286
kwdict = _PyStack_AsDict(stack + nargs, kwnames);
288287
if (kwdict == NULL) {

Tools/msi/make_zip.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,23 @@ def include_in_tools(p):
9292
return p.suffix.lower() in {'.py', '.pyw', '.txt'}
9393

9494
FULL_LAYOUT = [
95-
('/', '$build', 'python.exe', is_not_debug),
96-
('/', '$build', 'pythonw.exe', is_not_debug),
97-
('/', '$build', 'python{0.major}.dll'.format(sys.version_info), is_not_debug),
98-
('/', '$build', 'python{0.major}{0.minor}.dll'.format(sys.version_info), is_not_debug),
99-
('DLLs/', '$build', '*.pyd', is_not_debug),
100-
('DLLs/', '$build', '*.dll', is_not_debug_or_python),
95+
('/', 'PCBuild/$arch', 'python.exe', is_not_debug),
96+
('/', 'PCBuild/$arch', 'pythonw.exe', is_not_debug),
97+
('/', 'PCBuild/$arch', 'python{0.major}.dll'.format(sys.version_info), is_not_debug),
98+
('/', 'PCBuild/$arch', 'python{0.major}{0.minor}.dll'.format(sys.version_info), is_not_debug),
99+
('DLLs/', 'PCBuild/$arch', '*.pyd', is_not_debug),
100+
('DLLs/', 'PCBuild/$arch', '*.dll', is_not_debug_or_python),
101101
('include/', 'include', '*.h', None),
102102
('include/', 'PC', 'pyconfig.h', None),
103103
('Lib/', 'Lib', '**/*', include_in_lib),
104-
('libs/', '$build', '*.lib', include_in_libs),
104+
('libs/', 'PCBuild/$arch', '*.lib', include_in_libs),
105105
('Tools/', 'Tools', '**/*', include_in_tools),
106106
]
107107

108108
EMBED_LAYOUT = [
109-
('/', '$build', 'python*.exe', is_not_debug),
110-
('/', '$build', '*.pyd', is_not_debug),
111-
('/', '$build', '*.dll', is_not_debug),
109+
('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
110+
('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
111+
('/', 'PCBuild/$arch', '*.dll', is_not_debug),
112112
('python{0.major}{0.minor}.zip'.format(sys.version_info), 'Lib', '**/*', include_in_lib),
113113
]
114114

@@ -170,18 +170,18 @@ def rglob(root, pattern, condition):
170170
def main():
171171
parser = argparse.ArgumentParser()
172172
parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
173-
parser.add_argument('-o', '--out', metavar='file', help='The name of the output archive', type=Path, default=None)
173+
parser.add_argument('-o', '--out', metavar='file', help='The name of the output self-extracting archive', type=Path, default=None)
174174
parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
175175
parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
176-
parser.add_argument('-b', '--build', help='Specify the build directory', type=Path)
176+
parser.add_argument('-a', '--arch', help='Specify the architecture to use (win32/amd64)', type=str, default="win32")
177177
ns = parser.parse_args()
178178

179179
source = ns.source or (Path(__file__).resolve().parent.parent.parent)
180180
out = ns.out
181-
build = ns.build
181+
arch = ns.arch
182182
assert isinstance(source, Path)
183183
assert not out or isinstance(out, Path)
184-
assert isinstance(build, Path)
184+
assert isinstance(arch, str)
185185

186186
if ns.temp:
187187
temp = ns.temp
@@ -204,16 +204,14 @@ def main():
204204

205205
try:
206206
for t, s, p, c in layout:
207-
if s == '$build':
208-
s = build
209-
else:
210-
s = source / s
207+
s = source / s.replace("$arch", arch)
211208
copied = copy_to_layout(temp / t.rstrip('/'), rglob(s, p, c))
212209
print('Copied {} files'.format(copied))
213210

214-
with open(str(temp / 'sys.path'), 'w') as f:
215-
print('python{0.major}{0.minor}.zip'.format(sys.version_info), file=f)
216-
print('.', file=f)
211+
if ns.embed:
212+
with open(str(temp / 'sys.path'), 'w') as f:
213+
print('python{0.major}{0.minor}.zip'.format(sys.version_info), file=f)
214+
print('.', file=f)
217215

218216
if out:
219217
total = copy_to_layout(out, rglob(temp, '**/*', None))

Tools/nuget/make_pkg.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<PropertyGroup>
1515
<Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>
1616
<NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
17+
<NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>
1718
<SignOutput>false</SignOutput>
1819
<TargetName>$(OutputName).$(NuspecVersion)</TargetName>
1920
<TargetExt>.nupkg</TargetExt>

setup.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,15 +2153,6 @@ def _decimal_ext(self):
21532153
if not sysconfig.get_config_var('WITH_THREAD'):
21542154
define_macros.append(('WITHOUT_THREADS', 1))
21552155

2156-
# Increase warning level for gcc:
2157-
if 'gcc' in cc:
2158-
cmd = ("echo '' | %s -Wextra -Wno-missing-field-initializers -E - "
2159-
"> /dev/null 2>&1" % cc)
2160-
ret = os.system(cmd)
2161-
if ret >> 8 == 0:
2162-
extra_compile_args.extend(['-Wextra',
2163-
'-Wno-missing-field-initializers'])
2164-
21652156
# Uncomment for extra functionality:
21662157
#define_macros.append(('EXTRA_FUNCTIONALITY', 1))
21672158
ext = Extension (

0 commit comments

Comments
 (0)