README.md

pkgbuild

R-CMD-check Codecov test coverage

The goal of pkgbuild is to make it easy to build packages with compiled code. It provides tools to configure your R session, and check that everything is working ok. If you are using RStudio, it also helps you trigger automatic install of the build tools.

Installation

Install the released version from CRAN

install.packages("pkgbuild")

Or install the development version from GitHub:

# install.packages("pak")
pak::pak("r-lib/pkgbuild")

Example

# Check that you have the build tools installed
pkgbuild::check_build_tools(debug = TRUE)

# Build a package
pkgbuild::build("/path/to/my/package")

# Run your own code in an environment guaranteed to
# have build tools available
pkgbuild::with_build_tools(my_code)

Configuration

DESCRIPTION entries

You can also use the pkg.build_copy_method option or the PKG_BUILD_COPY_METHOD environment variable to set the copy method. The option is consulted first, then the DESCRIPTION entry, then the environment variable.

Options

Environment variables

Code of Conduct

Please note that the pkgbuild project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



Try the pkgbuild package in your browser

Any scripts or data that you put into this service are public.

pkgbuild documentation built on Oct. 30, 2024, 9:08 a.m.