Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osx_compliant #9

Merged
merged 5 commits into from
Feb 20, 2018
Merged

osx_compliant #9

merged 5 commits into from
Feb 20, 2018

Conversation

bgruening
Copy link
Owner

No description provided.

@bsennblad
Copy link

@bgruening @jdblischak
Tried this with MacOSX native sed (usr/bin/sed), but can't make any detailed debugging right now -- sorry.
MacOSX sed gives no error messages, but it appears that sed doesn't do what is expected. I enclose the diff file for the r-udunits2 meta.yaml (have to add a '.txt' suffix to be allowed to enclose it:) and give the terminal output below.

Hope this helps a little.

Best,

bengt

igp-47-43:conda_r_skeleton_helper bengts$ bash run.sh
Tip: install CacheControl (conda package) to cache the CRAN metadata
Fetching metadata from https://cran.r-project.org/
Tip: install CacheControl (conda package) to cache the CRAN metadata
Downloading source from https://cran.r-project.org/src/contrib/udunits2_0.13.tar.gz
Writing recipe for udunits2
Done
--dirty flag and --keep-old-work not specified.Removing build/test folder after successful build/test.

INFO:conda_build.config:--dirty flag and --keep-old-work not specified.Removing build/test folder after successful build/test.

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

(gedit:43569): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

** (gedit:43569): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported
tmp/r-skat.meta.diff:- license_family: GPL3n license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3' # [unix]n license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3' # [win]
tmp/r-skat.meta.diff:+ license_family: GPL3
tmp/r-tilegramsr.meta.diff:- license: MIT
tmp/r-tilegramsr.meta.diff:+ license: MIT + file LICENSE
tmp/r-tilegramsr.meta.diff: license_family: MIT
tmp/r-udunits2.meta.diff: license: GPL-2
tmp/r-udunits2.meta.diff:- license_family: GPL2n license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2' # [unix]n license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2' # [win]
tmp/r-udunits2.meta.diff:+ license_family: GPL2
igp-47-43:conda_r_skeleton_helper bengts$

r-udunits2.meta.diff.txt

@jdblischak
Copy link
Collaborator

@bgruening Thanks for working on this! Here's what I found:

  1. On Ubuntu (GNU sed 4.4), the updated script produces the same results (verified with md5 checksum). I'd recommend removing the unnecessary .bak files at the end: rm $fn/*bak

  2. On macOS (BSD sed from May 10, 2005), I had a similar result as @bsennblad. The sed commands completed without error. However, only the bld.bat files were properly processed (verified with md5 checksum). The build.sh file is unchanged. The meta.yaml file has some changes, but it's not the same as running on Linux. Here's the meta.yaml for r-udunits2 after running run.sh on macOS:

{% set version = '0.13' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-udunits2
  version: {{ version|replace("-", "_") }}

source:
  fn: udunits2_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/udunits2_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/udunits2/udunits2_{{ version }}.tar.gz
  sha256: d155d3c07f6202b65dec4075ffd1e1c3f4f35f5fdece8cfb319d39256a3e5b79
  # patches:
   # List any patch files here
   # - fix.patch

build:
  # If this is a new build for the same version, increment the build number.
  number: 0n  skip: true  # [win32]

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-basen    - libgcc  # [not win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('udunits2')"  # [not win]
    - "\"%R%\" -e \"library('udunits2')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https
  license: GPL-2
  summary: Provides simple bindings to Unidata's udunits library.
  license_family: GPL2n  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]n  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
  1. Could you add a check so that gedit is only opened on Linux? Copied from the bioconda post-link.sh script:
if [[ $(uname -s) == "Linux" ]]; then
  gedit $fn/meta.yaml
fi

@bsennblad
Copy link

@bgruening @jdblischak

Changing all \s to [[:space:]] in run.sh solves the problems on my mac. I tried to fork and make a pull request, but I had problem checking out the osx branch -- strange. It's late so I post the soluiton here instead.
I second John's suggestion on making the gedit call conditional on Linux.

Have a great weekend.

Bengt

@jdblischak
Copy link
Collaborator

FYI this still needs to be merged into master

@bgruening bgruening merged commit da4ef01 into master Feb 20, 2018
@bgruening bgruening deleted the osx branch February 20, 2018 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants