Skip to content

Commit 66e9885

Browse files
committed
update installation docs
1 parent a8b82a0 commit 66e9885

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

INSTALL.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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)
6563
mkdir /srv/patchman
6664
cd /srv/patchman
6765
python3 -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
7168
patchman-manage migrate
7269
patchman-manage createsuperuser
7370
gunicorn patchman.wsgi -b 0.0.0.0:80

patchman/settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@
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')

0 commit comments

Comments
 (0)