Skip to content

Commit 012d5a9

Browse files
committed
consider Imports: along with Depends: when analysing a package
1 parent fefc112 commit 012d5a9

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2014-05-10 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Attributes.R (compileAttributes): Read Imports: as well
4+
15
2014-05-07 Kevin Ushey <[email protected]>
26

37
* R/Attributes.R (.plugins[["cpp11"]]): Set USE_CXX1X to more

R/Attributes.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,11 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
343343
stop("pkgdir must refer to the directory containing an R package")
344344
pkgDesc <- read.dcf(descFile)[1,]
345345
pkgname = .readPkgDescField(pkgDesc, "Package")
346-
depends <- .readPkgDescField(pkgDesc, "Depends", character())
346+
depends <- c(.readPkgDescField(pkgDesc, "Depends", character()),
347+
.readPkgDescField(pkgDesc, "Imports", character()))
347348
depends <- unique(.splitDepends(depends))
348349
depends <- depends[depends != "R"]
349-
350+
350351
# determine source directory
351352
srcDir <- file.path(pkgdir, "src")
352353
if (!file.exists(srcDir))

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
added for use with C++0x (eg when using g++ 4.6.* as on Windows)
2121
as well as C++1y for compilers beginning to support the next
2222
revision of the stanard.
23+
\item \code{compileAttributes()} now also considers Imports: which
24+
may suppress a warning when running \code{Rcpp.package.skeleton()}.
2325
}
2426
}
2527

0 commit comments

Comments
 (0)