]> granicus.if.org Git - python/commitdiff
Added 'has_scripts()', 'has_data_files()' methods.
authorGreg Ward <gward@python.net>
Sat, 20 May 2000 15:06:48 +0000 (15:06 +0000)
committerGreg Ward <gward@python.net>
Sat, 20 May 2000 15:06:48 +0000 (15:06 +0000)
Lib/distutils/dist.py

index 0f131980b84ad4e203cb3a8eceb2387a17ec33f6..03b20e1f570cd5c812db4f8f3ec6ec81a346a6cc 100644 (file)
@@ -639,6 +639,12 @@ class Distribution:
     def has_modules (self):
         return self.has_pure_modules() or self.has_ext_modules()
 
+    def has_scripts (self):
+        return self.scripts and len(self.scripts) > 0
+
+    def has_data_files (self):
+        return self.data_files and len(self.data_files) > 0
+
     def is_pure (self):
         return (self.has_pure_modules() and
                 not self.has_ext_modules() and