fixed installation

This commit is contained in:
Christian Moser 2025-02-17 18:43:40 +01:00
parent ec78c97dc6
commit 41c061a2f4
Failed to extract signature
5 changed files with 25 additions and 10 deletions

View File

@ -4,7 +4,11 @@
SELF="$(realpath "$0")"
PROJECT_ROOT="$(dirname "$SELF")"
: ${PYTHON_VENV_DIR:=${HOME}/.local/venv}
"${PROJECT_ROOT}/centos-install-requirements.sh"
if [ "$INSTALL_REQUIREMENTS" = "yes" ]; then
"${PROJECT_ROOT}/centos-install-requirements.sh"
fi
if [ ! -d "$PYTHON_VENV_DIR" ]; then
mkdir -pv "$PYTHON_VENV_DIR"
fi
@ -52,6 +56,6 @@ exit_code=\$?
deactivate
exit \$exit_code
EOF
chmod +x "${PYTHON_VENV_DIR}/sgbackup/bin/gsbackup"
chmod +x "${PYTHON_VENV_DIR}/sgbackup/bin/gsgbackup"
ln -sv "${PYTHON_VENV_DIR}/sgbackup/bin/gsgbackup" ~/.local/bin/gsgbackup

View File

@ -4,7 +4,11 @@
SELF="$(realpath "$0")"
PROJECT_ROOT="$(dirname "$SELF")"
: ${PYTHON_VENV_DIR:=${HOME}/.local/venv}
"${PROJECT_ROOT}/fedora-install-requirements.sh"
if [ "$INSTALL_REQUIREMENTS" = "yes" ]; then
"${PROJECT_ROOT}/fedora-install-requirements.sh"
fi
if [ ! -d "$PYTHON_VENV_DIR" ]; then
mkdir -pv "$PYTHON_VENV_DIR"
fi
@ -50,6 +54,6 @@ exit_code=\$?
deactivate
exit \$exit_code
EOF
chmod +x "${PYTHON_VENV_DIR}/sgbackup/bin/gsbackup"
chmod +x "${PYTHON_VENV_DIR}/sgbackup/bin/gsgbackup"
ln -sv "${PYTHON_VENV_DIR}/sgbackup/bin/gsgbackup" ~/.local/bin/gsgbackup

View File

@ -8,18 +8,22 @@ import bz2
PACKAGE_ROOT=os.path.dirname(__file__)
sys.path.insert(0,PACKAGE_ROOT)
import sgbackup
VERSION="0.0.1"
with open(os.path.join(PACKAGE_ROOT,'sgbackup','version.py'),'w') as version_file:
version_file.write("""# This file was automatically created by setup.py
VERSION="{version}"
""".format(version=VERSION))
setup(
name='sgbackup',
version=sgbackup.__version__
version=VERSION,
description='A backup tool for savegames.',
author="Christian Moser",
author_email="christian@cmoser.eu",
packages=[
'sgbackup',
'sgbackup.archivers',
'sgbackup.archiver',
'sgbackup.commands',
'sgbackup.curses',
'sgbackup.help',

View File

@ -17,8 +17,8 @@
###############################################################################
from . import _import_gtk
__version__ = "0.0.1"
from .version VERSION
__version__ = VERSION
from .settings import settings
from . import _logging
from .main import cli_main,gui_main

3
sgbackup/version.py Normal file
View File

@ -0,0 +1,3 @@
# This file was automatically created by setup.py
VERSION="0.0.1"