Closed nick-youngblut closed 6 years ago
I think you should be able to remove whatever in meta.yaml is trying to read that description. Whether it is in build.sh or meta.yaml - either way, just cut it. I'm not sure what purpose it serves, exactly, without taking a closer look, but it's almost certainly fine to omit whatever data it's reading there.
That's the thing, I don't know what I'm looking for. All that I can find in either file that mentions DESCRIPTION is:
mv DESCRIPTION DESCRIPTION.old
grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
in the meta.yaml
file, but I'm guessing that's not the problem. Any ideas on what could be trying to read the description?
It seems that the DESCRIPTION file for the fd
package is missing many fields found in other packages. The PMA
package for example:
Type: Package
Title: Penalized Multivariate Analysis
Version: 1.0.9
Date: 2013-03-23
Author: Daniela Witten and Rob Tibshirani and Sam Gross and
Balasubramanian Narasimhan
Maintainer: Daniela Witten <dwitten@u.washington.edu>
Description: Performs Penalized Multivariate Analysis: a penalized
matrix decomposition, sparse principal components analysis, and
sparse canonical correlation analysis, described in the
following papers: (1) Witten, Tibshirani and Hastie (2009) A
penalized matrix decomposition, with applications to sparse
principal components and canonical correlation analysis.
Biostatistics 10(3):515-534. (2) Witten and Tibshirani (2009)
Extensions of sparse canonical correlation analysis, with
applications to genomic data. Statistical Applications in
Genetics and Molecular Biology 8(1): Article 28.
License: GPL (>= 2)
Depends: R (>= 2.10), plyr, impute
Packaged: 2013-03-25 07:06:23 UTC; dwitten
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2013-03-25 08:26:26
Which, if any, of these fields are required?
I've spent a lot of time trying to figure this out. My basic approach has been to compare the FD
package description to other packages that build successfully. The description for FD
(https://cran.r-project.org/src/contrib/FD_1.0-12.tar.gz) is:
Package: FD
Type: Package
Title: Measuring functional diversity (FD) from multiple traits, and
other tools for functional ecology
Version: 1.0-12
Date: 2014-19-08
Author: Etienne LalibertÈ, Pierre Legendre, Bill Shipley
Maintainer: Etienne LalibertÈ <etiennelaliberte@gmail.com>
Description: FD is a package to compute different multidimensional FD indices. It implements a distance-based framework to measure FD that allows any number and type of functional traits, and can also consider species relative abundances. It also contains other useful tools for functional ecology.
License: GPL-2
LazyLoad: yes
LazyData: yes
Depends: ade4, ape, geometry, vegan
Encoding: latin1
Packaged: 2014-08-19 09:49:14 UTC; 00073639
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2014-08-19 13:42:17
The resulting DESCRIPTION file during the build is:
Package: FD
Type: Package
Title: Measuring functional diversity (FD) from multiple traits, and
other tools for functional ecology
Version: 1.0-12
Date: 2014-19-08
Binary file DESCRIPTION.old matches
Now for plyr (https://cran.r-project.org/src/contrib/plyr_1.8.4.tar.gz), the package DESCRIPTION is:
Package: plyr
Version: 1.8.4
Title: Tools for Splitting, Applying and Combining Data
Description: A set of tools that solves a common set of problems: you
need to break a big problem down into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you might
want to fit a model to each spatial location or time point in your study,
summarise data by panels or collapse high-dimensional arrays to simpler
summary statistics. The development of 'plyr' has been generously supported
by 'Becton Dickinson'.
Authors@R: person("Hadley", "Wickham", , "hadley@rstudio.com", c("aut", "cre"))
URL: http://had.co.nz/plyr, https://github.com/hadley/plyr
BugReports: https://github.com/hadley/plyr/issues
Depends: R (>= 3.1.0)
Imports: Rcpp (>= 0.11.0)
LinkingTo: Rcpp
Suggests: abind, testthat, tcltk, foreach, doParallel, itertools,
iterators, covr
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 5.0.1
NeedsCompilation: yes
Packaged: 2016-06-07 19:58:36 UTC; hadley
Author: Hadley Wickham [aut, cre]
Maintainer: Hadley Wickham <hadley@rstudio.com>
Repository: CRAN
Date/Publication: 2016-06-08 10:40:15
...and the resulting conda-build DESCRIPTION is:
Package: plyr
Version: 1.8.4
Title: Tools for Splitting, Applying and Combining Data
Description: A set of tools that solves a common set of problems: you
need to break a big problem down into manageable pieces, operate on each
piece and then put all the pieces back together. For example, you might
want to fit a model to each spatial location or time point in your study,
summarise data by panels or collapse high-dimensional arrays to simpler
summary statistics. The development of 'plyr' has been generously supported
by 'Becton Dickinson'.
Authors@R: person("Hadley", "Wickham", , "hadley@rstudio.com", c("aut", "cre"))
URL: http://had.co.nz/plyr, https://github.com/hadley/plyr
BugReports: https://github.com/hadley/plyr/issues
Depends: R (>= 3.1.0)
Imports: Rcpp (>= 0.11.0)
LinkingTo: Rcpp
Suggests: abind, testthat, tcltk, foreach, doParallel, itertools,
iterators, covr
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 5.0.1
NeedsCompilation: yes
Packaged: 2016-06-07 19:58:36 UTC; hadley
Author: Hadley Wickham [aut, cre]
Maintainer: Hadley Wickham <hadley@rstudio.com>
Repository: CRAN
Date/Publication: 2016-06-08 10:40:15
Built: R 3.4.1; x86_64-pc-linux-gnu; 2017-08-20 05:58:14 UTC; unix
One difference I see with FD
, is the lack of Authors@R
. Could this be why the conda-build DESCRIPTION is lacking so many fields? Could it be the È
in the first author's name?
Yes, that character may cause problems. Are you using Python 2.7 in your root env? If so, maybe try from a Python 3 installation - it handles non-ascii characters much better. We can probably improve handling in conda-build across all of the pythons, but this can be a lot of work to get right.
Oops, I see from your conda info above that yes, you are already on python 3.6. So no dice there. We need a fix for conda-build. You may need to manually create or augment this recipe in the meantime.
So, I was table to get conda-build
to work for the fd
R package. I had to fork the Github repo, then edit the DESCRIPTION to remove the "é" in the author's name. I then created a new release tag and ran conda-build
with the Github url & tag from my forked repo. So it appears that conda-build can't handle "é" in DESCRIPTION files of R packages (I'm using conda-build 3.9.1)
I don't think this is a conda-build bug, actually. The failure is in code in the generated conda_build.sh, which looks like this:
conda activate --stack "/Users/msarahan/miniconda3/conda-bld/r-fd_1524844118693/_build_env"
#!/bin/bash
if [[ $target_platform =~ linux.* ]] || [[ $target_platform == win-32 ]] || [[ $target_platform == win-64 ]] || [[ $target_platform == osx-64 ]]; then
export DISABLE_AUTOBREW=1
mv DESCRIPTION DESCRIPTION.old
grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
$R CMD INSTALL --build .
else
mkdir -p $PREFIX/lib/R/library/FD
mv * $PREFIX/lib/R/library/FD
fi
I think it is failing on the grep lines, which are created here:
https://github.com/conda/conda-build/blob/master/conda_build/skeletons/cran.py#L125 https://github.com/conda/conda-build/blob/master/conda_build/skeletons/cran.py#L141
Note that the skeleton is generated fine, it is only later that reading the file fails.
The package builds fine for me. This then suggests that you may not have your computer's LOCALE stuff set. That's a common problem with docker containers especially. See https://stackoverflow.com/a/28406007/1170370
I'm closing this issue, but I'd be happy to reopen it if you can prove that it is actually a problem in conda-build.
@msarahan I'm actually encountering this issue now with the recipe for the CRAN package snpassoc
generated with conda skeleton
on my Ubuntu 16.04 VM. I have not been successful at changing the locale settings to get this to work. I certainly accept that this isn't conda build's fault per se but once I figure out a fix I think we should either bake it into the skeleton output or the documentation.
Hi there, thank you for your contribution!
This issue has been automatically locked because it has not had recent activity after being closed.
Please open a new issue if needed.
Thanks!
I originally reported this error in issue #2750, but that issue is closed, and I'm still having the same problem with
conda-build 3.8.0
(I just updated it).The steps that generated the error:
The error:
The DESCRIPTION file:
Conda info:
Is there anything that I can change in the
build.sh
ormeta.yaml
files inr-fd/
to fix this issue? Maybe the line:grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
, given that the DESCRIPTION file doesn't seem to include "Priority"?