#533 Use Python3 by default
Merged 6 years ago by abompard. Opened 6 years ago by abompard.
abompard/fedora-hubs feature/py3  into  develop

file modified
+1 -1
@@ -4,7 +4,7 @@ 

  VAGRANTFILE_API_VERSION = "2"

  

  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

-  config.vm.box = "fedora/25-cloud-base"

+  config.vm.box = "fedora/27-cloud-base"

  

   # Forward traffic on the host to the development server on the guest

   config.vm.network "forwarded_port", guest: 5000, host: 5000

@@ -13,35 +13,32 @@ 

      - mongodb-server

      - fedmsg-hub

      - fedmsg-relay

-     - python-virtualenv

+     - python3-virtualenv

      - python3-flask-oidc

      - postfix

  

  - name: Install the distribution versions of requirements.txt

    dnf: name={{ item }} state=present

    with_items:

-     - python-alembic

-     - python-arrow

-     - python-bleach

-     - python-decorator

-     - python-dogpile-cache

-     - python-fedmsg-core

-     - python-fedmsg-meta-fedora-infrastructure

-     - python-flask

-     - python-flask-oidc

-     - python-fmn-lib

-     - python-fmn-rules

-     - python-futures

-     - python-html5lib

-     - python-munch

-     - pytz

-     - python-sqlalchemy

-     - python-markdown

-     - python2-pkgwat-api

-     - python-six

-     - python-pygments

-     - python-pygments-markdown-lexer

-     - python-retask

+     - python3-alembic

+     - python3-arrow

+     - python3-bleach

+     - python3-decorator

+     - python3-dogpile-cache

+     - python3-fedmsg-core

+     - python3-fedmsg-meta-fedora-infrastructure

+     - python3-flask

+     - python3-flask-oidc

+     - python3-html5lib

+     - python3-munch

+     - python3-pytz

+     - python3-sqlalchemy

+     - python3-markdown

+     - python3-pkgwat-api

+     - python3-six

+     - python3-pygments

+     - python3-pygments-markdown-lexer

+     - python3-retask

  

  

  # Create directory structure
@@ -67,6 +64,7 @@ 

      requirements: "{{ hubs_code_dir }}/requirements.txt"

      virtualenv: "{{ hubs_venv_dir}}"

      virtualenv_site_packages: yes

+     virtualenv_command: virtualenv-3

  

  - name: Install Fedora Hubs test-requirements.txt into hubs virtualenv

    become_user: "{{ main_user }}"
@@ -74,6 +72,7 @@ 

      requirements: "{{ hubs_code_dir }}/test-requirements.txt"

      virtualenv: "{{ hubs_venv_dir}}"

      virtualenv_site_packages: yes

+     virtualenv_command: virtualenv-3

  

  - name: Install other packages into hubs virtualenv

    become_user: "{{ main_user }}"
@@ -81,6 +80,7 @@ 

      name: "{{ item }}"

      virtualenv: "{{ hubs_venv_dir }}"

      virtualenv_site_packages: yes

+     virtualenv_command: virtualenv-3

    with_items:

      - bleach

  
@@ -88,7 +88,7 @@ 

    become_user: "{{ main_user }}"

    command: "{{ hubs_venv_dir }}/bin/pip install -e {{ hubs_code_dir }}"

    args:

-     creates: "{{ hubs_venv_dir }}/lib/python2.7/site-packages/fedora-hubs.egg-link"

+     creates: "{{ hubs_venv_dir }}/lib/python3.5/site-packages/fedora-hubs.egg-link"

  

  - name: Set bin file context in the virtualenv

    become_user: "{{ main_user }}"

@@ -1,4 +1,4 @@ 

- web: {{ hubs_venv_dir }}/bin/python /usr/bin/flask run --host 0.0.0.0 --port 5000

+ web: {{ hubs_venv_dir }}/bin/python /usr/bin/flask-3 run --host 0.0.0.0 --port 5000

  triage: {{ hubs_venv_dir }}/bin/fedora-hubs-triage

  worker: {{ hubs_venv_dir }}/bin/fedora-hubs-worker

  sse: {{ hubs_venv_dir }}/bin/python /usr/bin/twistd -l - --pidfile= -ny {{ hubs_code_dir }}/hubs/backend/sse_server.tac

file modified
-2
@@ -12,8 +12,6 @@ 

  python-fedora

  flask

  flask-oidc>=1.0.3

- fmn.lib

- fmn.rules

  gunicorn

  html5lib==0.9999999

  humanize

file modified
+1 -1
@@ -1,5 +1,5 @@ 

  [tox]

- envlist = py{27,34,35}-flask01{0,1,2},js,jslint,docs,lint

+ envlist = py{27,34,35,36}-flask01{0,1,2},js,jslint,docs,lint

  skipsdist = True

  

  

LGTM! :thumbsup:

just tried out the vagrant box, and everything works great!

rebased onto 4be8ee5

6 years ago

Pull-Request has been merged by abompard

6 years ago