confparser.inc.php: Support alternative config path
[aur.git] / setup.py
blob99dbfedfaaaeffcf86ba1c689d89781c497e0e11
1 import re
2 from setuptools import setup, find_packages
3 import sys
5 version = None
6 with open('web/lib/version.inc.php', 'r') as f:
7 for line in f.readlines():
8 match = re.match(r'^define\("AURWEB_VERSION", "v([0-9.]+)"\);$', line)
9 if match:
10 version = match.group(1)
12 if not version:
13 sys.stderr.write('error: Failed to parse version file!')
14 sys.exit(1)
16 setup(
17 name="aurweb",
18 version=version,
19 packages=find_packages(),
20 entry_points={
21 'console_scripts': [
22 'aurweb-git-auth = aurweb.git.auth:main',
23 'aurweb-git-serve = aurweb.git.serve:main',
24 'aurweb-git-update = aurweb.git.update:main',
25 'aurweb-aurblup = aurweb.scripts.aurblup:main',
26 'aurweb-mkpkglists = aurweb.scripts.mkpkglists:main',
27 'aurweb-notify = aurweb.scripts.notify:main',
28 'aurweb-pkgmaint = aurweb.scripts.pkgmaint:main',
29 'aurweb-popupdate = aurweb.scripts.popupdate:main',
30 'aurweb-tuvotereminder = aurweb.scripts.tuvotereminder:main',