Skip to content

Commit 7801a4b

Browse files
Implemented sys.frozen.
1 parent bc1d1e9 commit 7801a4b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

doc/pdytools_module.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ and, if necessary, to change its behaviour accordingly.
1212
This is the version number of :program:`pdytools` encoded as a single
1313
(non-zero) integer. The encoding used is the same as that used by
1414
:data:`sys.hexversion`.
15+
16+
Deployed applications also follow the convention of other deployment tools of
17+
defining an attribute called :data:`frozen` in the :mod:`sys` module.

pyqtdeploy/builder/lib/pyqtdeploy_start.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ extern "C" int pyqtdeploy_start(int argc, char **argv,
148148
goto py_error;
149149
#endif
150150

151+
// Set sys.frozen.
152+
if (PySys_SetObject("frozen", Py_True) < 0)
153+
goto py_error;
154+
151155
// Configure sys.path.
152156
if (path_dirs != NULL)
153157
{

0 commit comments

Comments
 (0)