fixed python packaging

This commit is contained in:
Edwin Eefting 2021-02-07 14:09:57 +01:00
parent 06c8416771
commit f5b0a4f272
4 changed files with 13 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import setuptools
import zfs_autobackup
from zfs_autobackup.ZfsAutobackup import ZfsAutobackup
import os
with open("README.md", "r") as fh:
@ -7,7 +7,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="zfs_autobackup",
version=zfs_autobackup.VERSION,
version=ZfsAutobackup.VERSION,
author="Edwin Eefting",
author_email="edwin@datux.nl",
description="ZFS autobackup is used to periodicly backup ZFS filesystems to other locations. It tries to be the most friendly to use and easy to debug ZFS backup tool.",

View File

@ -111,8 +111,8 @@ class ZfsAutobackup:
self.args = args
#auto enable progress?
# if sys.stderr.isatty() and not args.no_progress:
# args.progress = True
if sys.stderr.isatty() and not args.no_progress:
args.progress = True
if args.debug_output:
args.debug = True

View File

@ -0,0 +1,7 @@
def cli():
import sys
from zfs_autobackup.ZfsAutobackup import ZfsAutobackup
zfs_autobackup = ZfsAutobackup(sys.argv[1:], False)
sys.exit(zfs_autobackup.run())

View File

@ -5,7 +5,6 @@
import sys
if __name__ == "__main__":
from zfs_autobackup.ZfsAutobackup import ZfsAutobackup
zfs_autobackup = ZfsAutobackup(sys.argv[1:], False)
sys.exit(zfs_autobackup.run())
from . import cli
cli()