buildout / buildout.wheel

Buildout extension to provide wheel support
MIT License
7 stars 8 forks source link

Add whitelist and blacklist support. #16

Open mrichar1 opened 7 years ago

mrichar1 commented 7 years ago

This PR aims to fix #14. Explanation of how it is designed to work is in the updated README.

I've opted to set it up so that the presence of any entries in the whitelists, or the location or basename being on a blacklist, is a deny.

After that, the location or basename being on a whitelist 're-allows' that wheel.

I think this is the most flexible approach to allowing filtering against locations and packages, but feel free to disagree, or make any other suggestions on improvements to the code.

mrichar1 commented 7 years ago

Not sure why in the tests load is passed an empty class - the code seems to read config successfully in real situations - though I'm not that up on buildout's internals, so there's probably a better way to get access to the config...

mrichar1 commented 7 years ago

A simple solution to the test errors is to add the following as a method in the Buildout class:

    @staticmethod
    def get(value, default):
        return None

Not sure if you'd prefer another way of handling it? (perhaps implementing returning a test config to run through tests of the new features?)