commit:     d9f335c58209e7d4f80b3ba028586511372eca88
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 10 20:53:05 2021 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Sat Jul 10 21:30:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9f335c5

dev-python/vdirsyncer: Python bump, fix tests, install systemd files

Also close old test bugs related to hypothesis which don't seem
reproducible with any modern hypothesis versions in tree.

Closes: https://bugs.gentoo.org/641546
Closes: https://bugs.gentoo.org/668360
Closes: https://bugs.gentoo.org/743953
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 .../files/vdirsyncer-0.18.0-no-cov.patch           | 25 +++++++++
 dev-python/vdirsyncer/vdirsyncer-0.18.0-r1.ebuild  | 63 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/dev-python/vdirsyncer/files/vdirsyncer-0.18.0-no-cov.patch 
b/dev-python/vdirsyncer/files/vdirsyncer-0.18.0-no-cov.patch
new file mode 100644
index 00000000000..d7e1d537ce4
--- /dev/null
+++ b/dev-python/vdirsyncer/files/vdirsyncer-0.18.0-no-cov.patch
@@ -0,0 +1,25 @@
+Avoid pytest-cov involvement:
+
+https://dev.gentoo.org/~mgorny/python-guide/pytest.html#avoiding-dependencies-on-other-pytest-plugins
+
+Signed-Off-By: John Helmert III <[email protected]>
+
+diff --git a/setup.cfg b/setup.cfg
+index 2428e44..117f237 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,14 +1,6 @@
+ [wheel]
+ universal = 1
+ 
+-[tool:pytest]
+-addopts = 
+-      --tb=short
+-      --cov-config .coveragerc
+-      --cov=vdirsyncer
+-      --cov-report=term-missing
+-      --no-cov-on-fail
+-
+ [flake8]
+ application-import-names = tests,vdirsyncer
+ extend-ignore = 

diff --git a/dev-python/vdirsyncer/vdirsyncer-0.18.0-r1.ebuild 
b/dev-python/vdirsyncer/vdirsyncer-0.18.0-r1.ebuild
new file mode 100644
index 00000000000..21d72fd5f54
--- /dev/null
+++ b/dev-python/vdirsyncer/vdirsyncer-0.18.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 systemd
+
+DESCRIPTION="Synchronize calendars and contacts"
+HOMEPAGE="https://github.com/pimutils/vdirsyncer";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RDEPEND="dev-python/click[${PYTHON_USEDEP}]
+       >=dev-python/click-log-0.3.0[${PYTHON_USEDEP}]
+       <dev-python/click-log-0.4.0[${PYTHON_USEDEP}]
+       >=dev-python/click-threading-0.5[${PYTHON_USEDEP}]
+       dev-python/requests[${PYTHON_USEDEP}]
+       dev-python/requests-toolbelt[${PYTHON_USEDEP}]
+       dev-python/atomicwrites[${PYTHON_USEDEP}]"
+BDEPEND="
+       dev-python/setuptools_scm[${PYTHON_USEDEP}]
+       test? (
+               dev-python/hypothesis[${PYTHON_USEDEP}]
+               dev-python/pytest-localserver[${PYTHON_USEDEP}]
+               dev-python/pytest-subtesthack[${PYTHON_USEDEP}]
+       )"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.18.0-no-cov.patch"
+)
+
+DOCS=( AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst config.example )
+
+distutils_enable_tests pytest
+
+python_test() {
+       # skip tests needing servers running
+       local -x DAV_SERVER=skip
+       local -x REMOTESTORAGE_SERVER=skip
+       # pytest dies hard if the envvars do not have any value...
+       local -x CI=false
+       local -x DETERMINISTIC_TESTS=false
+
+       local deselect=(
+               # test CA is too weak for modern python
+               tests/system/utils/test_main.py::test_request_ssl
+               tests/system/utils/test_main.py::test_request_ssl_fingerprints
+       )
+
+       epytest ${deselect[@]/#/--deselect }
+}
+
+src_install() {
+       distutils-r1_src_install
+
+       systemd_dounit contrib/vdirsyncer.{service,timer}
+}

Reply via email to