Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed-up cmake config and generation #449

Closed
jcfr opened this issue Apr 14, 2014 · 0 comments
Closed

Speed-up cmake config and generation #449

jcfr opened this issue Apr 14, 2014 · 0 comments

Comments

@jcfr
Copy link
Member

jcfr commented Apr 14, 2014

  • Remove unused and unmaintained support for Full PythonQt wrapping
  • Speed-up wrapping of headers.
@jcfr jcfr self-assigned this Apr 14, 2014
@jcfr jcfr changed the title Remove unused and unmaintained support for Full PythonQt wrapping Simplify PythonQt wrapping Apr 14, 2014
@jcfr jcfr changed the title Simplify PythonQt wrapping Simplify and optimized PythonQt wrapping Apr 14, 2014
@jcfr jcfr changed the title Simplify and optimized PythonQt wrapping Speed-up cmake config and generation Apr 16, 2014
jcfr added a commit that referenced this issue Apr 16, 2014
* Since PythonQtGenerator was only used for Python FULL wrapping, remove
the corresponding external project.

* Remove reference to Full wrapping

* Update ctkMacroWrapPythonQt to complain if existing code invoke
the macro with 'IS_WRAP_FULL' set to TRUE
jcfr added a commit that referenced this issue Apr 16, 2014
See #449

System integrating CTK will be responsible to ensure the proper
environment is set to execute the python interpreter.
jcfr added a commit that referenced this issue Apr 16, 2014
If a user which to debug a particular issue, setting the verbose
variable should be sufficient.
jcfr added a commit that referenced this issue Apr 16, 2014
jcfr added a commit that referenced this issue Apr 16, 2014
* 449-speedup-cmake-config-and-generation:
  Fix python script compilation removing inputs from custom target deps. See #449
  Re-create python compile script only if needed and fix dependency. See #449
  Simplify QT4_GENERATE_MOCS. See #449
  Optimize QT4_GENERATE_MOCS macro getting moc flags only when needed
  Do not log PythonQt wrapping output. See #449
  Remove Light wrapping CMake script and directly invoke python executable
  Simplify moc'ing of generated PythonQt wrapper. See #449
  Simplify how path of generated file are specified. See #449
  Configure module init file at configure times. See #449
  Optimize ctkMacroWrapPythonQt creating required source list in a single loop.
  Move all PythonQt wrapping code into one script. See #449
  Remove setting of INCLUDE_DIRS variable specific to PythonQtGenerator
  Remove 'CTK_WRAP_PYTHONQT_FULL' obsolete option. See #449
  Remove code referencing unexisting variable. See #449
jcfr added a commit that referenced this issue Apr 16, 2014
Extension of the "moc_" file will either be cpp or cxx.

Note that to be compliant with Qt [1], for Q_OBJECT class declarations in implementation
(.cpp) file, a file with ".moc" extension should be generated.

[1] http://qt-project.org/doc/qt-4.8/moc.html
jcfr added a commit that referenced this issue Apr 16, 2014
* 449-speedup-cmake-config-and-generation:
  Fix compilation error introduced by 130deab. See #449
@jcfr jcfr closed this as completed May 5, 2014
jcfr added a commit to jcfr/CTK that referenced this issue Mar 10, 2015
Including QObject is sufficient, this was an oversight of the initial
implementation added in d3f81f4 (Move all PythonQt wrapping code into
one script. See commontk#449)

Inspired-by: Eric Heim <e.heim@dkfz-heidelberg.de>
jcfr added a commit to jcfr/CTK that referenced this issue Apr 30, 2015
Including QObject is sufficient, this was an oversight of the initial
implementation added in d3f81f4 (Move all PythonQt wrapping code into
one script. See commontk#449)

Inspired-by: Eric Heim <e.heim@dkfz-heidelberg.de>
jcfr added a commit to jcfr/CTK that referenced this issue Jan 27, 2024
Refine the script introduced in commit db3f4d9 ("Re-create python compile
script only if needed and fix dependency. See commontk#449", 2014-04-16) by explicitly
specifying the `cfile` parameter. Disable the default behavior (introduced in
Python 3.2) of generating .pyc files in the `__pycache__` directory, as outlined
in PEP-3147.

This improvement is needed for Slicer-based applications, enabling them to
locate scripted modules and plugins as either .py or .pyc files in a specific
directory.

References:
* PEP-3147: https://peps.python.org/pep-3147/
* Slicer Forum Discussion: https://discourse.slicer.org/t/how-to-hide-the-code-of-the-script-module/26135/14
* Python Documentation: https://docs.python.org/3/library/py_compile.html#py_compile.compile
jcfr added a commit that referenced this issue Jan 28, 2024
Refine the script introduced in commit db3f4d9 ("Re-create python compile
script only if needed and fix dependency. See #449", 2014-04-16) by explicitly
specifying the `cfile` parameter. Disable the default behavior (introduced in
Python 3.2) of generating .pyc files in the `__pycache__` directory, as outlined
in PEP-3147.

This improvement is needed for Slicer-based applications, enabling them to
locate scripted modules and plugins as either .py or .pyc files in a specific
directory.

References:
* PEP-3147: https://peps.python.org/pep-3147/
* Slicer Forum Discussion: https://discourse.slicer.org/t/how-to-hide-the-code-of-the-script-module/26135/14
* Python Documentation: https://docs.python.org/3/library/py_compile.html#py_compile.compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant