Metadata-Version: 2.4
Name: pyproject-runner-shim
Version: 0.3.0
Summary: Shim for pyproject-runner.
Project-URL: homepage, https://github.com/avantus-tech/pyproject-runner
Project-URL: documentation, https://github.com/avantus-tech/pyproject-runner/blob/main/shim/README.md
Project-URL: repository, https://github.com/avantus-tech/pyproject-runner
Project-URL: changelog, https://github.com/avantus-tech/pyproject-runner/releases
License: BSD 3-Clause License
        
        Copyright (c) 2024, Avantus LLC
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE.txt
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# pyproject-runner-shim

pyproject-runner-shim provides a tiny convenience script to shorten the command used to execute
pyproject-runner tasks from `uv run rr TASK ...` to `rr TASK ...`.

[pyproject-runner](/project/pyproject-runner/) provides a simple, project-oriented method of defining developer scripts.
It is a simple task runner, similar to [taskipy](https://pypi.org/project/taskipy/) or [Poe the Poet](https://pypi.org/project/poethepoet/), for running tasks
defined in a *pyproject.toml* file.

Pyproject-runner-shim expects the `rr` shim to be executed from a uv-managed project directory or
subdirectory, with or without pyproject-runner installed in the project's virtual environment. If
pyproject-runner is installed in the project's virtual environment, then that version will be run
using the virtual environment's python executable. Otherwise, it will use `uv tool run` to download
and run pyproject-runner from an ephemeral environment. This offers flexibility in how projects use
pyproject-runner.


## Installation

Install with `uv tool`:

```console
$ uv tool install pyproject-runner-shim
```

If uv complains that the tool bin directory is not on the *PATH* environment variable, use
`uv tool update-shell` to update the *PATH*, or manually add it to your shell's configuration file.
See the [uv tool documentation](https://docs.astral.sh/uv/concepts/tools/#tool-executables) for more information.


## How it works

The package consists of a single `rr` script, mirroring the name of the main script from the
pyproject-runner package, which uv installs into the uv tool bin directory. Using only the Python
standard library, the script simply executes `uv run -- python3 -m pyproject_runner`, passing along
any arguments provided to the script. This allows the shim to be used with any number of uv-based
projects that may require different versions of pyproject-runner. uv automatically determines which
virtual environment to used based on the current working directory. Or, if pyproject-runner isn't
a project dependency, then it will be run from an ephemeral virtual environment, allowing it to be
used with projects requiring python < 3.10.


## Changelog

View the full changelog [here](https://github.com/avantus-tech/pyproject-runner/releases).


## License

pyproject-runner is licensed under a [3-Clause BSD licence](https://github.com/avantus-tech/pyproject-runner/blob/main/shim/LICENSE.txt).
