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

Add --for-packaging option. #583

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

Conversation

theory
Copy link

@theory theory commented Sep 20, 2018

This may or may not be a good idea, but thought it worth submitting a PR to get some feedback.

Used only with --local-lib-contained, --for-packaging attempts to install only runtime requirements in the local lib. All test, config, and build requirements are installed in standard site destination. The idea is to install everything in a directory that can be bundled up and distributed, minimizing the amount of unnecessary stuff to include for a purely runtime use case. The use cases I'm thinking of are Homebrew formulas, minimalist Docker images (like this, and binary installers for GUI OSes like macOS and Windows.

There are a couple of issues working againsrt this plan, however:

  • Not all distributions properly specify requirements. Older distributions,
    in particular, just list everything in the PREREQ_PM section of the
    Makefile.PL, and therefor must be assumed to be runtime. See the
    Devel-Caller Makefile.PL for an example.

  • There are bugs. I think I got most of it worked out, but when I tried to
    use it with the Sqitch ./Build bundle command (in progress), it ran into an error
    when trying to install B::Hooks::OP::Check:

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ERROR: Can't create '/B/Hooks/OP'
    mkdir /B: Permission denied at /Users/david/.plenv/versions/5.28.0/lib/perl5/5.28.0/
    
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ```
    
    Presumably I've just overlooked some additional config that needs to be overridden.
    
    

I think it's close, enough to give the idea, and might be worth revisiting or cribbing from at some point. Thoughts?

Used only with --local-lib-contained, it attempts to install only runtime
requirements in the local lib. All test, config, and build requirements are
installed in standard site destination. The idea is to install everything iun
a directory that can be bundled up and distributed, minimizing the amount of
unnecessary stuff to include for a purely runtime use case.

There are a couple of issues working againsrt this plan, however:

 *   Not all distributions properly specify requirements. Older distributions,
     in particular, just list everything in the `PREREQ_PM` section of the
     `Makefile.PL`, and therefor must be assumed to be runtime. See the
     Devel-Caller `Makefile.PL` for an example:
     https://metacpan.org/source/RCLAMP/Devel-Caller-2.06/Makefile.PL.

 *   There are bugs. I think I got most of it worked out, but when I tried to
     use it with the Sqitch `./Build bundle` command, it ran into an error
     when trying to install B::Hooks::OP::Check:

     ````
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ERROR: Can't create '/B/Hooks/OP'
     mkdir /B: Permission denied at /Users/david/.plenv/versions/5.28.0/lib/perl5/5.28.0/

     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ```

     Presumably I've just overlooked some config that needs to be overridden.

 I think it's close, enough to give the idea, and might be worth revisiting or
 cribbing from at some point.
@skaji
Copy link
Sponsor Contributor

skaji commented Sep 21, 2018

I think you might want to check carmel.

@theory
Copy link
Author

theory commented Sep 22, 2018

Thanks @skaji, Carmel looks useful, I'll keep an eye on it.

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

2 participants