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
Compatibility shim to ease adoption of importlib_metadata 3.6. Supplies
forward-compatibility of "selectable" entry points even on older versions of
importlib_metadata and importlib.metadata, and avoids usage that triggers
deprecation warnings.
Use this shim for libraries or applications invoking entry_points() that run on
Python older than 3.10 or where importlib_metadata is older than 3.6. In most
cases, this shim is unnecessary and the easiest thing to do is simply require
importlib_metadata >= 3.6 on all Pythons (or only those prior to 3.10a7). In
some environments, a library may be constrained on which versions of
importlib_metadata can be required, so this library bridges that gap.
WWW: https://github.com/jaraco/backports.entry_points_selectable
alias::module aliases one module name to another. It is useful if you want to
let users access a module's functionality under a different (usually shorter)
name.
WWW: https://metacpan.org/dist/alias-module
scribus/fonts/sfnt.cpp: In function 'QByteArray sfnt::subsetFaceWithHB(const QByteArray&, QList<unsigned int>, int, QMap<unsigned int, unsigned int>&)':
scribus/fonts/sfnt.cpp:1260:3: error: 'hb_subset_input_set_retain_gids' was not declared in this scope; did you mean 'hb_subset_input_set_flags'?
1260 | hb_subset_input_set_retain_gids(hbSubsetInput.get(), true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| hb_subset_input_set_flags
scribus/fonts/sfnt.cpp:1261:3: error: 'hb_subset_input_set_drop_hints' was not declared in this scope; did you mean 'hb_subset_input_set_user_data'?
1261 | hb_subset_input_set_drop_hints(hbSubsetInput.get(), false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| hb_subset_input_set_user_data
scribus/fonts/sfnt.cpp:1263:3: error: 'hb_subset_input_set_name_legacy' was not declared in this scope; did you mean 'hb_subset_input_set_flags'?
1263 | hb_subset_input_set_name_legacy(hbSubsetInput.get(), true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| hb_subset_input_set_flags
scribus/fonts/sfnt.cpp:1266:57: error: 'hb_subset' was not declared in this scope; did you mean 'hb_set_set'?
1266 | QScopedPointer<hb_face_t, HbFaceDeleter> hbSubsetFace(hb_subset(hbFullFace.get(), hbSubsetInput.get()));
| ^~~~~~~~~
| hb_set_set
Reported by: pkg-fallout
Obtined from: Arch Linux
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:74:5: error: use of undeclared identifier 'hb_subset_input_set_retain_gids'; did you mean 'hb_subset_input_set_flags'?
hb_subset_input_set_retain_gids(input.get(), true);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hb_subset_input_set_flags
/usr/local/include/harfbuzz/hb-subset.h:142:1: note: 'hb_subset_input_set_flags' declared here
hb_subset_input_set_flags (hb_subset_input_t *input,
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:77:5: error: use of undeclared identifier 'hb_subset_input_set_drop_hints'
hb_subset_input_set_drop_hints(input.get(), false);
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:19: error: use of undeclared identifier 'hb_subset'; did you mean 'hb_set_set'?
HBFace subset(hb_subset(face.get(), input.get()));
^~~~~~~~~
hb_set_set
/usr/local/include/harfbuzz/hb-set.h:131:1: note: 'hb_set_set' declared here
hb_set_set (hb_set_t *set,
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:29: error: cannot initialize a parameter of type 'hb_set_t *' with an rvalue of type 'std::__1::unique_ptr<hb_face_t, SkFunctionWrapper<void (hb_face_t *), &hb_face_destroy>>::pointer' (aka 'hb_face_t *')
HBFace subset(hb_subset(face.get(), input.get()));
^~~~~~~~~~
/usr/local/include/harfbuzz/hb-set.h:131:29: note: passing argument to parameter 'set' here
hb_set_set (hb_set_t *set,
^
PR: 258576
Reported by: pkg-fallout
Obtained from: Arch Linux
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:74:5: error: use of undeclared identifier 'hb_subset_input_set_retain_gids'; did you mean 'hb_subset_input_set_flags'?
hb_subset_input_set_retain_gids(input.get(), true);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hb_subset_input_set_flags
/usr/local/include/harfbuzz/hb-subset.h:142:1: note: 'hb_subset_input_set_flags' declared here
hb_subset_input_set_flags (hb_subset_input_t *input,
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:77:5: error: use of undeclared identifier 'hb_subset_input_set_drop_hints'
hb_subset_input_set_drop_hints(input.get(), false);
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:19: error: use of undeclared identifier 'hb_subset'; did you mean 'hb_set_set'?
HBFace subset(hb_subset(face.get(), input.get()));
^~~~~~~~~
hb_set_set
/usr/local/include/harfbuzz/hb-set.h:131:1: note: 'hb_set_set' declared here
hb_set_set (hb_set_t *set,
^
../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:29: error: cannot initialize a parameter of type 'hb_set_t *' with an rvalue of type 'std::__1::unique_ptr<hb_face_t, SkFunctionWrapper<void (hb_face_t *), &hb_face_destroy>>::pointer' (aka 'hb_face_t *')
HBFace subset(hb_subset(face.get(), input.get()));
^~~~~~~~~~
/usr/local/include/harfbuzz/hb-set.h:131:29: note: passing argument to parameter 'set' here
hb_set_set (hb_set_t *set,
^
PR: 258576
Reported by: pkg-fallout, Stefan Ehmann
Obtained from: Arch Linux