summaryrefslogtreecommitdiffstats
path: root/git-interface/git-update.py
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-09-20 20:18:24 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-09-29 22:07:06 +0200
commitdc3fd60715a5b17b9542ec888c6eaeb14c284e2b (patch)
tree18d9f17b8d582409f0db55ee32fc5efa674aaa2e /git-interface/git-update.py
parent1946486a67d6085318e00c753d341ab05d12904c (diff)
downloadaur-dc3fd60715a5b17b9542ec888c6eaeb14c284e2b.tar.gz
aur-dc3fd60715a5b17b9542ec888c6eaeb14c284e2b.tar.xz
Use setuptools to install Python modules
Instead of using relative imports, add support for installing the config and db Python modules to a proper location using setuptools. Change all git-interface scripts to access those modules from the search path. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface/git-update.py')
-rwxr-xr-xgit-interface/git-update.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py
index 36c38ae8..73373410 100755
--- a/git-interface/git-update.py
+++ b/git-interface/git-update.py
@@ -10,15 +10,15 @@ import time
import srcinfo.parse
import srcinfo.utils
-import config
-import db
+import aurweb.config
+import aurweb.db
-notify_cmd = config.get('notifications', 'notify-cmd')
+notify_cmd = aurweb.config.get('notifications', 'notify-cmd')
-repo_path = config.get('serve', 'repo-path')
-repo_regex = config.get('serve', 'repo-regex')
+repo_path = aurweb.config.get('serve', 'repo-path')
+repo_regex = aurweb.config.get('serve', 'repo-regex')
-max_blob_size = config.getint('update', 'max-blob-size')
+max_blob_size = aurweb.config.getint('update', 'max-blob-size')
def size_humanize(num):
@@ -256,7 +256,7 @@ def main():
if refname != "refs/heads/master":
die("pushing to a branch other than master is restricted")
- conn = db.Connection()
+ conn = aurweb.db.Connection()
# Detect and deny non-fast-forwards.
if sha1_old != "0" * 40 and not privileged: