Qt for Python/GettingStarted/MacOS: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(First version)
 
No edit summary
 
(29 intermediate revisions by 5 users not shown)
Line 1: Line 1:
(page under construction)
[[Category:Qt for Python]] 
==== Requirements ====                                                             
== Official documentation ==  
* Qt package from https://www.qt.io or a custom build of Qt (preferably '''Qt 5.9''' or '''Qt 5.6''')
 
* Python from https://www.python.org/downloads/ ('''Python 3.6''' or '''Python 2.7''')
Refer to the [https://doc.qt.io/qtforpython/gettingstarted-macOS.html official docs] to get started on macOS.
* '''Xcode''' (macOS)                                                               
 
* CMake from https://cmake.org/download/ ('''>= 3.1''')                             
== Development ==                                                                                                                                      
* libclang (required for the 5.9 and dev branches) from [http://download.qt.io/development_releases/prebuilt/libclang/ download.qt.io] ('''>= 3.9''')
Development happens in the 5.15 and dev branches of the [http://code.qt.io/cgit/pyside/pyside-setup.git/ pyside-setup repository].                                                                              
* [https://llvm.org/ LLVM]                                                         
* virtualenv (optional but recommended)                                             
* Python sphinx package for documentation (optional, pip install sphinx)           
                                                                                   
==== setup.py build script ====                                                     
                                                                                   
Note: When doing local builds of Qt on macOS you will need to set either the DYLD_LIBRARY_PATH or DYLD_FRAMEWORK_PATH environment variables.
                                                                                   
== Development ==                                                                  
                                                                                   
Development happens in the 5.9 and dev branches of the [http://code.qt.io/cgit/pyside/pyside-setup.git/ pyside-setup repository].
                                                                                   
The top level repository has the following submodules:                               
The top level repository has the following submodules:                               
* sources/pyside2-tools: uic, rcc tools                                             
* sources/pyside2-tools: pyside2-lupdate
                                                                                   
 
Contributions follow the [[Qt_Project_Guidelines|standard process]].·               
Contributions follow the [[Qt_Project_Guidelines|standard process]].                                                                                              
                                                                                   
 
It is helpful to have debug binaries and/or symbols for Python available.             
It is helpful to have debug binaries and/or symbols for Python available.             
On macOS you will need to build the Python interpreter with debug symbols by hand.  
On macOS you will need to build the Python interpreter with debug symbols by hand.                                                                          
                                                                                   
It is also recommended to use a [http://docs.python-guide.org/en/latest/dev/virtualenvs/ Virtual Environment] for testing to be able to always start from a clean base and avoid issues with write permissions in installations.                                                                            
It is also recommended to use a [http://docs.python-guide.org/en/latest/dev/virtualenvs/ Virtual Environment] for testing to be able to always start from a clean base and avoid issues with write permissions in installations.
                                                                                   
On macOS, the command                                                                 
On macOS, the command                                                                 
  virtualenv -p /usr/bin/python3-dbg testenv                                           
  virtualenv -p /usr/bin/python3-dbg testenv                                           
creates a Virtual Environment named ''testenv'' for debugging purposes.            
creates a Virtual Environment named ''testenv'' for debugging purposes.                                                                                          
                                                                                   
Before building the first time, the module [http://www.sphinx-doc.org/en/1.4.9/ Sphinx] should be installed into the virtual environment:
Before building the first time, the module [http://www.sphinx-doc.org/en/1.4.9/ Sphinx] should be installed into the virtual environment:
  pip install sphinx
  pip install sphinx

Latest revision as of 10:57, 2 January 2020

Official documentation

Refer to the official docs to get started on macOS.

Development

Development happens in the 5.15 and dev branches of the pyside-setup repository. The top level repository has the following submodules:

  • sources/pyside2-tools: pyside2-lupdate

Contributions follow the standard process.

It is helpful to have debug binaries and/or symbols for Python available. On macOS you will need to build the Python interpreter with debug symbols by hand. It is also recommended to use a Virtual Environment for testing to be able to always start from a clean base and avoid issues with write permissions in installations. On macOS, the command

virtualenv -p /usr/bin/python3-dbg testenv                                          

creates a Virtual Environment named testenv for debugging purposes. Before building the first time, the module Sphinx should be installed into the virtual environment:

pip install sphinx