Skip to content

Commit

Permalink
Merge branch 'hotfix/0.5.23.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed Oct 16, 2016
2 parents 0c1d66d + 35fe78f commit 02bcb53
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 22 deletions.
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
nuitka (0.5.23.1+ds-1) unstable; urgency=medium

* New upstream hotfix release.
* Use C11 compiler instead of C++ compiler, allows to drop the
versioned dependencies. (Closes: 835954)

-- Kay Hayen <[email protected]> Sun, 16 Oct 2016 10:40:59 +0200

nuitka (0.5.23+ds-1) unstable; urgency=medium

* New upstream release.
Expand Down
17 changes: 9 additions & 8 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ Maintainer: Kay Hayen <[email protected]>
Section: python
Priority: optional
Build-Depends: debhelper (>= 7.4.3),
dh-python | base-files (<<9.6),
dh-python | base-files (<< 9.6),
python (>= 2.6.6-2),
python-all-dbg (>= 2.6.6-2),
python-all-dev (>= 2.6.6-2),
rst2pdf (>= 0.14-2),
python-imaging | python-pil,
scons (>=2.0.0),
python3-all-dev (>= 3.2) | base-files (<<6.1),
python3-all-dbg (>= 3.2) | base-files (<<6.1),
scons (>= 2.0.0),
python3-all-dev (>= 3.2) | base-files (<< 6.1),
python3-all-dbg (>= 3.2) | base-files (<< 6.1),
strace,
chrpath
Vcs-Git: http://git.nuitka.net/Nuitka.git
Expand All @@ -22,14 +22,15 @@ X-Python-Version: >= 2.6

Package: nuitka
Architecture: all
Depends: g++-6 | g++-5 | g++-4.9 | g++-4.8 | g++-4.7 | g++-4.6 (>= 4.6.1) | g++-4.5 | g++-4.4 | clang (>= 3.0),
scons (>=2.0.0),
Depends: gcc (>= 5.0) | g++ (>= 4.4) | clang (>= 3.0),
scons (>= 2.0.0),
python-dev (>= 2.6.6-2),
${misc:Depends},
${python:Depends}
Recommends: python-lxml (>=2.3),
Recommends: python-lxml (>= 2.3),
python-qt4 (>= 4.8.6),
strace
strace,
chrpath
Suggests: ccache
Description: Python compiler with full language support and CPython compatibility
This Python compiler achieves full language compatibility and compiles Python
Expand Down
2 changes: 1 addition & 1 deletion misc/make-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def checkAtHome():
).strip()

branch_name = subprocess.check_output(
"git name-rev --name-only HEAD".split()
"git symbolic-ref --short HEAD".split()
).strip()

assert options.no_branch_check or branch_name in (
Expand Down
7 changes: 2 additions & 5 deletions nuitka/MainControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ def getResultFullpath(main_module):
result = getResultBasepath(main_module)

if Options.shallMakeModule():
if Utils.getOS() == "Windows":
result += ".pyd"
else:
result += ".so"
result += Utils.getSharedLibrarySuffix()
else:
result += ".exe"

Expand All @@ -182,7 +179,7 @@ def cleanSourceDirectory(source_dir):
if Utils.isDir(source_dir):
for path, _filename in Utils.listDir(source_dir):
if Utils.getExtension(path) in (".c", ".h", ".o", ".os", ".obj",
".bin", ".res", ".rc", ".S",
".bin", ".res", ".rc", ".S", ".cpp",
".manifest"):
Utils.deleteFile(path, True)
else:
Expand Down
2 changes: 1 addition & 1 deletion nuitka/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
""" Options module """

version_string = """\
Nuitka V0.5.23
Nuitka V0.5.23.1
Copyright (C) 2016 Kay Hayen."""

import logging
Expand Down
19 changes: 14 additions & 5 deletions nuitka/build/SingleExe.scons
Original file line number Diff line number Diff line change
Expand Up @@ -1498,12 +1498,21 @@ source_files = discoverSourceFiles()
if module_mode:
# For Python modules, the standard shared library extension is not what
# gets used.
if win_target:
module_suffix = ".pyd"
else:
module_suffix = ".so"
def getSharedLibrarySuffix():
import imp

result = None

for suffix, _mode, module_type in imp.get_suffixes():
if module_type != imp.C_EXTENSION:
continue

if result is None or len(suffix) < len(result):
result = suffix

return result

env["SHLIBSUFFIX"] = module_suffix
env["SHLIBSUFFIX"] = getSharedLibrarySuffix()

target = env.SharedLibrary(
result_basepath,
Expand Down
100 changes: 98 additions & 2 deletions nuitka/build/static_src/CompiledCoroutineType.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ PyObject *AWAIT_COROUTINE( struct Nuitka_CoroutineObject *coroutine, PyObject *a
{
struct Nuitka_CoroutineObject *awaited_coroutine = (struct Nuitka_CoroutineObject *)awaitable;

if( awaited_coroutine->m_awaiting == true )
if ( awaited_coroutine->m_awaiting )
{
Py_DECREF( awaitable_iter );

Expand Down Expand Up @@ -1141,6 +1141,102 @@ PyObject *AWAIT_COROUTINE( struct Nuitka_CoroutineObject *coroutine, PyObject *a
return retval;
}

#if PYTHON_VERSION >= 352

/* Our "aiter" wrapper clone */
struct Nuitka_AIterWrapper
{
PyObject_HEAD
PyObject *aw_aiter;
};


static PyObject *Nuitka_AIterWrapper_iternext( struct Nuitka_AIterWrapper *aw )
{
PyErr_SetObject( PyExc_StopIteration, aw->aw_aiter );
return NULL;
}

static int Nuitka_AIterWrapper_traverse( struct Nuitka_AIterWrapper *aw, visitproc visit, void *arg )
{
Py_VISIT((PyObject *)aw->aw_aiter);
return 0;
}

static void Nuitka_AIterWrapper_dealloc( struct Nuitka_AIterWrapper *aw )
{
Nuitka_GC_UnTrack( (PyObject *)aw );
Py_CLEAR( aw->aw_aiter );
PyObject_GC_Del( aw );
}

static PyAsyncMethods Nuitka_AIterWrapper_as_async =
{
PyObject_SelfIter, /* am_await */
0, /* am_aiter */
0 /* am_anext */
};

PyTypeObject Nuitka_AIterWrapper_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"compiled_aiter_wrapper",
sizeof(struct Nuitka_AIterWrapper), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)Nuitka_AIterWrapper_dealloc, /* destructor tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
&Nuitka_AIterWrapper_as_async, /* tp_as_async */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
"A wrapper object for '__aiter__' backwards compatibility.",
(traverseproc)Nuitka_AIterWrapper_traverse, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
PyObject_SelfIter, /* tp_iter */
(iternextfunc)Nuitka_AIterWrapper_iternext, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
PyObject_Del, /* tp_free */
};


PyObject *Nuitka_AIterWrapper_New( PyObject *aiter )
{
struct Nuitka_AIterWrapper *aw = PyObject_GC_New(
struct Nuitka_AIterWrapper,
&Nuitka_AIterWrapper_Type
);
CHECK_OBJECT( aw );

Py_INCREF( aiter );
aw->aw_aiter = aiter;

Nuitka_GC_Track( aw );
return (PyObject *)aw;
}

#endif

PyObject *MAKE_ASYNC_ITERATOR( struct Nuitka_CoroutineObject *coroutine, PyObject *value )
{
#if _DEBUG_COROUTINE
Expand Down Expand Up @@ -1183,7 +1279,7 @@ PyObject *MAKE_ASYNC_ITERATOR( struct Nuitka_CoroutineObject *coroutine, PyObjec
Py_TYPE( iter )->tp_as_async->am_anext != NULL)
{

PyObject *wrapper = _PyAIterWrapper_New( iter );
PyObject *wrapper = Nuitka_AIterWrapper_New( iter );
Py_DECREF( iter );

iter = wrapper;
Expand Down
15 changes: 15 additions & 0 deletions nuitka/utils/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"""

import imp
import os
import sys

Expand All @@ -47,6 +48,19 @@ def getArchitecture():
return os.uname()[4] # @UndefinedVariable


def getSharedLibrarySuffix():
result = None

for suffix, _mode, module_type in imp.get_suffixes():
if module_type != imp.C_EXTENSION:
continue

if result is None or len(suffix) < len(result):
result = suffix

return result


def relpath(path):
try:
return os.path.relpath(path)
Expand Down Expand Up @@ -156,6 +170,7 @@ def makePath(path):
if not os.path.isdir(path):
os.makedirs(path)


def getCoreCount():
cpu_count = 0

Expand Down

0 comments on commit 02bcb53

Please sign in to comment.