Browse Source

Multiple small fixes for the vagrant environment

- Drop the hardcoded pagure config in ~ since we actually use the
  one in /etc/pagure.

- Install the new dependency whitenoise that handles the static files
  cf https://pagure.io/pagure/pull-request/4885

- Create the /usr/local/lib/python... folder before trying to create
  a symlinkg in it

- Fix the symlink created in /usr/local/lib/python... so it points
  to the pagure module rather than the git clone (ie one level to
  high)

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
Pierre-Yves Chibon 3 years ago
parent
commit
6f9f49edb3

+ 0 - 2
dev/ansible/roles/pagure-dev/files/bashrc

@@ -18,8 +18,6 @@ echo "Reminder of the commands:
 # If adding new functions to this file, note that you can add help text to the function
 # by defining a variable with name _<function>_help containing the help text
 
-export PAGURE_CONFIG=~/pagure.cfg
-
 pstart (){
     sudo systemctl start pagure.service \
         pagure-docs.service \

+ 7 - 1
dev/ansible/roles/pagure-dev/tasks/main.yml

@@ -51,6 +51,7 @@
       - python3-sqlalchemy
       - python3-straight-plugin
       - python3-virtualenvwrapper
+      - python3-whitenoise
       - python3-wtforms
       - python3-devel
       - python3-devel
@@ -58,9 +59,14 @@
       - redhat-rpm-config
     state: latest
 
+- name: Create the folder where we'll place the symbolic link for pagure
+  file:
+    path: /usr/local/lib/python3.7/site-packages/
+    state: directory
+
 - name: Create symbolic link for pagure to be in the python path
   file:
-    src: /srv/pagure
+    src: /srv/pagure/pagure
     dest: /usr/local/lib/python3.7/site-packages/pagure
     state: link