Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This library provides tools to to do mass changes within Fedora packages’ spec files and create Pagure pull requests for them.

Example Usage

from mass_pagure_prs import BasePRsGenerator


class PagurePRsGenerator(BasePRsGenerator):

    def modify_spec(self, specfile):
        """Modify a spec file and return a modified version.

        Args:
            specfile (str): A spec file as a string.

        Return:
            (str) A modified spec file.
        """
        # Do things with a spec file and return a
        # modified spec file as a string.

    def check_mock_build_results(self, output):
        """Given the output of the mock build check the result."""
        # Optional, can be skipped. Enables checking mock build
        # results/logs/created rpms if mock build is ran for packages.

    def check_koji_scratch_build_results(self, output):
        """Given the output of the Koji scratch build check the result."""
        # Optional, can be skipped. Enables checking Koji scratch build
        # results if Koji scratch build is ran for packages.


def main():
    prs_generator = PagurePRsGenerator(
        packages_filename='packages.txt',
        output_dirname='/tmp/pagure_prs',
        dry_run=False,
        pagure_token='pagure_token',
        pagure_user='pagure_user',
        fas_user='fas_user',  # will not be needed with Pagure 4.0.0
        fas_password='fas_password',  # will not be needed with Pagure 4.0.0
    )

    # Set branch name and texts for commit messages, PR description etc.
    prs_generator.configure(
        git_branch='sample_branch',
        changelog_entry='sample message',
        commit_message='sample message',
        pr_title='sample message',
        pr_description='sample message'
    )

    # Open PRs.
    # Receive the list of links to opened PRs if not in dry run.
    prs = prs_generator.run(do_mock_build=True, do_koji_scratch_build=False)

Release files for mass-pagure-prs 0.1.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mass-pagure-prs 0.1.dev1
File Size Uploaded
mass-pagure-prs-0.1.dev1.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mass-pagure-prs 0.1.dev1
File Interpreter ABI Platform
mass_pagure_prs-0.1.dev1-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / mass-pagure-prs-0.1.dev1.tar.gz

Download URL mass-pagure-prs-0.1.dev1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
04c5a802f7406bf7a2eaf4ec2bca62506a9b3af7b19b4829726d0a8c0e1cbd32
BLAKE2b-256 checksum
How to use checksums
c77d1e02ec2078acd7b5fa8b13058c7329eb9826a198d27c11b547ee56e6d27f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mass_pagure_prs-0.1.dev1-py3-none-any.whl

Download URL mass_pagure_prs-0.1.dev1-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa0f2f5fc50e2f581a15daddf580f8f2476edc6fc14c3b7e591ed5581a1edbb4
BLAKE2b-256 checksum
How to use checksums
43f57a0231e5a5efd847280de597a7394daa0f281d2332551f247afcd87ebece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.dev1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page