From dfeab3a5d1ff40398f173f630d369c091df9e04d Mon Sep 17 00:00:00 2001 From: Surbhi Sharma Date: Mon, 27 Jun 2022 16:39:40 +0530 Subject: [PATCH 1/5] Add documentation on perl packages --- src/maintainer/knowledge_base.rst | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/maintainer/knowledge_base.rst b/src/maintainer/knowledge_base.rst index dd888ce5d6..7795f78714 100644 --- a/src/maintainer/knowledge_base.rst +++ b/src/maintainer/knowledge_base.rst @@ -1518,3 +1518,61 @@ The tl;dr here is that conda sorts as follows: So make sure that you **tag** your package in such a way that the package name that conda-build spits out will sort the package uploaded with an ``rc`` label higher than the package uploaded with the ``dev`` label. + +Perl packages +============= + +Perl has three standard install locations: **core**, **vendor**, and **site**. Here, **core** is used only for the perl itself, **vendor** is used for installing any other conda-forge packages, and **site** is used for the user to install things locally from sources other than conda-forge. + +The most commonly used build system for `perl packages `__ is ``ExtUtils::MakeMaker``. For the archetypical packaging of packages of this form, you can have a look at `perl-file-which recipe `__. + +A few things to note in `perl-file-which recipe `__ are: + + * The ``name`` is composed of ``perl-`` **+** the lower-cased version of the CPAN name. + + .. code-block:: + + package: + name: perl-{{ name|lower }} + version: {{ version }} + + * The requirements section contain ``make`` for build directive, ``perl`` and ``perl-extutils-makemaker`` for host directive, and ``perl`` for run directive. + + .. code-block:: + + requirements: + build: + - make + host: + - perl + - perl-extutils-makemaker + run: + - perl + + * The test section contains ``imports`` which lists the CPAN module that can be used in perl. + + .. code-block:: + + test: + imports: + - File::Which + + +The build section in the ``meta.yaml`` file should be something like this : + +.. code-block:: + + build: + number: 0 + noarch: generic + script: + - perl Makefile.PL INSTALLDIRS=vendor NO_PERLLOCAL=1 NO_PACKLIST=1 + - make + - make test + - make install VERBINST=1 + +here the line with ``Makefile.PL`` is important as it guarantees installation into the vendor section, and it also helps in non-interference with the standard files by the ``NO_PERLLOCAL`` and ``NO_PACKLIST`` switches. + +.. note:: + + ``noarch: generic`` should be used only if the package is a pure perl package. From 85b8f0c261487d5dbd559b8f273c706c354d2f77 Mon Sep 17 00:00:00 2001 From: Surbhi Sharma Date: Thu, 30 Jun 2022 16:57:01 +0530 Subject: [PATCH 2/5] Update info on perl packages. --- src/maintainer/knowledge_base.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/maintainer/knowledge_base.rst b/src/maintainer/knowledge_base.rst index 7795f78714..cf0d186865 100644 --- a/src/maintainer/knowledge_base.rst +++ b/src/maintainer/knowledge_base.rst @@ -1524,11 +1524,11 @@ Perl packages Perl has three standard install locations: **core**, **vendor**, and **site**. Here, **core** is used only for the perl itself, **vendor** is used for installing any other conda-forge packages, and **site** is used for the user to install things locally from sources other than conda-forge. -The most commonly used build system for `perl packages `__ is ``ExtUtils::MakeMaker``. For the archetypical packaging of packages of this form, you can have a look at `perl-file-which recipe `__. +The most commonly used build system for `perl packages `__ is ``ExtUtils::MakeMaker``. For typical packaging of packages of this form, you can have a look at `perl-file-which recipe `__. -A few things to note in `perl-file-which recipe `__ are: +A few things to note in the `perl-file-which recipe `__ are: - * The ``name`` is composed of ``perl-`` **+** the lower-cased version of the CPAN name. + * The ``name`` is composed of ``perl-`` **+** the lowercase version of the CPAN name. .. code-block:: @@ -1536,7 +1536,7 @@ A few things to note in `perl-file-which recipe Date: Fri, 1 Jul 2022 20:14:07 +0530 Subject: [PATCH 3/5] fix grammatical errors --- src/maintainer/knowledge_base.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maintainer/knowledge_base.rst b/src/maintainer/knowledge_base.rst index cf0d186865..da11717216 100644 --- a/src/maintainer/knowledge_base.rst +++ b/src/maintainer/knowledge_base.rst @@ -1524,7 +1524,7 @@ Perl packages Perl has three standard install locations: **core**, **vendor**, and **site**. Here, **core** is used only for the perl itself, **vendor** is used for installing any other conda-forge packages, and **site** is used for the user to install things locally from sources other than conda-forge. -The most commonly used build system for `perl packages `__ is ``ExtUtils::MakeMaker``. For typical packaging of packages of this form, you can have a look at `perl-file-which recipe `__. +The most commonly used build system for `Perl packages `__ is ``ExtUtils::MakeMaker``. For typical packaging of packages of this form, you can have a look at the `perl-file-which recipe `__. A few things to note in the `perl-file-which recipe `__ are: @@ -1549,7 +1549,7 @@ A few things to note in the `perl-file-which recipe Date: Tue, 5 Jul 2022 18:19:06 +0530 Subject: [PATCH 4/5] add info about Module::Build --- src/maintainer/knowledge_base.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/maintainer/knowledge_base.rst b/src/maintainer/knowledge_base.rst index da11717216..0553aecaa4 100644 --- a/src/maintainer/knowledge_base.rst +++ b/src/maintainer/knowledge_base.rst @@ -1571,8 +1571,12 @@ The build section in the ``meta.yaml`` file should be something like this: - make test - make install VERBINST=1 -Notable here is ``INSTALLDIRS=vendor``, which selects the appropriate install location for a conda-forge package, and the ``NO_PERLLOCAL`` and ``NO_PACKLIST`` switches, which suppress various CPAN tracking files that are unnecessary when the module is being externally packaged via conda. +Notable here is ``INSTALLDIRS=vendor``, which selects the appropriate install location for a conda-forge package, and the ``NO_PERLLOCAL`` and ``NO_PACKLIST`` switches, which suppress various CPAN tracking files (as described in the `ExtUtils::MakeMaker documentation `__) that are unnecessary when the module is being externally packaged via conda. .. note:: ``noarch: generic`` should be used only if the package is a pure Perl package. + +The other build system used for Perl packages is ``Module::Build``. ``Module::Build`` is a system for building, testing, and installing Perl modules. +It is an alternative to ``ExtUtils::MakeMaker``. It does not require a ``make`` on your system - most of the ``Module::Build`` code is pure-perl and written in a very cross-platform way. +To know more about ``Module::Build`` and difference between the two build systems read `Comparision `__ and `Module::Build `__. From f7138d24ddc06084e877f07ca08a217a1de929dd Mon Sep 17 00:00:00 2001 From: Surbhi Sharma Date: Thu, 7 Jul 2022 17:30:58 +0530 Subject: [PATCH 5/5] add examples of packages using perl-module-build --- src/maintainer/knowledge_base.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/maintainer/knowledge_base.rst b/src/maintainer/knowledge_base.rst index 0553aecaa4..d825bd2d53 100644 --- a/src/maintainer/knowledge_base.rst +++ b/src/maintainer/knowledge_base.rst @@ -1578,5 +1578,11 @@ Notable here is ``INSTALLDIRS=vendor``, which selects the appropriate install lo ``noarch: generic`` should be used only if the package is a pure Perl package. The other build system used for Perl packages is ``Module::Build``. ``Module::Build`` is a system for building, testing, and installing Perl modules. -It is an alternative to ``ExtUtils::MakeMaker``. It does not require a ``make`` on your system - most of the ``Module::Build`` code is pure-perl and written in a very cross-platform way. -To know more about ``Module::Build`` and difference between the two build systems read `Comparision `__ and `Module::Build `__. +It is an alternative to ``ExtUtils::MakeMaker``. It does not require ``make`` - most of the ``Module::Build`` code is pure Perl and written in a very cross-platform way. +The recipe of some of the Perl packages that uses ``Module::Build`` are : + + - `perl-math-derivative `__ + - `perl-graphics-colornames `__ + - `mirnature `__ + +To know more about ``Module::Build`` and difference between the two build systems read `Comparison `__ and `Module::Build `__.