Exemple #1
0
    def add_defaults (self):
        old_sdist.add_defaults(self)

        dist = self.distribution

        if dist.data_files is None:
            dist.data_files = []

        for d in dist.data_dir:
            src_data_files = []
            for roots, dirs, files in os.walk(d):
                for file in files:
                    src_data_files.append(os.path.join(roots, file))
            self.filelist.extend(src_data_files)
Exemple #2
0
    def add_defaults(self):
        _sdist.add_defaults(self)

        dist = self.distribution

        if dist.has_data_files():
            for data in dist.data_files:
                self.filelist.extend(get_data_files(data))

        if dist.has_headers():
            headers = []
            for h in dist.headers:
                if isinstance(h, str): headers.append(h)
                else: headers.append(h[1])
            self.filelist.extend(headers)

        return
Exemple #3
0
    def add_defaults(self):
        _sdist.add_defaults(self)

        dist = self.distribution

        if dist.has_data_files():
            for data in dist.data_files:
                self.filelist.extend(get_data_files(data))

        if dist.has_headers():
            headers = []
            for h in dist.headers:
                if isinstance(h,str): headers.append(h)
                else: headers.append(h[1])
            self.filelist.extend(headers)

        return
Exemple #4
0
    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
          - all gettext message files
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional."""
        sdist.add_defaults(self)

        # get the relative pathname of this module
        appdistutils = __file__.rstrip('c')
        prefix = os.path.commonprefix((os.getcwd(), appdistutils))
        appdistutils = appdistutils[len(prefix + os.sep):]
        # include this module and some extra metadata files, which are
        # standard for applications
        standards = (appdistutils, 'INSTALL', 'COPYING', 'ChangeLog')
        for fn in standards:
            if os.path.exists(fn):
                self.filelist.append(fn)
            else:
                self.warn("standard file '%s' not found" % fn)
        # some optional metadata files, not bad, if they are missing
        optional = ('AUTHORS', 'THANKSTO', 'TODO')
        for fn in ifilter(os.path.exists, optional):
            self.filelist.append(fn)
        # include message files
        if self.distribution.has_messages():
            build_messages = self.get_finalized_command('build_messages')
            self.filelist.extend(build_messages.get_source_files())
        # include package data
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            for pkg, src_dir, build_dir, filenames in build_py.data_files:
                files = (os.path.join(src_dir, filename)
                         for filename in filenames)
                self.filelist.extend(files)
    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
          - all gettext message files
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional."""
        sdist.add_defaults(self)

        # get the relative pathname of this module
        appdistutils = __file__.rstrip('c')
        prefix = os.path.commonprefix((os.getcwd(), appdistutils))
        appdistutils = appdistutils[len(prefix  + os.sep):]
        # include this module and some extra metadata files, which are
        # standard for applications
        standards = (appdistutils, 'INSTALL', 'COPYING', 'ChangeLog')
        for fn in standards:
            if os.path.exists(fn):
                self.filelist.append(fn)
            else:
                self.warn("standard file '%s' not found" % fn)
        # some optional metadata files, not bad, if they are missing
        optional = ('AUTHORS', 'THANKSTO', 'TODO')
        for fn in ifilter(os.path.exists, optional):
            self.filelist.append(fn)
        # include message files
        if self.distribution.has_messages():
            build_messages = self.get_finalized_command('build_messages')
            self.filelist.extend(build_messages.get_source_files())
        # include package data
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            for pkg, src_dir, build_dir, filenames in build_py.data_files:
                files = (os.path.join(src_dir, filename) for filename in
                         filenames)
                self.filelist.extend(files)
Exemple #6
0
 def add_defaults(self):
     sdist.add_defaults(self)
     if self.distribution.has_twisted_plugins():
         plugins = self.get_finalized_command('build_twisted_plugins')
         self.filelist.extend(plugins.get_source_files())
 def add_defaults(self):
     sdist.add_defaults(self)
     if self.distribution.has_twisted_plugins():
         plugins = self.get_finalized_command('build_twisted_plugins')
         self.filelist.extend(plugins.get_source_files())
Exemple #8
0
 def add_defaults (self):
     _sdist.add_defaults (self)
     # Remove pyx source and add c source
     if os.path.exists ("src/compizconfig.pyx"):
         self.filelist.exclude_pattern ("src/compizconfig.pyx")
         self.filelist.append ("src/compizconfig.c")
Exemple #9
0
    def add_defaults(self):
        old_sdist.add_defaults(self)

        if self.distribution.has_data_files():
            self.filelist.extend(self.distribution.get_data_files())
Exemple #10
0
 def add_defaults(self):
     sdist.add_defaults(self)
     if self.distribution.has_data_files():
         for data in self.distribution.data_files:
             self.filelist.extend(data[1])
     self.filelist.extend(extra_dist)