diff --git a/README.md b/README.md index cf273f5..33d6325 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/MajorcaDevs/mdbackup.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MajorcaDevs/mdbackup/context:python) [![Total alerts](https://img.shields.io/lgtm/alerts/g/MajorcaDevs/mdbackup.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MajorcaDevs/mdbackup/alerts/) +[![Build Status](https://jenkins.majorcadevs.com/buildStatus/icon?job=mdbackup2%2Fmaster&subject=master%20build)](https://jenkins.majorcadevs.com/job/mdbackup2/job/master/) +[![Build Status](https://jenkins.majorcadevs.com/buildStatus/icon?job=mdbackup2%2Fdev&subject=dev%20build)](https://jenkins.majorcadevs.com/job/mdbackup2/job/dev/) Small but customizable utility to create backups and store them in cloud storage providers. @@ -12,9 +14,7 @@ Download from releases the latest `wheel` package and install it. It is recommen **What do yo need?**: - An OS different from Windows (Windows is unsupported) :( - - Python 3.6 or higher - - `rsync` and `ssh` installed (on macOS they are in general installed by default, on Linux distros you may need to install them) - - `bash` must be installed, used to run the scripts + - Python 3.7 or higher First select a folder where all the needed files will be stored. It is important not to move (or rename) this folder after installation. @@ -34,12 +34,12 @@ pip install --upgrade setuptools wheel pip install mdbackup*.whl ``` -Now you can run the utility (only if you have enabled the virtual env) with `mdbackup`. In this folder it is recommended to store the `config` and `steps` folders. +Now you can run the utility (only if you have enabled the virtual env) with `mdbackup`. In this folder it is recommended to store the `config` folder. > **Note:** to be able to use some of the cloud storage and secrets backends, you will be requested to install some packages. Go to the documentation to see what is needed. ## Documentation -Can be found at docs folder. +Can be found at [mdbackup.majorcadevs.com](https://mdbackup.majorcadevs.com/) or at the docs folder. To make the documentation, install the requirements in `docs/requirements.txt` and run `mkdocs build --config-file=mkdocs.yaml`. diff --git a/mdbackup/actions/builtin/_os_utils.py b/mdbackup/actions/builtin/_os_utils.py index 4273424..b6bc45f 100644 --- a/mdbackup/actions/builtin/_os_utils.py +++ b/mdbackup/actions/builtin/_os_utils.py @@ -3,7 +3,11 @@ from pathlib import Path from threading import Thread -import xattr +try: + import xattr +except ImportError: + xattr = None + # Portable way to access to these xattr function across linux, macOS, freebsd... _python_has_xattr_lib = hasattr(os, 'listxattr') and hasattr(os, 'getxattr') and hasattr(os, 'setxattr') diff --git a/setup.py b/setup.py index 56ac5da..188245d 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,17 @@ +import sys + import setuptools with open("README.md", "r") as fh: long_description = fh.read() +extra_packages = [] +if not sys.platform.startswith('linux'): + extra_packages.append('xattr') + setuptools.setup( name="mdbackup", - version="0.4.0-beta.1", + version="0.4.0-beta.2", author="majorcadevs (melchor9000 & amgxv)", author_email="melchor9000@gmail.com", description="Small but customizable utility to create backups and store them in cloud storage providers", @@ -33,7 +39,7 @@ include_package_data=True, install_requires=[ 'pyyaml', - 'xattr', 'jsonschema', + *extra_packages, ], )