git: d299ed7b4863 - main - devel/py-platformdirs: Add py-platformdirs 2.3.0
Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sun Sep 19 06:06:44 UTC 2021
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d299ed7b4863645178fa3cb315cb46668f41433d
commit d299ed7b4863645178fa3cb315cb46668f41433d
Author: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-09-19 05:25:35 +0000
Commit: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-09-19 05:40:30 +0000
devel/py-platformdirs: Add py-platformdirs 2.3.0
When writing desktop application, finding the right location to store user data
and configuration varies per platform. Even for single-platform apps, there may
by plenty of nuances in figuring out the right location.
This kind of thing is what the platformdirs module is for. platformdirs will
help you choose an appropriate:
- user data dir (user_data_dir)
- user config dir (user_config_dir)
- user cache dir (user_cache_dir)
- site data dir (site_data_dir)
- site config dir (site_config_dir)
- user log dir (user_log_dir)
- user runtime dir (user_runtime_dir)
And also:
- Is a single module so other Python packages can vendor their own private copy.
- Is slightly opinionated on the directory names used. Look for "OPINION" in
documentation and code for when an opinion is being applied.
WWW: https://github.com/platformdirs/platformdirs
---
devel/Makefile | 1 +
devel/py-platformdirs/Makefile | 23 +++++++++++++++++++++++
devel/py-platformdirs/distinfo | 3 +++
devel/py-platformdirs/files/patch-setup.cfg | 9 +++++++++
devel/py-platformdirs/pkg-descr | 20 ++++++++++++++++++++
5 files changed, 56 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index d7efb1388c32..cb7ffabacaf5 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4862,6 +4862,7 @@
SUBDIR += py-pkgconfig
SUBDIR += py-plac
SUBDIR += py-plan
+ SUBDIR += py-platformdirs
SUBDIR += py-plette
SUBDIR += py-plex
SUBDIR += py-pluggy
diff --git a/devel/py-platformdirs/Makefile b/devel/py-platformdirs/Makefile
new file mode 100644
index 000000000000..c4909e3357fd
--- /dev/null
+++ b/devel/py-platformdirs/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
+
+PORTNAME= platformdirs
+PORTVERSION= 2.3.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet at FreeBSD.org
+COMMENT= Python module for determining appropriate platform-specific dirs
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+USES= python:3.6+
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${WRKSRC}/setup.cfg
+
+.include <bsd.port.mk>
diff --git a/devel/py-platformdirs/distinfo b/devel/py-platformdirs/distinfo
new file mode 100644
index 000000000000..a89a28c744ab
--- /dev/null
+++ b/devel/py-platformdirs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1629364646
+SHA256 (platformdirs-2.3.0.tar.gz) = 15b056538719b1c94bdaccb29e5f81879c7f7f0f4a153f46086d155dffcd4f0f
+SIZE (platformdirs-2.3.0.tar.gz) = 22730
diff --git a/devel/py-platformdirs/files/patch-setup.cfg b/devel/py-platformdirs/files/patch-setup.cfg
new file mode 100644
index 000000000000..b8653264fe36
--- /dev/null
+++ b/devel/py-platformdirs/files/patch-setup.cfg
@@ -0,0 +1,9 @@
+--- setup.cfg.orig 2021-08-30 23:00:55 UTC
++++ setup.cfg
+@@ -1,5 +1,6 @@
+ [metadata]
+ name = platformdirs
++version = %%PORTVERSION%%
+ description = A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
+ long_description = file: README.rst
+ long_description_content_type = text/x-rst
diff --git a/devel/py-platformdirs/pkg-descr b/devel/py-platformdirs/pkg-descr
new file mode 100644
index 000000000000..7955a6728618
--- /dev/null
+++ b/devel/py-platformdirs/pkg-descr
@@ -0,0 +1,20 @@
+When writing desktop application, finding the right location to store user data
+and configuration varies per platform. Even for single-platform apps, there may
+by plenty of nuances in figuring out the right location.
+
+This kind of thing is what the platformdirs module is for. platformdirs will
+help you choose an appropriate:
+- user data dir (user_data_dir)
+- user config dir (user_config_dir)
+- user cache dir (user_cache_dir)
+- site data dir (site_data_dir)
+- site config dir (site_config_dir)
+- user log dir (user_log_dir)
+- user runtime dir (user_runtime_dir)
+
+And also:
+- Is a single module so other Python packages can vendor their own private copy.
+- Is slightly opinionated on the directory names used. Look for "OPINION" in
+ documentation and code for when an opinion is being applied.
+
+WWW: https://github.com/platformdirs/platformdirs
More information about the dev-commits-ports-all
mailing list