#3806 Add python3 venv to Vagrant
Merged 5 years ago by pingou. Opened 5 years ago by lenkaseg.
Unknown source vagrant_python3_tests  into  master

@@ -15,6 +15,9 @@

  * Logs for the server are available with `journalctl`; the services are run

    as systemd user units in ~/.config/systemd/user/

  

+ * To run the tests you need python3 virtualenv: `workon python3-pagure`.

+   Then you can run them with `./runtests.py run`.

+ 

  Once you start the server you can navigate to http://localhost:5000/

  in your browser on the host to access your Pagure development environment.

  

@@ -82,6 +82,16 @@

    with_items:

      - "pygit2=={{ libgit2_version.stdout_lines[0] }}.*"

  

+ # Install Pagure inside a virtualenv and configure it for python3

+ - name: Install pygit2 in the python3 virtualenv

+   become_user: "{{ ansible_env.SUDO_USER }}"

+   pip:

+     name: "{{ item }}"

+     virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/

+     virtualenv_python: python3

+   with_items:

+     - "pygit2=={{ libgit2_version.stdout_lines[0] }}.*"

+ 

  - name: Install Pagure Python dependencies into a virtualenv

    become_user: "{{ ansible_env.SUDO_USER }}"

    pip:
@@ -93,6 +103,17 @@

      - "requirements-ev.txt"

      - "tests_requirements.txt"

  

+ - name: Install Pagure Python dependencies into a python3 virtualenv

+   become_user: "{{ ansible_env.SUDO_USER }}"

+   pip:

+     requirements: /home/{{ ansible_env.SUDO_USER }}/devel/{{ item }}

+     virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python3-pagure/

+     virtualenv_python: python3

+   with_items:

+     - "requirements.txt"

+     - "requirements-ev.txt"

+     - "tests_requirements.txt"

+ 

  - name: Install Pagure package into a virtualenv

    become_user: "{{ ansible_env.SUDO_USER }}"

    pip: