summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2021-07-10 15:53:05 -0500
committerJohn Helmert III <ajak@gentoo.org>2021-07-10 16:30:32 -0500
commitd9f335c58209e7d4f80b3ba028586511372eca88 (patch)
treede38953c96353d3a60c924e9b17ffdae1570a1c9 /dev-python/vdirsyncer
parentdev-python/pytest-subtesthack: update EAPI 7 -> 8 (diff)
downloadgentoo-d9f335c58209e7d4f80b3ba028586511372eca88.tar.gz
gentoo-d9f335c58209e7d4f80b3ba028586511372eca88.tar.bz2
gentoo-d9f335c58209e7d4f80b3ba028586511372eca88.zip
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@gentoo.org>
Diffstat (limited to 'dev-python/vdirsyncer')
-rw-r--r--dev-python/vdirsyncer/files/vdirsyncer-0.18.0-no-cov.patch25
-rw-r--r--dev-python/vdirsyncer/vdirsyncer-0.18.0-r1.ebuild63
2 files changed, 88 insertions, 0 deletions
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 000000000000..d7e1d537ce49
--- /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 <ajak@gentoo.org>
+
+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 000000000000..21d72fd5f54a
--- /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}
+}