How to use the pbr.packaging.append_text_list function in pbr

To help you get started, we’ve selected a few pbr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ncbi / packit / src / packit / config / description.py View on Github external
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])
github ncbi / packit / wrap / config / _metadata.py View on Github external
def hook(self):
        packaging.append_text_list(self.config, 'requires_dist', packaging.parse_requirements())
github ncbi / packit / src / packit / config / dependencies.py View on Github external
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_requirements = self._get_requirements(dependencies_facility_config, self.FIELD_INSTALL_REQUIRES,
                                                      self.requirements_base)

        test_requirements = self._get_requirements(dependencies_facility_config, self.FIELD_TEST_REQUIRES,
                                                   self.requirements_test)

        packaging.append_text_list(metadata, 'requires_dist', packaging.parse_requirements(install_requirements))
        packaging.append_text_list(backwards_compat, 'tests_require', packaging.parse_requirements(test_requirements))

        base_links = packaging.parse_dependency_links(install_requirements)
        test_links = packaging.parse_dependency_links(test_requirements)

        links = list(set(base_links + test_links))
        packaging.append_text_list(backwards_compat, 'dependency_links', links)

        referenced_files = self._find_linked_requirements_files(chain(install_requirements, test_requirements))
        files_config = config.setdefault('files', {})
        packaging.append_text_list(files_config, 'extra_files', referenced_files)
github ncbi / packit / src / packit / config / license.py View on Github external
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])
github ncbi / packit / src / packit / config / dependencies.py View on Github external
dependencies_facility_config = config.setdefault(facility_section_name, {})

        install_requirements = self._get_requirements(dependencies_facility_config, self.FIELD_INSTALL_REQUIRES,
                                                      self.requirements_base)

        test_requirements = self._get_requirements(dependencies_facility_config, self.FIELD_TEST_REQUIRES,
                                                   self.requirements_test)

        packaging.append_text_list(metadata, 'requires_dist', packaging.parse_requirements(install_requirements))
        packaging.append_text_list(backwards_compat, 'tests_require', packaging.parse_requirements(test_requirements))

        base_links = packaging.parse_dependency_links(install_requirements)
        test_links = packaging.parse_dependency_links(test_requirements)

        links = list(set(base_links + test_links))
        packaging.append_text_list(backwards_compat, 'dependency_links', links)

        referenced_files = self._find_linked_requirements_files(chain(install_requirements, test_requirements))
        files_config = config.setdefault('files', {})
        packaging.append_text_list(files_config, 'extra_files', referenced_files)
github openstack / pbr / pbr / hooks / metadata.py View on Github external
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())
github openstack / pbr / pbr / hooks / backwards.py View on Github external
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,
                strip_markers=True))