Skip to main content

PBT

pbt — a build tool for multi-packages that leverages package registries (pypi, npmjs, etc.).

PyPI Python GitHub Issues Contributions welcome License

Introduction

Having all packages in the same repository make it much easier to develop, share, reuse, and refactor code. Building and publishing the packages should not be done manually because it is time-consuming and may be frustrated if the projects are depending on each other. pbt is a tool designed to help make the process easier and faster. It supports building, installing, and updating versions of your packages and their dependencies consistently. It also provides utility commands to help you work with your packages in multi-repositories as if you are working with a monorepo.

Installation

pip install -U pab  # not pbt

Usage

Note: currently, pbt supports Python packages configured with Poetry (an awesome dependency management that you should consider using).

Assuming that you organized your packages to different sub-folders, each has their own project configuration file (e.g., pyproject.toml). You can run the following commands in the root directory (containing your projects). Note: pbt will discover the project based on the project name in its configuration file not the folder name.

You can also discover the list of commands by running pbt --help. Many commands have an option --cwd to override the current working directory.

  1. List all packages in the current project, and their dependencies if required
pbt list [-d]
  • -d, --dev: Whether to print to the local (inter-) dependencies
  1. Create virtual environment of a package and install its dependencies
pbt install [-d] [-v] [-p <package>]
  • -d: also install dev-dependencies of the package
  • -v: verbose
  • -p: specify the package we want to build, if empty build all packages.

If you have encounter some errors during the installation, you can checkout the pyproject.failed.toml file that is generated by pbt in ./cache/<package> folder (relative to your current working directory). For example, on M1 chip, if your python version is ^3.8, you can't use the newer scipy (e.g., >1.8 as it requires python <3.11), poetry lock chooses to use an old version 1.6.0, which typically can't build on M1 due to no pre-built numpy for it.

  1. Update all package inter-dependencies
pbt update
  1. Clean packages' build & lock files
pbt clean [-p <package>]
  • -p: specify the package we want to build, if empty build all packages.
  1. Git clone a multi-repository project
pbt git clone --repo <repo_url>

Clone a repository and check out all of its submodules to their correct branches that we were using last time.

  1. Git update a multi-repository project
pbt git update

Pull latest changes from the repository, and check out all of its submodules to their correct branches.

Metadata

Release files for pab 2.9.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 pab 2.9.1
File Size Uploaded
pab-2.9.1.tar.gz 31.6 kB Details

Built distribution (wheel)

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

Total release size: 70.7 kB

Release files / pab-2.9.1.tar.gz

Download URL pab-2.9.1.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2909853434fddc76f8415a936de06c25abd3ffbb146e87e0c7136da581896659
BLAKE2b-256 checksum
How to use checksums
2fd5ade330950f3f6d21c0b81d58828d07bc2c5b98b8df585eaef327f404b831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.14

Release files / pab-2.9.1-py3-none-any.whl

Download URL pab-2.9.1-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12204e91bbb2e521a6e36ca164efaad288bf68dd3e97cb705ba8745f78260dfb
BLAKE2b-256 checksum
How to use checksums
4ec7a808a01affcf0cc9d262ea18d06a262a6ab514d52b3ca7545147b03cfe99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.14

Release history Release notifications | RSS feed

This release

2.9.1 This release

2 release files

2.9.0

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.2.12

2 release files

2.2.11

2 release files

2.2.10

2 release files

2.2.9

2 release files

2.2.8

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.2

2 release files

2.0.1

2 release files

1.9.4

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