python-build-utils


Namepython-build-utils JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummarySmall collection of command line utilities to assist with building your python wheels
upload_time2025-02-22 11:57:26
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.10
licenseNone
keywords python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-build-utils

[![GitHub Release](https://img.shields.io/github/v/release/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/releases/tag/0.1.1)
[![PyPI Version](https://img.shields.io/pypi/v/python-build-utils)](https://pypi.org/project/python-build-utils/)
[![Build Status](https://img.shields.io/github/actions/workflow/status/dave-Lab-and-Engineering/python-build-utils/main.yml?branch=main)](https://github.com/dave-Lab-and-Engineering/python-build-utils/actions/workflows/main.yml)
[![Coverage Status](https://coveralls.io/repos/github/dave-Lab-and-Engineering/python-build-utils/badge.svg)](https://coveralls.io/github/dave-Lab-and-Engineering/python-build-utils)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/commits/main)
[![License](https://img.shields.io/github/license/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/blob/main/LICENSE)

Small collection of command line utilities to assist with building your python wheels

- **Github repository**: <https://github.com/dave-Lab-and-Engineering/python-build-utils>
- **Documentation** <https://dave-Lab-and-Engineering.github.io/python-build-utils/>

## Description

### Cli-tool `python-build-utils --help`

```shell
Usage: python-build-utils [OPTIONS] COMMAND [ARGS]...

  A collection of CLI tools for Python build utilities.

Options:
  -v, --version  Show the version and exit.
  --help         Show this message and exit.

Commands:
  pyd2wheel           Create a wheel from a compiled python *.pyd file.
  remove-tarballs     Remove tarball files from dist.
  rename-wheel-files  Rename wheel files in the dist folder.
```

### Cli-tool `rename-wheel-files --help`

```shell
Usage: rename-wheel-files [OPTIONS]

  Rename wheel files in the dist folder.

  This function renames wheel files in the given distribution directory by
  replacing the "py3-none-any" tag with a custom build version tag. The build
  version tag is constructed using the provided `python_version_tag`,
  `platform_tag`, and `wheel_tag`. If `wheel_tag` is provided, it is used
  directly as the build version tag. Otherwise, the build version tag is
  constructed using the `python_version_tag` and `platform_tag`.

  Args:

      dist_dir (str): The directory containing the wheel files to be renamed.
      Default is 'dist'.

      python_version_tag (str): The Python version tag to be included in the
      new file name. Default is cp{major}{minor}.

      platform_tag (str): The platform tag to be included in the new file
      name. Default is sysconfig.get_platform().

      wheel_tag (str): The custom wheel tag to be used as the build version
      tag. If this is provided, it is used directly as the build version tag
      and the other tags are ignored. If this is not provided, the build
      tag is constructed using the `python_version_tag` and `platform_tag` as
      described above.

  Returns:     None

  Example:     rename_wheel_files("dist", "cp39", "win_amd64", "")

Options:
  -v, --version              Show the version and exit.
  --dist_dir TEXT            Directory containing wheel files. Default is
                             'dist'
  --python_version_tag TEXT  Explicitly specify the python version tag.
                             Default is cp{major}{minor}
  --platform_tag TEXT        Explicitly specify the platform tag. Default is
                             sysconfig.get_platform()
  --wheel_tag TEXT           Explicitly specify the total wheel tag. Default is
                             {python_version_tag}-{python_version_tag}-{platform_tag}
  --help                     Show this message and exit.
```

#### Example of using rename-wheel-file

From your project root folder, just run

```shell
rename-wheel-files
```

### Cli-tool `remove-tarballs --help`

```shell
Usage: remove-tarballs [OPTIONS]

  Remove tarball files from dist.

  This function removes tarball files from the given distribution directory.

  Args:     dist_dir (str): The directory containing the tarball files to be
  removed.

  Returns:     None

  Example:     remove_tarballs("dist")

Options:
  -v, --version    Show the version and exit.
  --dist_dir TEXT  Directory containing wheel the files. Default is 'dist'
  --help           Show this message and exit.
```

#### Example of using remove-tarballs

From your project root folder, just run

```shell
remove-tarballs
```

### Cli-tool `pyd2wheel --help`

``` shell
Usage: pyd2wheel [OPTIONS] PYD_FILE

  Create a wheel from a compiled python *.pyd file.

Options:
  -v, --version           Show the version and exit.
  --package_version TEXT  The version of the package.
  --abi_tag TEXT          The ABI tag of the package. Default is 'none'.
  --help                  Show this message and exit.
```

This is a tool to convert bare .pyd files to a wheel file such that they can be installed.

```shell
pyd2wheel .\mybinary.cp310-win_amd64.pyd --version=1.0.0
```

or from python:

```python
from python_build_utils import pyd2wheel
pyd2wheel("mybinary.cp310-win_amd64.pyd", version="1.0.0")
```

This will create a wheel file named in the same directory as the input file.

Note: The version argument is used only if the version is not already present in the filename (like in the example above).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-build-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "python",
    "author": null,
    "author_email": "Eelco van Vliet <eelco@davelab.nl>",
    "download_url": "https://files.pythonhosted.org/packages/2a/1d/8a60c26d7cd163b474fd1eb168cdd6ca843e6c921003ddd21dcdce194ad7/python_build_utils-0.1.2.tar.gz",
    "platform": null,
    "description": "# python-build-utils\n\n[![GitHub Release](https://img.shields.io/github/v/release/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/releases/tag/0.1.1)\n[![PyPI Version](https://img.shields.io/pypi/v/python-build-utils)](https://pypi.org/project/python-build-utils/)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/dave-Lab-and-Engineering/python-build-utils/main.yml?branch=main)](https://github.com/dave-Lab-and-Engineering/python-build-utils/actions/workflows/main.yml)\n[![Coverage Status](https://coveralls.io/repos/github/dave-Lab-and-Engineering/python-build-utils/badge.svg)](https://coveralls.io/github/dave-Lab-and-Engineering/python-build-utils)\n[![Commit Activity](https://img.shields.io/github/commit-activity/m/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/commits/main)\n[![License](https://img.shields.io/github/license/dave-Lab-and-Engineering/python-build-utils)](https://github.com/dave-Lab-and-Engineering/python-build-utils/blob/main/LICENSE)\n\nSmall collection of command line utilities to assist with building your python wheels\n\n- **Github repository**: <https://github.com/dave-Lab-and-Engineering/python-build-utils>\n- **Documentation** <https://dave-Lab-and-Engineering.github.io/python-build-utils/>\n\n## Description\n\n### Cli-tool `python-build-utils --help`\n\n```shell\nUsage: python-build-utils [OPTIONS] COMMAND [ARGS]...\n\n  A collection of CLI tools for Python build utilities.\n\nOptions:\n  -v, --version  Show the version and exit.\n  --help         Show this message and exit.\n\nCommands:\n  pyd2wheel           Create a wheel from a compiled python *.pyd file.\n  remove-tarballs     Remove tarball files from dist.\n  rename-wheel-files  Rename wheel files in the dist folder.\n```\n\n### Cli-tool `rename-wheel-files --help`\n\n```shell\nUsage: rename-wheel-files [OPTIONS]\n\n  Rename wheel files in the dist folder.\n\n  This function renames wheel files in the given distribution directory by\n  replacing the \"py3-none-any\" tag with a custom build version tag. The build\n  version tag is constructed using the provided `python_version_tag`,\n  `platform_tag`, and `wheel_tag`. If `wheel_tag` is provided, it is used\n  directly as the build version tag. Otherwise, the build version tag is\n  constructed using the `python_version_tag` and `platform_tag`.\n\n  Args:\n\n      dist_dir (str): The directory containing the wheel files to be renamed.\n      Default is 'dist'.\n\n      python_version_tag (str): The Python version tag to be included in the\n      new file name. Default is cp{major}{minor}.\n\n      platform_tag (str): The platform tag to be included in the new file\n      name. Default is sysconfig.get_platform().\n\n      wheel_tag (str): The custom wheel tag to be used as the build version\n      tag. If this is provided, it is used directly as the build version tag\n      and the other tags are ignored. If this is not provided, the build\n      tag is constructed using the `python_version_tag` and `platform_tag` as\n      described above.\n\n  Returns:     None\n\n  Example:     rename_wheel_files(\"dist\", \"cp39\", \"win_amd64\", \"\")\n\nOptions:\n  -v, --version              Show the version and exit.\n  --dist_dir TEXT            Directory containing wheel files. Default is\n                             'dist'\n  --python_version_tag TEXT  Explicitly specify the python version tag.\n                             Default is cp{major}{minor}\n  --platform_tag TEXT        Explicitly specify the platform tag. Default is\n                             sysconfig.get_platform()\n  --wheel_tag TEXT           Explicitly specify the total wheel tag. Default is\n                             {python_version_tag}-{python_version_tag}-{platform_tag}\n  --help                     Show this message and exit.\n```\n\n#### Example of using rename-wheel-file\n\nFrom your project root folder, just run\n\n```shell\nrename-wheel-files\n```\n\n### Cli-tool `remove-tarballs --help`\n\n```shell\nUsage: remove-tarballs [OPTIONS]\n\n  Remove tarball files from dist.\n\n  This function removes tarball files from the given distribution directory.\n\n  Args:     dist_dir (str): The directory containing the tarball files to be\n  removed.\n\n  Returns:     None\n\n  Example:     remove_tarballs(\"dist\")\n\nOptions:\n  -v, --version    Show the version and exit.\n  --dist_dir TEXT  Directory containing wheel the files. Default is 'dist'\n  --help           Show this message and exit.\n```\n\n#### Example of using remove-tarballs\n\nFrom your project root folder, just run\n\n```shell\nremove-tarballs\n```\n\n### Cli-tool `pyd2wheel --help`\n\n``` shell\nUsage: pyd2wheel [OPTIONS] PYD_FILE\n\n  Create a wheel from a compiled python *.pyd file.\n\nOptions:\n  -v, --version           Show the version and exit.\n  --package_version TEXT  The version of the package.\n  --abi_tag TEXT          The ABI tag of the package. Default is 'none'.\n  --help                  Show this message and exit.\n```\n\nThis is a tool to convert bare .pyd files to a wheel file such that they can be installed.\n\n```shell\npyd2wheel .\\mybinary.cp310-win_amd64.pyd --version=1.0.0\n```\n\nor from python:\n\n```python\nfrom python_build_utils import pyd2wheel\npyd2wheel(\"mybinary.cp310-win_amd64.pyd\", version=\"1.0.0\")\n```\n\nThis will create a wheel file named in the same directory as the input file.\n\nNote: The version argument is used only if the version is not already present in the filename (like in the example above).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Small collection of command line utilities to assist with building your python wheels",
    "version": "0.1.2",
    "project_urls": {
        "Repository": "https://github.com/dave-Lab-and-Engineering/python-build-utils"
    },
    "split_keywords": [
        "python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "736127fbde47acf31b9c472d1bd454deeed2d785bb7ce7d045b21afa918c0f44",
                "md5": "653afdb799e9c244e9b7701b2a558583",
                "sha256": "99741630c427688fd7cfe3d779cfba3ef15b1a9bf30bf8c3d96e88e564cce6b7"
            },
            "downloads": -1,
            "filename": "python_build_utils-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "653afdb799e9c244e9b7701b2a558583",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 15241,
            "upload_time": "2025-02-22T11:57:24",
            "upload_time_iso_8601": "2025-02-22T11:57:24.753966Z",
            "url": "https://files.pythonhosted.org/packages/73/61/27fbde47acf31b9c472d1bd454deeed2d785bb7ce7d045b21afa918c0f44/python_build_utils-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2a1d8a60c26d7cd163b474fd1eb168cdd6ca843e6c921003ddd21dcdce194ad7",
                "md5": "abce2b289c879d94ab48242972e1ef9a",
                "sha256": "84a6aaabef3a1cc46a22ba771e1f337b602d926a351dd71661b6712510ce02a6"
            },
            "downloads": -1,
            "filename": "python_build_utils-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "abce2b289c879d94ab48242972e1ef9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 76241,
            "upload_time": "2025-02-22T11:57:26",
            "upload_time_iso_8601": "2025-02-22T11:57:26.103417Z",
            "url": "https://files.pythonhosted.org/packages/2a/1d/8a60c26d7cd163b474fd1eb168cdd6ca843e6c921003ddd21dcdce194ad7/python_build_utils-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-22 11:57:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dave-Lab-and-Engineering",
    "github_project": "python-build-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-build-utils"
}
        
Elapsed time: 0.45605s