mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
1946486a67
commit
dc3fd60715
10 changed files with 66 additions and 42 deletions
20
setup.py
Normal file
20
setup.py
Normal file
|
@ -0,0 +1,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(),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue