Skip to main content

logo

Pacup

Python: 3.10+ Code style: black Codacy: grade PyPI: version

join discord Mastodon Follow join matrix

What is this?

Pacup (Pacscript Updater) is a maintainer helper tool to help maintainers update their pacscripts. It semi-automates the tedious task of updating pacscripts, and aims to make it a fun process for the maintainer!

Installation

To install the latest release run:

$ pacstall -I pacup-bin # or pip install pacup

To install the latest development build run:

$ pip install git+https://github.com/pacstall/pacup

Usage

Usage: pacup [OPTIONS] PACSCRIPTS...

Updates specified pacscripts.
If ship flag is passed, the pacscript will be prepared for shipping to upstream.
After the pacscript is prepared, it will be committed and pushed to the origin remote.
This requires you to be present in your cloned fork.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────╮
│ *    pacscripts      PACSCRIPTS...  The pacscripts to update. [default: None] [required]             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────╮
│ --show-repology       -r                                       Show the parsed repology data and     │
│                                                                exit.                                 │
│ --debug               -d                                       Turn on debugging mode.               │
│ --version             -v                                       Show the version and exit.            │
│ --ship                -s                                       Prepare the pacscript for shipping to │
│                                                                upstream.                             │
│ --install-completion          [bash|zsh|fish|powershell|pwsh]  Install completion for the specified  │
│                                                                shell.                                │
│                                                                [default: None]                       │
│ --show-completion             [bash|zsh|fish|powershell|pwsh]  Show completion for the specified     │
│                                                                shell, to copy it or customize the    │
│                                                                installation.                         │
│                                                                [default: None]                       │
│ --help                                                         Show this message and exit.           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯

You can get this help text by running pacup --help.

You should visit our wiki, for more information on how to use the repology key.

How does it work?

Suppose foo.pacscript is outdated.

On running pacup foo.pacscript Pacup will parse the pacscript's variables, then it compiles a list of filters specified in the repology variable in the pacscript. Then it queries the Repology API to get all the repositories which have packaged that package. After which it applies the filter to the response, and from the filtrate it considers the most common version to be the latest.

Then it replaces all occurrences of the previous version's value in the url with the latest one placeholder's value with the latest version, and downloads the new package, and generates it's hash.

Then writes the edited pacscript and installs it with Pacstall, after installation it asks the user to confirm that the installed package works. On approval the pacscript is considered successfully upgraded and the program ends.

Caveats

  • Does not work with -git pacscripts as those pacscripts are auto updating.
  • Doesn't work if a pacscript doesn't have an equivalent Repology package.

Stats

Repobeats analytics image

License

    ____             __  __
   / __ \____ ______/ / / /___
  / /_/ / __ `/ ___/ / / / __ \
 / ____/ /_/ / /__/ /_/ / /_/ /
/_/    \__,_/\___/\____/ .___/
                      /_/

Copyright (C) 2022-present

This file is part of PacUp

PacUp is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PacUp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PacUp.  If not, see <https://www.gnu.org/licenses/>.

Metadata

Release files for pacup 2.1.1

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

Source distribution (sdist)

Source distribution for pacup 2.1.1
File Size Uploaded Provenance Actions
pacup-2.1.1.tar.gz 29.9 kB Without provenance Details for pacup-2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pacup 2.1.1
File Interpreter ABI Platform Actions
pacup-2.1.1-py3-none-any.whl Python 3 none any Details for pacup-2.1.1-py3-none-any.whl

Total release size: 62.2 kB

Release files / pacup-2.1.1.tar.gz

Download URL pacup-2.1.1.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
203083d1a2d8f146cef760ed0c90bf19d4068e67908edd7fd4092b0ece51d33c
BLAKE2b-256 checksum
How to use checksums
89dfad0ec75c639af9de73d7f616b7be19da8b9c7d8866ee1fc44802d4c17cf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1019-azure

Release files / pacup-2.1.1-py3-none-any.whl

Download URL pacup-2.1.1-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb8366a7490efcbc8f209f11bba1e729a0a66aabe0fdda66ef03581288905d79
BLAKE2b-256 checksum
How to use checksums
55e1858047ef253ff296284b78eba0b7a204ba6cb7801845854a3e01ae5bc3fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1019-azure

Security for pacup 2.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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