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

PDL core only update #140

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
180 changes: 0 additions & 180 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,187 +120,7 @@ Basic/Ufunc/Ufunc.xs
Demos/BAD2_demo.pm
Demos/BAD_demo.pm
Doc/Doc/Config.pm
Graphics/IIS/IIS.c
Graphics/IIS/IIS.pm
Graphics/IIS/IIS.xs
Graphics/PGPLOT/Window/Window.c
Graphics/TriD/OpenGL/OpenGL.c
Graphics/TriD/OpenGL/OpenGL.pm
Graphics/TriD/OpenGL/OpenGL.xs
Graphics/TriD/OpenGL/X.h.cpp
Graphics/TriD/OpenGL/gl.h.cpp
Graphics/TriD/OpenGL/glu.h.cpp
Graphics/TriD/OpenGL/glx.h.cpp
Graphics/TriD/OpenGL/glxtokens.h.cpp
Graphics/TriD/OpenGL/typemap
Graphics/TriD/OpenGLQ/OpenGLQ.c
Graphics/TriD/OpenGLQ/OpenGLQ.pm
Graphics/TriD/OpenGLQ/OpenGLQ.xs
Graphics/TriD/Rout/Rout.c
Graphics/TriD/Rout/Rout.pm
Graphics/TriD/Rout/Rout.xs
IO/Browser/Browser.c
IO/Browser/Browser.pm
IO/Browser/Browser.xs
IO/GD/GD.c
IO/GD/GD.pm
IO/GD/GD.xs
IO/HDF/SD/SD.c
IO/HDF/SD/SD.pm
IO/HDF/SD/SD.xs
IO/HDF/VS/VS.c
IO/HDF/VS/VS.pm
IO/HDF/VS/VS.xs
IO/Misc/Misc.c
IO/Misc/Misc.pm
IO/Misc/Misc.xs
IO/NDF/NDF.pm
IO/Pnm/Pnm.c
IO/Pnm/Pnm.pm
IO/Pnm/Pnm.xs
IO/Storable/Storable.c
IO/Storable/Storable.pm
IO/Storable/Storable.xs
Lib/CallExt/CallExt.c
Lib/Compression/Compression.c
Lib/Compression/Compression.pm
Lib/Compression/Compression.xs
Lib/FFT/FFT.c
Lib/FFT/FFT.pm
Lib/FFT/FFT.xs
Lib/Fit/Gaussian/Gaussian.c
Lib/Fit/Gaussian/Gaussian.pm
Lib/Fit/Gaussian/Gaussian.xs
Lib/GIS/Proj/Proj.c
Lib/GIS/Proj/Proj.pm
Lib/GIS/Proj/Proj.xs
Lib/GSL/DIFF/DIFF.c
Lib/GSL/DIFF/DIFF.pm
Lib/GSL/DIFF/DIFF.xs
Lib/GSL/INTEG/INTEG.c
Lib/GSL/INTEG/INTEG.pm
Lib/GSL/INTEG/INTEG.xs
Lib/GSL/INTERP/INTERP.c
Lib/GSL/INTERP/INTERP.pm
Lib/GSL/INTERP/INTERP.xs
Lib/GSL/MROOT/MROOT.c
Lib/GSL/MROOT/MROOT.pm
Lib/GSL/MROOT/MROOT.xs
Lib/GSL/RNG/RNG.c
Lib/GSL/RNG/RNG.pm
Lib/GSL/RNG/RNG.xs
Lib/GSL/SF/airy/AIRY.c
Lib/GSL/SF/airy/AIRY.pm
Lib/GSL/SF/airy/AIRY.xs
Lib/GSL/SF/bessel/BESSEL.c
Lib/GSL/SF/bessel/BESSEL.pm
Lib/GSL/SF/bessel/BESSEL.xs
Lib/GSL/SF/clausen/CLAUSEN.c
Lib/GSL/SF/clausen/CLAUSEN.pm
Lib/GSL/SF/clausen/CLAUSEN.xs
Lib/GSL/SF/coulomb/COULOMB.c
Lib/GSL/SF/coulomb/COULOMB.pm
Lib/GSL/SF/coulomb/COULOMB.xs
Lib/GSL/SF/coupling/COUPLING.c
Lib/GSL/SF/coupling/COUPLING.pm
Lib/GSL/SF/coupling/COUPLING.xs
Lib/GSL/SF/dawson/DAWSON.c
Lib/GSL/SF/dawson/DAWSON.pm
Lib/GSL/SF/dawson/DAWSON.xs
Lib/GSL/SF/debye/DEBYE.c
Lib/GSL/SF/debye/DEBYE.pm
Lib/GSL/SF/debye/DEBYE.xs
Lib/GSL/SF/dilog/DILOG.c
Lib/GSL/SF/dilog/DILOG.pm
Lib/GSL/SF/dilog/DILOG.xs
Lib/GSL/SF/elementary/ELEMENTARY.c
Lib/GSL/SF/elementary/ELEMENTARY.pm
Lib/GSL/SF/elementary/ELEMENTARY.xs
Lib/GSL/SF/ellint/ELLINT.c
Lib/GSL/SF/ellint/ELLINT.pm
Lib/GSL/SF/ellint/ELLINT.xs
Lib/GSL/SF/elljac/ELLJAC.c
Lib/GSL/SF/elljac/ELLJAC.pm
Lib/GSL/SF/elljac/ELLJAC.xs
Lib/GSL/SF/erf/ERF.c
Lib/GSL/SF/erf/ERF.pm
Lib/GSL/SF/erf/ERF.xs
Lib/GSL/SF/exp/EXP.c
Lib/GSL/SF/exp/EXP.pm
Lib/GSL/SF/exp/EXP.xs
Lib/GSL/SF/expint/EXPINT.c
Lib/GSL/SF/expint/EXPINT.pm
Lib/GSL/SF/expint/EXPINT.xs
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.c
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.pm
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.xs
Lib/GSL/SF/gamma/GAMMA.c
Lib/GSL/SF/gamma/GAMMA.pm
Lib/GSL/SF/gamma/GAMMA.xs
Lib/GSL/SF/gegenbauer/GEGENBAUER.c
Lib/GSL/SF/gegenbauer/GEGENBAUER.pm
Lib/GSL/SF/gegenbauer/GEGENBAUER.xs
Lib/GSL/SF/hyperg/HYPERG.c
Lib/GSL/SF/hyperg/HYPERG.pm
Lib/GSL/SF/hyperg/HYPERG.xs
Lib/GSL/SF/laguerre/LAGUERRE.c
Lib/GSL/SF/laguerre/LAGUERRE.pm
Lib/GSL/SF/laguerre/LAGUERRE.xs
Lib/GSL/SF/legendre/LEGENDRE.c
Lib/GSL/SF/legendre/LEGENDRE.pm
Lib/GSL/SF/legendre/LEGENDRE.xs
Lib/GSL/SF/log/LOG.c
Lib/GSL/SF/log/LOG.pm
Lib/GSL/SF/log/LOG.xs
Lib/GSL/SF/poly/POLY.c
Lib/GSL/SF/poly/POLY.pm
Lib/GSL/SF/poly/POLY.xs
Lib/GSL/SF/pow_int/POW_INT.c
Lib/GSL/SF/pow_int/POW_INT.pm
Lib/GSL/SF/pow_int/POW_INT.xs
Lib/GSL/SF/psi/PSI.c
Lib/GSL/SF/psi/PSI.pm
Lib/GSL/SF/psi/PSI.xs
Lib/GSL/SF/synchrotron/SYNCHROTRON.c
Lib/GSL/SF/synchrotron/SYNCHROTRON.pm
Lib/GSL/SF/synchrotron/SYNCHROTRON.xs
Lib/GSL/SF/transport/TRANSPORT.c
Lib/GSL/SF/transport/TRANSPORT.pm
Lib/GSL/SF/transport/TRANSPORT.xs
Lib/GSL/SF/trig/TRIG.c
Lib/GSL/SF/trig/TRIG.pm
Lib/GSL/SF/trig/TRIG.xs
Lib/GSL/SF/zeta/ZETA.c
Lib/GSL/SF/zeta/ZETA.pm
Lib/GSL/SF/zeta/ZETA.xs
Lib/Image2D/Image2D.c
Lib/Image2D/Image2D.pm
Lib/Image2D/Image2D.xs
Lib/ImageND/ImageND.c
Lib/ImageND/ImageND.pm
Lib/ImageND/ImageND.xs
Lib/ImageRGB/ImageRGB.c
Lib/ImageRGB/ImageRGB.pm
Lib/ImageRGB/ImageRGB.xs
Lib/Minuit/Minuit.c
Lib/Minuit/Minuit.pm
Lib/Minuit/Minuit.xs
Lib/Minuit/minuitlib/libminuit.a
Lib/Slatec/Slatec.c
Lib/Slatec/Slatec.pm
Lib/Slatec/Slatec.xs
Lib/Slatec/SlatecProtos.h
Lib/Slatec/f77_underscore
Lib/Transform/Cartography/earth_day.ppm
Lib/Transform/Cartography/earth_night.ppm
Lib/Transform/Proj4/Proj4.c
Lib/Transform/Proj4/Proj4.pm
Lib/Transform/Proj4/Proj4.xs
Lib/Transform/Transform.c
Lib/Transform/Transform.pm
Lib/Transform/Transform.xs
MANIFEST.bak
Perldl2/pdl2.pod
_Inline/
gsl.pl
pdl
Expand Down
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ matrix:
env: PDL_WITH_BADVAL=1 PDL_BADVAL_USENAN=1 PDL_BADVAL_PER_PDL=0
- perl: "5.20"
env: PDL_WITH_BADVAL=1 PDL_BADVAL_USENAN=1 PDL_BADVAL_PER_PDL=1
- perl: "5.20"
env: DISABLE_FORTRAN=1 # what if we don't have Fortran installed?
- perl: "5.20"
env: CC="clang" # use `clang` instead of `gcc` default
allow_failures:
Expand All @@ -71,7 +69,6 @@ before_install:
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- cpanm --quiet --notest ExtUtils::F77 Term::ReadLine::Gnu PGPLOT # do not need tests
- cpanm --quiet --notest Devel::CheckLib # specify this now because this is a CONFIGURE_REQUIRES for author-side
- if [ "$AUTHOR_TESTING" == 1 ]; then cpanm --quiet --notest CPAN::Changes; fi # for author tests (AUTHOR_TESTING is set to true by default by init)
- cpanm --notest --verbose ExtUtils::ParseXS # we install the latest ExtUtils::ParseXS
Expand Down
62 changes: 1 addition & 61 deletions Basic/Core/Dev.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ PDL development and is often used from within Makefile.PL's.

package PDL::Core::Dev;

use File::Path;
use File::Basename;
use ExtUtils::Manifest;
use English; require Exporter;

@ISA = qw( Exporter );
Expand All @@ -34,7 +31,7 @@ use English; require Exporter;
pdlpp_postamble_int pdlpp_stdargs_int
pdlpp_postamble pdlpp_stdargs write_dummy_make
unsupported getcyglib trylink
pdlpp_mkgen
pdlpp_genpm
);

# Installation locations
Expand Down Expand Up @@ -472,67 +469,10 @@ sub pdlpp_stdargs {
'INC' => &PDL_INST_INCLUDE()." $inc",
'LIBS' => $libs ? ["$libs "] : [],
'clean' => {'FILES' => "$pref.xs $pref.pm $pref\$(OBJ_EXT) $pref.c"},
'dist' => {'PREOP' => '$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' },
(eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
);
}

# pdlpp_mkgen($dir)
# - scans $dir/MANIFEST for all *.pd files and creates corresponding *.pm files
# in $dir/GENERATED/ subdir; needed for proper doc rendering at metacpan.org
# - it is used in Makefile.PL like:
# dist => { PREOP=>'$(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' }
# so all the magic *.pm generation happens during "make dist"
# - it is intended to be called as a one-liner:
# perl -MPDL::Core::Dev -e pdlpp_mkgen DirName
#
sub pdlpp_mkgen {
my $dir = @_ > 0 ? $_[0] : $ARGV[0];
die "pdlpp_mkgen: unspecified directory" unless defined $dir && -d $dir;
my $file = "$dir/MANIFEST";
die "pdlpp_mkgen: non-existing '$dir/MANIFEST'" unless -f $file;

my @pairs = ();
my $manifest = ExtUtils::Manifest::maniread($file);
for (keys %$manifest) {
next if $_ !~ m/\.pd$/; # skip non-pd files
next if $_ =~ m/^(t|xt)\//; # skip *.pd files in test subdirs
next unless -f $_;
my $content = do { local $/; open my $in, '<', $_; <$in> };
if ($content =~ /=head1\s+NAME\s+(\S+)\s+/sg) {
push @pairs, [$_, $1];
}
else {
warn "pdlpp_mkgen: unknown module name for '$_' (use proper '=head1 NAME' section)\n";
}
}

my %added = ();
for (@pairs) {
my ($pd, $mod) = @$_;
(my $prefix = $mod) =~ s|::|/|g;
my $manifestpm = "GENERATED/$prefix.pm";
$prefix = "$dir/GENERATED/$prefix";
File::Path::mkpath(dirname($prefix));
#there is no way to use PDL::PP from perl code, thus calling via system()
my @in = map { "-I$_" } @INC, 'inc';
my $rv = system($^X, @in, "-MPDL::PP qw[$mod $mod $prefix]", $pd);
if ($rv == 0 && -f "$prefix.pm") {
$added{$manifestpm} = "mod=$mod pd=$pd (added by pdlpp_mkgen)";
unlink "$prefix.xs"; #we need only .pm
}
else {
warn "pdlpp_mkgen: cannot convert '$pd'\n";
}
}

if (scalar(keys %added) > 0) {
#maniadd works only with this global variable
local $ExtUtils::Manifest::MANIFEST = $file;
ExtUtils::Manifest::maniadd(\%added);
}
}

sub unsupported {
my ($package,$os) = @_;
"No support for $package on $os platform yet. Will skip build process";
Expand Down
11 changes: 1 addition & 10 deletions Basic/PDL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Some notes:

=over 5

=item Modules loaded by default
=item SYNOPSIS

See the SYNOPSIS section at the end of this document for a list of
modules loaded by default.
Expand Down Expand Up @@ -137,9 +137,6 @@ start-up modules.
use PDL::MatrixOps;
use PDL::Math;
use PDL::Version;
use PDL::IO::Misc;
use PDL::IO::FITS;
use PDL::IO::Pic;
use PDL::Lvalue;

=cut
Expand Down Expand Up @@ -170,12 +167,6 @@ use PDL::Math;
use PDL::MatrixOps;
use PDL::Lvalue;

# Load these for TPJ compatibility

use PDL::IO::Misc; # Misc IO (Ascii)
use PDL::IO::FITS; # FITS IO (rfits/wfits; used by rpic/wpic too)
use PDL::IO::Pic; # rpic/wpic

# Load this so config/install info is available

use PDL::Config;
Expand Down
Loading