summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-09-08 04:40:51 +0200
committerMichał Górny <mgorny@gentoo.org>2024-09-08 04:52:30 +0200
commitb11a8057df7927623a472dc15391e5ecc4460863 (patch)
treede91fe65e527d9c41a63b81c78124ce41893f57a /dev-python/platformdirs
parentdev-python/pytest-env: Bump to 1.1.4 (diff)
downloadgentoo-b11a8057df7927623a472dc15391e5ecc4460863.tar.gz
gentoo-b11a8057df7927623a472dc15391e5ecc4460863.tar.bz2
gentoo-b11a8057df7927623a472dc15391e5ecc4460863.zip
dev-python/platformdirs: Bump to 4.3.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/platformdirs')
-rw-r--r--dev-python/platformdirs/Manifest1
-rw-r--r--dev-python/platformdirs/metadata.xml2
-rw-r--r--dev-python/platformdirs/platformdirs-4.3.1.ebuild54
3 files changed, 56 insertions, 1 deletions
diff --git a/dev-python/platformdirs/Manifest b/dev-python/platformdirs/Manifest
index a448dfefe952..ef844e51509b 100644
--- a/dev-python/platformdirs/Manifest
+++ b/dev-python/platformdirs/Manifest
@@ -1 +1,2 @@
DIST platformdirs-4.2.2.tar.gz 20916 BLAKE2B d7c551a950118a127664b8210f33497760ce06381ac6a4ea098d1a1c60605507b5e2a9762d5f7d112332d3cebd63cb642b25e93a8b67dd2a1ee7cca189f3555f SHA512 e67aff332a6c84669d77a68e7d5546bfd14e08dcf61681b03447bf6381c0d981c63be0f87fd63bc99f0a51c92bf960902ded83ba8872801c14755ab163d45a0f
+DIST platformdirs-4.3.1.tar.gz 21236 BLAKE2B 852d402831ad6060c6efc3841dd56a8484aca547e820ad9b46cc838d92f560407a769a01942bf03c31949e4b37240d292358617afdfa0dd7ea03eeba6bc62086 SHA512 6d4cd808190808bab5a90f44d9fe2fda0d624c7a76faf9f4a4a6093cd098a28b79782dbf895dcd0eeb82778aa094deeb0959fcbe25bdd93818a47b9e197b6299
diff --git a/dev-python/platformdirs/metadata.xml b/dev-python/platformdirs/metadata.xml
index f801eabb6b23..2ef15d7c6c90 100644
--- a/dev-python/platformdirs/metadata.xml
+++ b/dev-python/platformdirs/metadata.xml
@@ -6,7 +6,7 @@
</maintainer>
<stabilize-allarches/>
<upstream>
- <remote-id type="github">platformdirs/platformdirs</remote-id>
+ <remote-id type="github">tox-dev/platformdirs</remote-id>
<remote-id type="pypi">platformdirs</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/platformdirs/platformdirs-4.3.1.ebuild b/dev-python/platformdirs/platformdirs-4.3.1.ebuild
new file mode 100644
index 000000000000..32509a291570
--- /dev/null
+++ b/dev-python/platformdirs/platformdirs-4.3.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=flit
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="A small Python module for determining appropriate platform-specific dirs"
+HOMEPAGE="
+ https://pypi.org/project/platformdirs/
+ https://github.com/tox-dev/platformdirs/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
+
+BDEPEND="
+ test? (
+ dev-python/appdirs[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_configure() {
+ grep -q 'build-backend = "hatchling' pyproject.toml ||
+ die "Upstream changed build-backend, recheck"
+ # write a custom pyproject.toml to ease setuptools bootstrap
+ cat > pyproject.toml <<-EOF || die
+ [build-system]
+ requires = ["flit_core >=3.2,<4"]
+ build-backend = "flit_core.buildapi"
+
+ [project]
+ name = "${PN}"
+ version = "${PV}"
+ description = 'A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir".'
+ EOF
+ # sigh
+ cat > src/platformdirs/version.py <<-EOF || die
+ __version__ = version = '${PV}'
+ __version_tuple__ = version_tuple = (${PV//./, })
+ EOF
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest -p pytest_mock
+}