| 108 | |
| 109 | == Building the Efl/Gtk port in a distro which uses Python 3.x as default == |
| 110 | |
| 111 | If you use a distro which has Python 3 as the default python for the system - such as [http://www.archlinux.org ArchLinux] -, you will have problems during the step that uses JHBuild to manage the dependencies of Efl and Gtk ports, since it requires Python 2. |
| 112 | A solution to enable you to work properly with these ports in such distros would be to install [http://www.virtualenv.org/ virtualenv], which allows you to create virtual environments that may use different versions of python. |
| 113 | |
| 114 | In ArchLinux, you would install virtualenv with the following command: |
| 115 | {{{ |
| 116 | # pacman -S python2-virtualenv |
| 117 | }}} |
| 118 | |
| 119 | [The next instructions are not distro-specific.] |
| 120 | |
| 121 | After installing virtualenv, create the place where the virtual environment will live: |
| 122 | {{{ |
| 123 | $ mkdir -p ~/.virtualenvs/webkit |
| 124 | }}} |
| 125 | |
| 126 | And create the actual virtual environment: |
| 127 | {{{ |
| 128 | $ virtualenv2 ~/.virtualenvs/webkit |
| 129 | }}} |
| 130 | |
| 131 | Now that the virtual environment exists, you will basically activate it before working on WebKit and once you are done, you can deactivate it. |
| 132 | |
| 133 | To activate the virtual environment: |
| 134 | {{{ |
| 135 | $ source ~/.virtualenvs/webkit/bin/activate |
| 136 | }}} |
| 137 | |
| 138 | Now your default python is Python 2, which allows you to use JHBuild and build WebKit without hassle. |
| 139 | |
| 140 | When you are done, simply deactivate the virtual environment: |
| 141 | {{{ |
| 142 | $ deactivate |
| 143 | }}} |
| 144 | |
| 145 | And you are back to your distro's default python. |