rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

Add `perl` test section?

Open wolfv opened this issue 1 year ago • 0 comments

Apparently conda-build has some magic that makes the test.import section also work for perl.

For example here:

{% set name = "perl-data-dumper" %}
{% set version = "2.183" %}
{% set sha256 = "e42736890b7dae1b37818d9c5efa1f1fdc52dec04f446a33a4819bf1d4ab5ad3" %}

package:
  name: {{ name }}
  version: {{ version }}

source:
  url: https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/Data-Dumper-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0
  # nothing provides perl >=5.32.1,<6.0a0 *_perl5 needed by perl-extutils-makemaker-7.36-pl5321hd8ed1ab_0
  skip: true  # [win]
  script:
    - perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1
    - make
    - make test
    - make install VERBINST=1

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}  # [win]
    - make
  host:
    - perl
    - perl-extutils-makemaker
  run:
    - perl

test:
  imports:
    - Data::Dumper

about:
  home: https://metacpan.org/pod/Data::Dumper
  license: GPL-1.0-or-later OR Artistic-1.0-Perl
  license_family: OTHER
  summary: 'seeds germane, yet not germinated'
  license_file:
    - {{ environ["PREFIX"] }}/man/man1/perlartistic.1
    - {{ environ["PREFIX"] }}/man/man1/perlgpl.1

wolfv avatar Apr 11 '24 14:04 wolfv