Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a0511c49
Commit
a0511c49
authored
Sep 12, 2016
by
Ned Deily
Browse files
Options
Browse Files
Download
Plain Diff
Post 3.6.0b1 merge
parents
75469054
cc077291
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
32 deletions
+21
-32
Objects/methodobject.c
Objects/methodobject.c
+1
-2
Tools/msi/make_zip.py
Tools/msi/make_zip.py
+19
-21
Tools/nuget/make_pkg.proj
Tools/nuget/make_pkg.proj
+1
-0
setup.py
setup.py
+0
-9
No files found.
Objects/methodobject.c
View file @
a0511c49
...
...
@@ -273,7 +273,7 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack,
Py_ssize_t
nargs
,
PyObject
*
kwnames
)
{
PyObject
*
kwdict
,
*
result
;
Py_ssize_t
nkwargs
;
Py_ssize_t
nkwargs
=
(
kwnames
==
NULL
)
?
0
:
PyTuple_GET_SIZE
(
kwnames
)
;
assert
(
PyCFunction_Check
(
func
));
assert
(
nargs
>=
0
);
...
...
@@ -282,7 +282,6 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack,
/* kwnames must only contains str strings, no subclass, and all keys must
be unique */
nkwargs
=
(
kwnames
==
NULL
)
?
0
:
PyTuple_GET_SIZE
(
kwnames
);
if
(
nkwargs
>
0
)
{
kwdict
=
_PyStack_AsDict
(
stack
+
nargs
,
kwnames
);
if
(
kwdict
==
NULL
)
{
...
...
Tools/msi/make_zip.py
View file @
a0511c49
...
...
@@ -92,23 +92,23 @@ def include_in_tools(p):
return p.suffix.lower() in {'
.
py
', '
.
pyw
', '
.
txt
'}
FULL_LAYOUT = [
('
/
', '
$
build
', '
python
.
exe
', is_not_debug),
('
/
', '
$
build
', '
pythonw
.
exe
', is_not_debug),
('
/
', '
$
build
', '
python
{
0.
major
}.
dll
'.format(sys.version_info), is_not_debug),
('
/
', '
$
build
', '
python
{
0.
major
}{
0.
minor
}.
dll
'.format(sys.version_info), is_not_debug),
('
DLLs
/
', '
$
build
', '
*
.
pyd
', is_not_debug),
('
DLLs
/
', '
$
build
', '
*
.
dll
', is_not_debug_or_python),
('
/
', '
PCBuild
/
$
arch
', '
python
.
exe
', is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
pythonw
.
exe
', is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
python
{
0.
major
}.
dll
'.format(sys.version_info), is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
python
{
0.
major
}{
0.
minor
}.
dll
'.format(sys.version_info), is_not_debug),
('
DLLs
/
', '
PCBuild
/
$
arch
', '
*
.
pyd
', is_not_debug),
('
DLLs
/
', '
PCBuild
/
$
arch
', '
*
.
dll
', is_not_debug_or_python),
('
include
/
', '
include
', '
*
.
h
', None),
('
include
/
', '
PC
', '
pyconfig
.
h
', None),
('
Lib
/
', '
Lib
', '
**/*
', include_in_lib),
('
libs
/
', '
$
build
', '
*
.
lib
', include_in_libs),
('
libs
/
', '
PCBuild
/
$
arch
', '
*
.
lib
', include_in_libs),
('
Tools
/
', '
Tools
', '
**/*
', include_in_tools),
]
EMBED_LAYOUT = [
('
/
', '
$
build
', '
python
*
.
exe
', is_not_debug),
('
/
', '
$
build
', '
*
.
pyd
', is_not_debug),
('
/
', '
$
build
', '
*
.
dll
', is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
python
*
.
exe
', is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
*
.
pyd
', is_not_debug),
('
/
', '
PCBuild
/
$
arch
', '
*
.
dll
', is_not_debug),
('
python
{
0.
major
}{
0.
minor
}.
zip
'.format(sys.version_info), '
Lib
', '
**/*
', include_in_lib),
]
...
...
@@ -170,18 +170,18 @@ def rglob(root, pattern, condition):
def main():
parser = argparse.ArgumentParser()
parser.add_argument('
-
s
', '
--
source
', metavar='
dir
', help='
The
directory
containing
the
repository
root
', type=Path)
parser.add_argument('
-
o
', '
--
out
', metavar='
file
', help='
The
name
of
the
output
archive
', type=Path, default=None)
parser.add_argument('
-
o
', '
--
out
', metavar='
file
', help='
The
name
of
the
output
self
-
extracting
archive
', type=Path, default=None)
parser.add_argument('
-
t
', '
--
temp
', metavar='
dir
', help='
A
directory
to
temporarily
extract
files
into
', type=Path, default=None)
parser.add_argument('
-
e
', '
--
embed
', help='
Create
an
embedding
layout
', action='
store_true
', default=False)
parser.add_argument('
-
b', '
--
build
', help='
Specify
the
build
directory
', type=Path
)
parser.add_argument('
-
a
', '
--
arch
', help='
Specify
the
architecture
to
use
(
win32
/
amd64
)
', type=str, default="win32"
)
ns = parser.parse_args()
source = ns.source or (Path(__file__).resolve().parent.parent.parent)
out = ns.out
build = ns.build
arch = ns.arch
assert isinstance(source, Path)
assert not out or isinstance(out, Path)
assert isinstance(
build, Path
)
assert isinstance(
arch, str
)
if ns.temp:
temp = ns.temp
...
...
@@ -204,16 +204,14 @@ def main():
try:
for t, s, p, c in layout:
if s == '
$
build
':
s = build
else:
s = source / s
s = source / s.replace("$arch", arch)
copied = copy_to_layout(temp / t.rstrip('
/
'), rglob(s, p, c))
print('
Copied
{}
files
'.format(copied))
with open(str(temp / '
sys
.
path
'), '
w
') as f:
print('
python
{
0.
major
}{
0.
minor
}.
zip
'.format(sys.version_info), file=f)
print('
.
', file=f)
if ns.embed:
with open(str(temp / '
sys
.
path
'), '
w
') as f:
print('
python
{
0.
major
}{
0.
minor
}.
zip
'.format(sys.version_info), file=f)
print('
.
', file=f)
if out:
total = copy_to_layout(out, rglob(temp, '
**/*
', None))
...
...
Tools/nuget/make_pkg.proj
View file @
a0511c49
...
...
@@ -14,6 +14,7 @@
<PropertyGroup>
<Nuget
Condition=
"$(Nuget) == ''"
>
$(ExternalsDir)\windows-installer\nuget\nuget.exe
</Nuget>
<NuspecVersion>
$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)
</NuspecVersion>
<NuspecVersion
Condition=
"$(ReleaseLevelName) != ''"
>
$(NuspecVersion)-$(ReleaseLevelName)
</NuspecVersion>
<SignOutput>
false
</SignOutput>
<TargetName>
$(OutputName).$(NuspecVersion)
</TargetName>
<TargetExt>
.nupkg
</TargetExt>
...
...
setup.py
View file @
a0511c49
...
...
@@ -2153,15 +2153,6 @@ class PyBuildExt(build_ext):
if
not
sysconfig
.
get_config_var
(
'WITH_THREAD'
):
define_macros
.
append
((
'WITHOUT_THREADS'
,
1
))
# Increase warning level for gcc:
if
'gcc'
in
cc
:
cmd
=
(
"echo '' | %s -Wextra -Wno-missing-field-initializers -E - "
"> /dev/null 2>&1"
%
cc
)
ret
=
os
.
system
(
cmd
)
if
ret
>>
8
==
0
:
extra_compile_args
.
extend
([
'-Wextra'
,
'-Wno-missing-field-initializers'
])
# Uncomment for extra functionality:
#define_macros.append(('EXTRA_FUNCTIONALITY', 1))
ext
=
Extension
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment