Skip to content
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

hooks: pkg_resources: implement support for package content listing #5284

Merged
merged 6 commits into from Mar 23, 2021

Commits on Mar 3, 2021

  1. tests: add test for pkg_resources package content listing

    The test script tests for behavior of resource_exists(), resource_isdir(),
    and resource_listdir() functions from pkg_resources package (which
    in turn call the methods with same name in the provider class).
    
    The idea is to run the test script twice, once as unfrozen python
    script and once as a frozen program. In both cases, the test package
    is once present as a plain package directory and once as a zipped egg
    (generated on-the-fly from the source directory).
    
    This way, we test behavior of the original provider (DefaultProvider
    or ZipProvider) and the provider used within the frozen application
    (which we will need to implement to replace the currently used
    NullProvider).
    rokm committed Mar 3, 2021
    Copy the full SHA
    8dc6004 View commit details
    Browse the repository at this point in the history
  2. hooks: pkg_resources: implement custom pkg_resources provider

    Implement PyiFrozenProvider that subclasses NullProvider from
    pkg_resources and provides _has(), _isdir(), and _listdir()
    methods. The implementation of these methods supports both
    PYZ-embedded and on-filesystem resources, in that order of
    precedence.
    rokm committed Mar 3, 2021
    Copy the full SHA
    97126fb View commit details
    Browse the repository at this point in the history
  3. hooks: pkg_resources: prevent duplication of directories in _listdir()

    Because a directory may exist as both an embedded and on-filesystem
    resource, we need to de-duplicate the results when listing the
    filesystem in addition to embedded tree.
    rokm committed Mar 3, 2021
    Copy the full SHA
    a42efe6 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    a2687b9 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    26178e0 View commit details
    Browse the repository at this point in the history
  6. hooks: pkg_resources: improve documentation

    Add a block describing basic behavior of PyiFrozenProvider, w.r.t.
    to PYZ-embedded and on-filesystem resources.
    rokm committed Mar 3, 2021
    Copy the full SHA
    a6d0075 View commit details
    Browse the repository at this point in the history