-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include package metadata and expose it through packaging tools #216
Comments
Is there a mechanism in place to extend pkg_resources to serve that metadata? |
cc @jaraco |
I don't believe there's a plugin mechanism, but pkg_resources could itself be extended to support additional file types or structures in a file type (such as zip files), especially if such a format is well-specified, such as with a PEP or other consensus. |
Any progress on this? |
A little more detail - The NullProvider and DefaultProvider are implementations that provide metadata based on files in the file system. The ZipProvider is an implementation for resolving the metadata based on zip files (including eggs). I'm not yet sure how these metadata providers are selected, but if there was a metadata provider that matched when the module's loader is one provided by cx_Freeze, I imagine that could be integrated to resolve metadata for cx_Freeze applications. I'd start with the docs and then focus on the pkg_resources code and try to follow the logic to implement a suitable provider for cx_Freeze. |
Dear jaraco, |
Hi @xavfaure. At this point, I'm considering pkg_resources soft-deprecated and I've been pushing users to instead rely on entrypoints, importlib_resources, and importlib_metadata. In fact, keyring (referenced above) already uses entrypoints to load its entrypoints. pmxbot will soon too. Therefore, I recommend first that you work with the Qt and related packages to first see if they can update to the newer package metadata tools. Once they've done that, if the necessary metadata still isn't available in the cxFreeze environment, you'll want to submit a bug report (and ideally a pull request) to the relevant project (probably entrypoints) describing the deficiency and what you're trying to achieve. |
PR #608 merged. |
Originally reported by: Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco)
In my involvement with this ticket in the mock project, it came to my attention that cx_freeze apparently excludes the package metadata (egg-info, dist-info, etc) when freezing. While some metadata may not be applicable in a frozen application, I can certainly see applications making use of introspection to detect and report versions or expose functionality via plugins.
I suggest that cx_freeze could (a) copy/include metadata exposed by the package and (b) provide a mechanism in pkg_resources to serve that metadata just as it does for other forms of installation.
By doing so, it would eliminate the incentive for packages to avoid use of this functionality in order to retain compatibility with cx_Freeze.
I unfortunately won't be able to contribute this feature, but I'll happily help guide someone willing to help contribute, especially with implementing the pkg_resources functionality.
The text was updated successfully, but these errors were encountered: