File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -57,17 +57,14 @@ patchman-manage createsuperuser
5757
5858### virtualenv + pip
5959
60- TBD - not working yet
61-
6260``` shell
63- apt -y install gcc libxml2-dev libxslt1-dev virtualenv python3-dev zlib1g-dev # (debian/ubuntu)
64- dnf -y install gcc libxml2-devel libxslt-devel python3-virtualenv # (rocky/alma/redhat)
61+ apt -y install python3-venv # (debian/ubuntu)
62+ dnf -y install python3-virtualenv # (rocky/alma/redhat)
6563mkdir /srv/patchman
6664cd /srv/patchman
6765python3 -m venv .venv
6866. .venv/bin/activate
69- pip install --upgrade pip
70- pip install patchman gunicorn whitenoise==3.3.1
67+ pip install patchman gunicorn whitenoise
7168patchman-manage migrate
7269patchman-manage createsuperuser
7370gunicorn patchman.wsgi -b 0.0.0.0:80
Original file line number Diff line number Diff line change 148148 # if sys.prefix + conf_path doesn't exist, try ./etc/patchman (source)
149149 if not os .path .isdir (conf_path ):
150150 conf_path = './etc/patchman'
151- # if ./etc/patchman doesn't exist, try site.getsitepackages() (pip)
151+ # if ./etc/patchman doesn't exist, try site.getsitepackages() (pip/new-style virtualenv )
152152 if not os .path .isdir (conf_path ):
153153 try :
154- sitepackages = site .getsitepackages ()
155- except AttributeError :
156- # virtualenv, try site-packages in sys.path
154+ sitepackages = site .getsitepackages ()[ 0 ]
155+ except ( AttributeError , IndexError ) :
156+ # old-style virtualenv, try site-packages in sys.path
157157 sp = 'site-packages'
158158 sitepackages = [s for s in sys .path if s .endswith (sp )][0 ]
159159 conf_path = os .path .join (sitepackages , 'etc/patchman' )
You can’t perform that action at this time.
0 commit comments