summaryrefslogtreecommitdiff
path: root/setup.py
blob: 48eb1769a3c6d8f05bbc5039ff425c666191df82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import re
from setuptools import setup, find_packages
import sys

version = None
with open('web/lib/version.inc.php', 'r') as f:
    for line in f.readlines():
        match = re.match(r'^define\("AURWEB_VERSION", "v([0-9.]+)"\);$', line)
        if match:
            version = match.group(1)

if not version:
    sys.stderr.write('error: Failed to parse version file!')
    sys.exit(1)

setup(
    name="aurweb",
    version=version,
    packages=find_packages(),
)