Merge pull request #116570 from dnr/gphotos-sync

This commit is contained in:
Sandro 2021-04-09 02:55:52 +02:00 committed by GitHub
commit 6fc2b7ecc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 144 additions and 0 deletions

View file

@ -2471,6 +2471,12 @@
githubId = 1708810;
name = "Daniel Vianna";
};
dnr = {
email = "dnr@dnr.im";
github = "dnr";
githubId = 466723;
name = "David Reiss";
};
dochang = {
email = "dochang@gmail.com";
github = "dochang";

View file

@ -0,0 +1,27 @@
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pytestCheckHook }:
buildPythonPackage rec {
pname = "baseline";
version = "1.2.1";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "dmgass";
repo = "baseline";
rev = "95a0b71806ed16310eb0f27bc48aa5e21f731423";
sha256 = "0qjg46ipyfjflvjqzqr5p7iylwwqn2mhhrq952d01vi8wvfds10d";
};
checkInputs = [ pytestCheckHook ];
meta = with lib; {
description = "Easy String Baseline";
longDescription = ''
This tool streamlines creation and maintenance of tests which compare
string output against a baseline.
'';
homepage = "https://github.com/dmgass/baseline";
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, plum-py, pytestCheckHook, baseline }:
buildPythonPackage rec {
pname = "exif";
version = "1.2.0";
disabled = !isPy3k;
src = fetchFromGitLab {
owner = "TNThieding";
repo = "exif";
rev = "686857c677f489759db90b1ad61fa1cc1cac5f9a";
sha256 = "0z2if23kmi0iyxviz32mlqs997i3dqpqfz6nznlwkhkkb6rkwwnh";
};
propagatedBuildInputs = [ plum-py ];
postPatch = ''
substituteInPlace setup.py \
--replace "plum-py==0.3.1" "plum-py>=0.3.1"
'';
checkInputs = [ pytestCheckHook baseline ];
meta = with lib; {
description = "Read and modify image EXIF metadata using Python";
homepage = "https://gitlab.com/TNThieding/exif";
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}

View file

@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, pytest, baseline }:
buildPythonPackage rec {
pname = "plum-py";
version = "0.4.0";
disabled = !isPy3k;
src = fetchFromGitLab {
owner = "dangass";
repo = "plum";
rev = "6a9ff863c0e9fa21f7b2230d25402155a5522e4b";
sha256 = "1iv62yb704c61b0dvsmyp3j6xpbmay532g9ny4pw4zbg3l69vd5j";
};
postPatch = ''
substituteInPlace src/plum/int/flag/_flag.py \
--replace 'if sys.version_info < (3, 7):' 'if True:'
'';
checkInputs = [ pytest baseline ];
checkPhase = "pytest tests";
meta = with lib; {
description = "Classes and utilities for packing/unpacking bytes";
homepage = "https://plum-py.readthedocs.io/en/latest/index.html";
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}

View file

@ -0,0 +1,44 @@
{ lib, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "gphotos-sync";
version = "2.14.2";
src = fetchFromGitHub {
owner = "gilesknap";
repo = "gphotos-sync";
rev = version;
sha256 = "0cfmbrdy6w18hb623rjn0a4hnn3n63jw2jlmgn4a2k1sjqhpx3bf";
};
propagatedBuildInputs = with python3Packages; [
appdirs
attrs
exif
psutil
pyyaml
requests_oauthlib
];
checkInputs = with python3Packages; [
pytestCheckHook
mock
];
checkPhase = ''
export HOME=$(mktemp -d)
# patch to skip all tests that do network access
cat >>test/test_setup.py <<EOF
import pytest, requests
requests.Session.__init__ = lambda *args, **kwargs: pytest.skip("no network access")
EOF
pytestCheckPhase
'';
meta = with lib; {
description = "Google Photos and Albums backup with Google Photos Library API";
homepage = "https://github.com/gilesknap/gphotos-sync";
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}

View file

@ -5079,6 +5079,8 @@ in
ldmtool = callPackage ../tools/misc/ldmtool { };
gphotos-sync = callPackage ../tools/backup/gphotos-sync { };
gpodder = callPackage ../applications/audio/gpodder { };
gpp = callPackage ../development/tools/gpp { };

View file

@ -936,6 +936,8 @@ in {
base58 = callPackage ../development/python-modules/base58 { };
baseline = callPackage ../development/python-modules/baseline { };
baselines = callPackage ../development/python-modules/baselines { };
basemap = callPackage ../development/python-modules/basemap { };
@ -2248,6 +2250,8 @@ in {
executor = callPackage ../development/python-modules/executor { };
exif = callPackage ../development/python-modules/exif { };
exifread = callPackage ../development/python-modules/exifread { };
expiringdict = callPackage ../development/python-modules/expiringdict { };
@ -5232,6 +5236,8 @@ in {
plugwise = callPackage ../development/python-modules/plugwise { };
plum-py = callPackage ../development/python-modules/plum-py { };
plumbum = callPackage ../development/python-modules/plumbum { };
ply = callPackage ../development/python-modules/ply { };