bin-package-manager


Namebin-package-manager JSON
Version 2.2.6 PyPI version JSON
download
home_pagehttps://github.com/lxl66566/bpm
SummaryBin package manager, a package manager based on Github release
upload_time2024-04-14 11:47:49
maintainerNone
docs_urlNone
authorlxl66566
requires_python<4.0,>=3.9
licenseMIT
keywords binary packaging release
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bin package manager

English | [简体中文](./docs/README.zh-CN.md)

Bin package manager (BPM) is a Github release-based package manager that allows users to install and manage binaries from any Github release.

BPM is currently supported on Linux and Windows, python >= 3.9.

> [!CAUTION]
> Risk Warning: BPM on Linux may damage your computer. By using BPM to install software, you accept this risk and trust third-party Github release packagers.

## Why use it?

In non-rolling release Linux distributions, the version of softwares in official source are often too low to use some new features.

Rolling distributions, such as Archlinux, are also unable to install software from the AUR as root.

A common way to manage packages on Windows is scoop, but it requires the packager to maintain a "manifest" list.

## Installation

BPM needs to be installed to root user.

### pip

#### Linux

```sh
sudo pip install bin-package-manager --break-system-packages
sudo bpm
```

Note the risk of potentially breaking system packages.

#### Windows

```sh
pip install bin-package-manager
bpm
```

### pipx

You can use pipx to install BPM.

```sh
sudo pipx install bin-package-manager
```

pipx will only install for the current user, so `sudo` is required. Alternatively, you can track on [this issue](https://github.com/pypa/pipx/issues/754) and use other methods mentioned there.

### Source code

If you don't want to use pipx, you can also download and use the source code.

BPM requires [these libs](./requirements.txt), please install them manually.

```sh
git clone https://github.com/lxl66566/bpm.git
cd bpm
python3 -m bpm
# or use poetry to install dependencies and run: `poetry install && poetry run python -m bpm`
```

## Usage

- Install: `bpm i <package>`
- Run `bpm -h` and `bpm i -h` for more help.

```
❯ bpm i -h
usage: bpm install [-h] [-b [BIN_NAME]] [-l [Archive]] [-q] [--one-bin] [--prefer-gnu] [-n] [-i] [--filter [FILTER ...]] [--sort [SORT]] packages [packages ...]

positional arguments:
  packages              Package name or github url to install

options:
  -h, --help            show this help message and exit
  -b [BIN_NAME], --bin-name [BIN_NAME]
                        specify the binary executable filename, otherwise use package name by default.
  -l [Archive], --local [Archive]
                        install from local archive.
  -q, --quiet           not ask, install the best match repo.
  --one-bin             install given binary only. Use package name as binary name by default.
  --prefer-gnu          bpm prefers musl target by default, you can change this default option.
  -n, --dry-run         print the install position, but not install actually.
  -i, --interactive     select asset interactively.
  --filter [FILTER ...]
                        filter assets
  --sort [SORT]         sort param in github api, use `best-match` by default. The value could be `stars`, `forks`, `help-wanted-
                        issues`, `updated`.
```

## How it works

### Linux

BPM automatically determines the file structure in the asset and installs it to the appropriate location on the system. The current installation is like:

1. install binary
2. merge the `lib`, `include`, `share`, `man`, `bin` directories into the system
3. install completions

BPM automatically adds the `.old` suffix to existing files to avoid overwrite. The `.old` files will be restored in uninstalling.

### Windows

BPM downloads asset into `%userprofile%/bpm/app/<name>` and creates shortcuts and cmd runner for the executables to `%userprofile%/bpm/bin`, which is added to `%path%`.

## Develop

```sh
git clone https://github.com/lxl66566/bpm.git
cd bpm
poetry install
poetry run python -m unittest bpm/**/*.py  # run tests
```

## TODO

- [ ] no pre release
- [x] try install
- [x] windows support
- [x] offline install
- [x] install from github link
- [x] update from local

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lxl66566/bpm",
    "name": "bin-package-manager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "binary, packaging, release",
    "author": "lxl66566",
    "author_email": "lxl66566@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/00/91/d2c27827ac1ba06a674fb616f9ddeaff4facb2fcdead29b409fca4e075b4/bin_package_manager-2.2.6.tar.gz",
    "platform": null,
    "description": "# bin package manager\n\nEnglish | [\u7b80\u4f53\u4e2d\u6587](./docs/README.zh-CN.md)\n\nBin package manager (BPM) is a Github release-based package manager that allows users to install and manage binaries from any Github release.\n\nBPM is currently supported on Linux and Windows, python >= 3.9.\n\n> [!CAUTION]\n> Risk Warning: BPM on Linux may damage your computer. By using BPM to install software, you accept this risk and trust third-party Github release packagers.\n\n## Why use it?\n\nIn non-rolling release Linux distributions, the version of softwares in official source are often too low to use some new features.\n\nRolling distributions, such as Archlinux, are also unable to install software from the AUR as root.\n\nA common way to manage packages on Windows is scoop, but it requires the packager to maintain a \"manifest\" list.\n\n## Installation\n\nBPM needs to be installed to root user.\n\n### pip\n\n#### Linux\n\n```sh\nsudo pip install bin-package-manager --break-system-packages\nsudo bpm\n```\n\nNote the risk of potentially breaking system packages.\n\n#### Windows\n\n```sh\npip install bin-package-manager\nbpm\n```\n\n### pipx\n\nYou can use pipx to install BPM.\n\n```sh\nsudo pipx install bin-package-manager\n```\n\npipx will only install for the current user, so `sudo` is required. Alternatively, you can track on [this issue](https://github.com/pypa/pipx/issues/754) and use other methods mentioned there.\n\n### Source code\n\nIf you don't want to use pipx, you can also download and use the source code.\n\nBPM requires [these libs](./requirements.txt), please install them manually.\n\n```sh\ngit clone https://github.com/lxl66566/bpm.git\ncd bpm\npython3 -m bpm\n# or use poetry to install dependencies and run: `poetry install && poetry run python -m bpm`\n```\n\n## Usage\n\n- Install: `bpm i <package>`\n- Run `bpm -h` and `bpm i -h` for more help.\n\n```\n\u276f bpm i -h\nusage: bpm install [-h] [-b [BIN_NAME]] [-l [Archive]] [-q] [--one-bin] [--prefer-gnu] [-n] [-i] [--filter [FILTER ...]] [--sort [SORT]] packages [packages ...]\n\npositional arguments:\n  packages              Package name or github url to install\n\noptions:\n  -h, --help            show this help message and exit\n  -b [BIN_NAME], --bin-name [BIN_NAME]\n                        specify the binary executable filename, otherwise use package name by default.\n  -l [Archive], --local [Archive]\n                        install from local archive.\n  -q, --quiet           not ask, install the best match repo.\n  --one-bin             install given binary only. Use package name as binary name by default.\n  --prefer-gnu          bpm prefers musl target by default, you can change this default option.\n  -n, --dry-run         print the install position, but not install actually.\n  -i, --interactive     select asset interactively.\n  --filter [FILTER ...]\n                        filter assets\n  --sort [SORT]         sort param in github api, use `best-match` by default. The value could be `stars`, `forks`, `help-wanted-\n                        issues`, `updated`.\n```\n\n## How it works\n\n### Linux\n\nBPM automatically determines the file structure in the asset and installs it to the appropriate location on the system. The current installation is like:\n\n1. install binary\n2. merge the `lib`, `include`, `share`, `man`, `bin` directories into the system\n3. install completions\n\nBPM automatically adds the `.old` suffix to existing files to avoid overwrite. The `.old` files will be restored in uninstalling.\n\n### Windows\n\nBPM downloads asset into `%userprofile%/bpm/app/<name>` and creates shortcuts and cmd runner for the executables to `%userprofile%/bpm/bin`, which is added to `%path%`.\n\n## Develop\n\n```sh\ngit clone https://github.com/lxl66566/bpm.git\ncd bpm\npoetry install\npoetry run python -m unittest bpm/**/*.py  # run tests\n```\n\n## TODO\n\n- [ ] no pre release\n- [x] try install\n- [x] windows support\n- [x] offline install\n- [x] install from github link\n- [x] update from local\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Bin package manager, a package manager based on Github release",
    "version": "2.2.6",
    "project_urls": {
        "Homepage": "https://github.com/lxl66566/bpm",
        "Repository": "https://github.com/lxl66566/bpm"
    },
    "split_keywords": [
        "binary",
        " packaging",
        " release"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84b3c22445368127373bf131d234ea4a57c1e7ffe9dd971937541e09178152be",
                "md5": "1a47cd4984b66d25fbe83fc0126dea69",
                "sha256": "c9e605b1d9964111118375fadda32dde08ddaaf236f4e63024a2f38ae9dcdae3"
            },
            "downloads": -1,
            "filename": "bin_package_manager-2.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a47cd4984b66d25fbe83fc0126dea69",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 22786,
            "upload_time": "2024-04-14T11:47:47",
            "upload_time_iso_8601": "2024-04-14T11:47:47.493726Z",
            "url": "https://files.pythonhosted.org/packages/84/b3/c22445368127373bf131d234ea4a57c1e7ffe9dd971937541e09178152be/bin_package_manager-2.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0091d2c27827ac1ba06a674fb616f9ddeaff4facb2fcdead29b409fca4e075b4",
                "md5": "315b381eab66643ad7c7ca49f44bca5f",
                "sha256": "0751d10442737ab0a395dc76a874134720ea21c052df8beb7c4c88e01cc35d45"
            },
            "downloads": -1,
            "filename": "bin_package_manager-2.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "315b381eab66643ad7c7ca49f44bca5f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 20317,
            "upload_time": "2024-04-14T11:47:49",
            "upload_time_iso_8601": "2024-04-14T11:47:49.868115Z",
            "url": "https://files.pythonhosted.org/packages/00/91/d2c27827ac1ba06a674fb616f9ddeaff4facb2fcdead29b409fca4e075b4/bin_package_manager-2.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 11:47:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lxl66566",
    "github_project": "bpm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "bin-package-manager"
}
        
Elapsed time: 0.23336s