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

Makefile lists optional PGPLOT as required #15

Closed
shawnlaffan opened this issue Sep 1, 2015 · 8 comments
Closed

Makefile lists optional PGPLOT as required #15

shawnlaffan opened this issue Sep 1, 2015 · 8 comments

Comments

@shawnlaffan
Copy link

From the documentation, it looks like PGPLOT is in the same basket as issue #12. i.e. it is not required but is listed as such in the makefile.

I commented out any reference to PGPLOT and PDL::Graphics::PGPLOT and it installed without issue.

Thanks,
Shawn.

(Should this be listed under pdla-stats?)

@zmughal
Copy link
Member

zmughal commented Sep 7, 2015

@mohawk2, since you know more about EUMM, what would be the best way to approach this? I know that optional deps in META files are not used directly by any tools yet. I believe the current approach used by other Perl modules is to list these in the documentation.

I see that cpanm has an experimental support for --with-recommends, --with-suggests, and --with-feature=foobar, but that is only experimental.

I feel like removing PGPLOT and PDL::Graphics::PGPLOT as strict requirements would be fine for now.

@mohawk2
Copy link
Member

mohawk2 commented Sep 7, 2015

That's what "recommends" is for. I'll have a ponder and proper look very soon.

@kmx
Copy link
Contributor

kmx commented Sep 11, 2015

Possible solution:

diff --git a/Makefile.PL b/Makefile.PL
index a6d3d4a..1bcb599 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -22,31 +22,31 @@ WriteMakefile(
       : ()),
     PREREQ_PM => {
         'PDL::Core'  => 2.008,
-        'PDL::Graphics::PGPLOT' => 0,
-        'PGPLOT' => 0,
-        'PDL::Slatec' => 0,
     },
     CONFIGURE_REQUIRES => {
         'PDL::Core'  => 2.008,
     },
     BUILD_REQUIRES => {
         'PDL::Core'  => 2.008,
-        'PDL::Graphics::PGPLOT' => 0,
-        'PGPLOT' => 0,
-        'PDL::Slatec' => 0,
     },
     TEST_REQUIRES => {
         'PDL::Core'  => 2.008,
         'Test::More' => 0,
-        'PDL::Graphics::PGPLOT' => 0,
-        'PGPLOT' => 0,
-        'PDL::Slatec' => 0,
     },
     DIR                 => ['Basic', 'Distr', 'GLM', 'Kmeans', 'GSL', 'TS'],
     dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', PREOP => 'gsl-config --version && $(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' },
     clean               => { FILES => ['PDL-Stats-*'] },
     META_MERGE          => {
       "meta-spec" => { version => 2 },
+      prereqs => {
+        runtime => {
+          recommends => {
+            'PDL::Graphics::PGPLOT' => 0,
+            'PGPLOT' => 0,
+            'PDL::Slatec' => 0,
+          },
+        },
+      },
       resources => {
         repository => {
           type => 'git',

But you should install it like this:

$ cpanm PDL::Stats --with-recommends

@zmughal
Copy link
Member

zmughal commented Sep 12, 2015

I do like the solution that @kmx has proposed. This keeps the PDL-Stats install minimal.

@mohawk2?

@zmughal
Copy link
Member

zmughal commented Sep 17, 2015

Just FYI: In the mean time, users can use:

cpanm PDL::Stats@0.70

since there are not any user-facing changes in the releases afterwards.

@mohawk2
Copy link
Member

mohawk2 commented Sep 17, 2015

Nice work, @kmx. Implemented in 92ebce8.

@mohawk2 mohawk2 closed this as completed Sep 17, 2015
@shawnlaffan
Copy link
Author

Installs cleanly for me. Thanks for fixing it.

Shawn.

@mohawk2
Copy link
Member

mohawk2 commented Sep 17, 2015

Thanks for the report!

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

No branches or pull requests

4 participants