Deletes a download cache for recipes passed as arguments. If no argument is passed, it'll delete *all* downloaded caches. :: p4a clean_download_cache kivy,pyjnius This does *not* delete the build caches or final distributions.
(self, args)
| 910 | self.clean_dists(args) |
| 911 | |
| 912 | def clean_download_cache(self, args): |
| 913 | """ Deletes a download cache for recipes passed as arguments. If no |
| 914 | argument is passed, it'll delete *all* downloaded caches. :: |
| 915 | |
| 916 | p4a clean_download_cache kivy,pyjnius |
| 917 | |
| 918 | This does *not* delete the build caches or final distributions. |
| 919 | """ |
| 920 | ctx = self.ctx |
| 921 | if hasattr(args, 'recipes') and args.recipes: |
| 922 | for package in args.recipes: |
| 923 | remove_path = join(ctx.packages_path, package) |
| 924 | if exists(remove_path): |
| 925 | rmdir(remove_path) |
| 926 | info('Download cache removed for: "{}"'.format(package)) |
| 927 | else: |
| 928 | warning('No download cache found for "{}", skipping'.format( |
| 929 | package)) |
| 930 | else: |
| 931 | if exists(ctx.packages_path): |
| 932 | rmdir(ctx.packages_path) |
| 933 | info('Download cache removed.') |
| 934 | else: |
| 935 | print('No cache found at "{}"'.format(ctx.packages_path)) |
| 936 | |
| 937 | @require_prebuilt_dist |
| 938 | def export_dist(self, args): |