1
0
Fork 0

dev-vcs/dandi-cli: added etelemetry support

Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Horea Christian <chr@chymera.eu>
This commit is contained in:
Horea Christian 2021-10-06 17:41:00 -04:00
parent da8a552140
commit 11d21d5a58
No known key found for this signature in database
GPG Key ID: 161C0BE6255333D3
8 changed files with 151 additions and 11 deletions

View File

@ -1,7 +1,8 @@
02 Oct 2021; <chymera@gentoo.org> dandi-cli-0.27.2.ebuild:
dev-vcs/dandi-cli: let tests break for testing purposes
*dandi-cli-0.28.0 (06 Oct 2021)
*dandi-cli-0.27.2 (27 Sep 2021)
27 Sep 2021; <chymera@gentoo.org> +dandi-cli-0.27.2.ebuild, +metadata.xml:
dev-vcs/dandi-cli: new package (DANDI stack) tests fail
06 Oct 2021; <chymera@gentoo.org> +dandi-cli-0.28.0.ebuild,
+files/dandi-cli-0.27.2-no-etelemetry.patch,
+files/dandi-cli-0.27.2-pip-versioncheck.patch,
+files/dandi-cli-0.28.0-pip-versioncheck.patch, -ChangeLog,
dandi-cli-0.27.2.ebuild, metadata.xml:
dev-vcs/dandi-cli: added etelemetry support

View File

@ -1 +1,2 @@
DIST dandi-cli-0.27.2.tar.gz 172781 SHA256 179bbe77be65272932f6e1fc133b043eb94449847155fde3c45455c30b6cbdcc SHA512 00c522a1f5c922e6a38e257defbb02a03480156d61bcf80de3326131533a5cc332771ea05e2a995d7ace71b0ba551151d4ec3d3f4456197cb358133d3aa3fe89 WHIRLPOOL bf059cad4f8a9988a783d0001a68ebec8d480f3188f756af720aa5f0e32002e8301a3f98b2e0c492bb3be07f39959839e8b67c5544c0a3e18e757332a6bdb70c
DIST dandi-cli-0.28.0.tar.gz 173403 SHA256 27b67c93a8625dd15db2e3513ae3448569ccade2dc82eb1f110de5b1c02b5ec3 SHA512 399ee378798a3c7fdc92314dca25e91178bb157145205e43a1d2ec461f36c674ed1b63b97f805ab9d25eb30d18d82827e38024b8a72c691c3992af60fc286be3 WHIRLPOOL 3381c9f7f0c7c5263bb2a8019205a44d0b6084fc9719034462ea7d66f0f23a617dfc3468676102f931444b4b43b788e8c7c65615ebae5f30c635d51badbaf92a

View File

@ -13,15 +13,15 @@ SRC_URI="https://github.com/dandi/dandi-cli/archive/refs/tags/${PV}.tar.gz -> ${
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
#RESTRICT="test"
IUSE="test +etelemetry"
RESTRICT="test"
# Test fail during collection, reported upstream: https://github.com/dandi/dandi-cli/issues/774
RDEPEND="
dev-python/appdirs[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/click-didyoumean[${PYTHON_USEDEP}]
dev-python/dandischema[${PYTHON_USEDEP}]
=dev-python/dandischema-0.3*[${PYTHON_USEDEP}]
dev-python/fasteners[${PYTHON_USEDEP}]
dev-python/fscacher[${PYTHON_USEDEP}]
dev-python/humanize[${PYTHON_USEDEP}]
@ -40,8 +40,6 @@ RDEPEND="
dev-python/tqdm[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
"
# also needs:
# etelemetry
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
@ -55,6 +53,17 @@ DEPEND="
distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}/${P}-pip-versioncheck.patch"
)
src_prepare() {
if ! use etelemetry; then
eapply "${FILESDIR}/${PN}-0.27.2-no-etelemetry.patch"
fi
default
}
#python_install_all() {
# distutils-r1_python_install_all
# dodoc README.md

View File

@ -0,0 +1,70 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
DESCRIPTION="DANDI command line client to facilitate common operations"
HOMEPAGE="https://github.com/dandi/dandi-cli"
SRC_URI="https://github.com/dandi/dandi-cli/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test +etelemetry"
RESTRICT="test"
# Test fail during collection, reported upstream: https://github.com/dandi/dandi-cli/issues/774
RDEPEND="
dev-python/appdirs[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/click-didyoumean[${PYTHON_USEDEP}]
=dev-python/dandischema-0.4*[${PYTHON_USEDEP}]
dev-python/fasteners[${PYTHON_USEDEP}]
dev-python/fscacher[${PYTHON_USEDEP}]
dev-python/humanize[${PYTHON_USEDEP}]
dev-python/joblib[${PYTHON_USEDEP}]
dev-python/keyring[${PYTHON_USEDEP}]
dev-python/keyrings_alt[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/pydantic[${PYTHON_USEDEP}]
dev-python/pynwb[${PYTHON_USEDEP}]
dev-python/pyout[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
dev-python/semantic_version[${PYTHON_USEDEP}]
dev-python/tenacity[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/anys[${PYTHON_USEDEP}]
dev-python/responses[${PYTHON_USEDEP}]
dev-python/pyfakefs[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}/${P}-pip-versioncheck.patch"
)
src_prepare() {
if ! use etelemetry; then
eapply "${FILESDIR}/${PN}-0.27.2-no-etelemetry.patch"
fi
default
}
#python_install_all() {
# distutils-r1_python_install_all
# dodoc README.md
#}

View File

@ -0,0 +1,30 @@
--- a/dandi/utils.py 2021-09-21 11:51:39.799524534 -0400
+++ b/dandi/utils.py 2021-10-06 04:58:00.506440719 -0400
@@ -734,27 +734,4 @@
def check_dandi_version():
if os.environ.get("DANDI_NO_ET"):
return
- try:
- import etelemetry
-
- try:
- etelemetry.check_available_version(
- "dandi/dandi-cli", __version__, lgr=lgr, raise_exception=True
- )
- except etelemetry.client.BadVersionError:
- # note: SystemExit is based of BaseException, so is not Exception
- raise SystemExit(
- "DANDI CLI has detected that you are using a version that is known to "
- "contain bugs, is incompatible with our current data archive, or has "
- "other significant performance limitations. "
- "To continue using DANDI CLI, please upgrade your dandi client to a newer "
- "version (e.g., using pip install --upgrade dandi if you installed using pip). "
- "If you have any issues, please contact the DANDI "
- "helpdesk at https://github.com/dandi/helpdesk/issues/new/choose ."
- )
- except Exception as exc:
- lgr.warning(
- "Failed to check for a more recent version available with etelemetry: %s",
- exc,
- )
os.environ["DANDI_NO_ET"] = "1"

View File

@ -0,0 +1,13 @@
--- a/setup.cfg 2021-10-06 11:44:40.549337707 -0400
+++ b/dsetup.cfg 2021-10-06 11:45:10.236935245 -0400
@@ -30,8 +30,8 @@
appdirs
click
click-didyoumean
- dandischema ~= 0.3.1
- etelemetry >= 0.2.2
+ dandischema
+ etelemetry
fasteners
fscacher
# Specifying != might be what causes pip 19.3.1 first to install hdmf 1.5.1

View File

@ -0,0 +1,13 @@
--- a/setup.cfg 2021-10-06 11:44:40.549337707 -0400
+++ b/dsetup.cfg 2021-10-06 11:45:10.236935245 -0400
@@ -30,8 +30,8 @@
appdirs
click
click-didyoumean
- dandischema ~= 0.4.1
- etelemetry >= 0.2.2
+ dandischema
+ etelemetry
fasteners
fscacher
# Specifying != might be what causes pip 19.3.1 first to install hdmf 1.5.1

View File

@ -16,4 +16,7 @@
has a set of options to alter their behavior. Please run
`dandi COMMAND --help` to get more information
</longdescription>
<use>
<flag name="etelemetry">version checking to respect server schema version</flag>
</use>
</pkgmetadata>