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

making doc available on metacpan.org (GENERATED subdir) #17

Closed
wants to merge 2 commits into from
Closed

making doc available on metacpan.org (GENERATED subdir) #17

wants to merge 2 commits into from

Conversation

kmx
Copy link
Contributor

@kmx kmx commented Sep 7, 2015

The same trick as for example in PDL::LinearAlgebra https://metacpan.org/source/CHM/PDL-LinearAlgebra-0.12/Makefile.PL#L24

@zmughal
Copy link
Member

zmughal commented Sep 8, 2015

This looks good to me. @maggiexyz, @mohawk2?

@kmx, it might be helpful if make dist bailed out if it is unable to find gsl-config. That way an incomplete dist does not get uploaded by accident.


To check:

Grab the code locally:

git clone https://github.com/PDLPorters/PDL-Stats.git
git checkout -b kmx-master master
git pull https://github.com/kmx/PDL-Stats.git master

Build the dist

# Make sure that you have the GSL headers installed, e.g.
#   which gsl-config
perl Makefile.PL
make dist

Which files are generated?

tar Oxvzf PDL-Stats-0.72.tar.gz PDL-Stats-0.72/GENERATED/ 

which gives:

PDL-Stats-0.72/GENERATED/
PDL-Stats-0.72/GENERATED/PDL/
PDL-Stats-0.72/GENERATED/PDL/GSL/
PDL-Stats-0.72/GENERATED/PDL/GSL/CDF.pm

Take a look at the output:

tar Oxvzf PDL-Stats-0.72.tar.gz PDL-Stats-0.72/GENERATED/ | pod2man  | man -l -

which has all the generated CDF function docs as expected.

FUNCTIONS
   gsl_cdf_ugaussian_P
         Signature: (double x();  [o]out())

       gsl_cdf_ugaussian_P processes bad values.  It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.

   gsl_cdf_ugaussian_Pinv
         Signature: (double p();  [o]out())

       gsl_cdf_ugaussian_Pinv processes bad values.  It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles.
...

@kmx
Copy link
Contributor Author

kmx commented Sep 8, 2015

@kmx, it might be helpful if make dist bailed out if it is unable to find gsl-config. That way an incomplete dist does not get uploaded by accident.

Do you mean something like?

PREOP => 'gsl-config --version && $(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)'

I am only not sure whether it wouldn't be better to bail out during perl makefile.PL phase.

@zmughal
Copy link
Member

zmughal commented Sep 8, 2015

Yeah, that would work!

Right now GSL is an optional native dependency for users. PDL modules have lots of those so it makes things a tad bit difficult to deal with when doing things author-side.

@kmx
Copy link
Contributor Author

kmx commented Sep 11, 2015

With commit 9591aa2 missing gsl-config makes make dist fail like this:

$ make dist
rm -rf PDL-Stats-0.72
"/usr/bin/perl.exe" "-MExtUtils::Manifest=manicopy,maniread" \
        -e "manicopy(maniread(),'PDL-Stats-0.72', 'best');"
mkdir PDL-Stats-0.72
mkdir PDL-Stats-0.72/Distr
mkdir PDL-Stats-0.72/Distr/t
mkdir PDL-Stats-0.72/Kmeans
mkdir PDL-Stats-0.72/GLM
mkdir PDL-Stats-0.72/TS
mkdir PDL-Stats-0.72/t
mkdir PDL-Stats-0.72/Basic
mkdir PDL-Stats-0.72/GSL
mkdir PDL-Stats-0.72/GSL/t
mkdir PDL-Stats-0.72/xt
Generating META.yml
Generating META.json
gsl-config --version && "/usr/bin/perl.exe" -MPDL::Core::Dev -e pdlpp_mkgen PDL-Stats-0.72
/bin/sh: gsl-config: command not found
Makefile:625: recipe for target 'PDL-Stats-0.72.tar.gz' failed
make: *** [PDL-Stats-0.72.tar.gz] Error 127

@zmughal
Copy link
Member

zmughal commented Sep 12, 2015

Looks great!

@maggiexyz, @mohawk2? What do you think?

@mohawk2
Copy link
Member

mohawk2 commented Sep 17, 2015

Rebased and merged. Additionally, d0f49a6 renames the *.pp files to *.pd so pdlpp_mkgen can see them. Released as 0.73.

@mohawk2 mohawk2 closed this Sep 17, 2015
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