Exemplo n.º 1
0
 def hook(self):
     packaging.append_text_list(
         self.config, 'dependency_links',
         packaging.parse_dependency_links())
     packaging.append_text_list(
         self.config, 'tests_require',
         packaging.parse_requirements(
             packaging.TEST_REQUIREMENTS_FILES))
Exemplo n.º 2
0
 def hook(self):
     self.config['include_package_data'] = 'True'
     packaging.append_text_list(
         self.config, 'dependency_links',
         packaging.parse_dependency_links())
     packaging.append_text_list(
         self.config, 'tests_require',
         packaging.parse_requirements(
             packaging.TEST_REQUIREMENTS_FILES))
Exemplo n.º 3
0
 def hook(self):
     self.config['include_package_data'] = 'True'
     packaging.append_text_list(
         self.config, 'dependency_links',
         packaging.parse_dependency_links())
     packaging.append_text_list(
         self.config, 'tests_require',
         packaging.parse_requirements(
             ["test-requirements.txt", "tools/test-requires"]))
Exemplo n.º 4
0
    def __call__(self, config, facility_section_name):
        license_config = config.setdefault(facility_section_name, {})

        license_file = license_config.get(self.FIELD_LICENSE_FILE)
        if not license_file:
            license_file = self._find_license_file('.')

        if not license_file:
            return

        files_config = config.setdefault('files', {})
        packaging.append_text_list(files_config, 'extra_files', [license_file])
Exemplo n.º 5
0
    def __call__(self, config, facility_section_name):
        metadata_config = config.setdefault('metadata', {})

        if self.FIELD_DESCRIPTION in metadata_config:
            return

        description_config = config.setdefault(facility_section_name, {})
        filename = description_config.get(self.FIELD_FILE)

        if not filename:
            filename = self._find_readme_file('.')

        if not filename:
            return

        metadata_config[self.FIELD_DESCRIPTION] = self._read_file(filename)

        files_config = config.setdefault('files', {})
        packaging.append_text_list(files_config, 'extra_files', [filename])
Exemplo n.º 6
0
    def __call__(self, config, facility_section_name):
        metadata = config.setdefault('metadata', {})
        backwards_compat = config.setdefault('backwards_compat', {})

        dependencies_facility_config = config.setdefault(facility_section_name, {})

        install = self._process_requirements(
            dependencies_facility_config, self.FIELD_INSTALL_REQUIRES, self.requirements_base
        )
        packaging.append_text_list(metadata, 'requires_dist', install.packages)

        test = self._process_requirements(
            dependencies_facility_config, self.FIELD_TEST_REQUIRES, self.requirements_test
        )
        packaging.append_text_list(backwards_compat, 'tests_require', test.packages)

        links = self._union(install.links, test.links)
        packaging.append_text_list(backwards_compat, 'dependency_links', links)

        referenced_files = self._union(install.files, test.files)
        files_config = config.setdefault('files', {})
        packaging.append_text_list(files_config, 'extra_files', referenced_files)
Exemplo n.º 7
0
 def hook(self):
     self.config['version'] = packaging.get_version(
         self.config['name'], self.config.get('version', None))
     packaging.append_text_list(
         self.config, 'requires_dist',
         packaging.parse_requirements())