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

PathTools: test descriptions; makefile updates; etc. #16414

Closed
p5pRT opened this issue Feb 11, 2018 · 11 comments
Closed

PathTools: test descriptions; makefile updates; etc. #16414

p5pRT opened this issue Feb 11, 2018 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 11, 2018

Migrated from rt.perl.org#132853 (status was 'resolved')

Searchable as RT132853$

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2018

From @jkeenan

PathTools falls under dist/, so it's "blead-upstream." It hasn't had a
new CPAN release in a while. In anticipation of that, here are some
patches which add test description, bring its Makefile.PL more
up-to-date with CPAN metadata standards and add a .gitignore.

Please review. It would be nice if we could merge these into blead
before the next release, currently scheduled for Feb. 20.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2018

From @jkeenan

0001-Provide-.gitignore-for-PathTools-distribution.patch
From 01fdf3bd78f424bd4622ad0f77dc30bcbcafa53e Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sun, 11 Feb 2018 11:36:45 -0500
Subject: [PATCH 1/3] Provide .gitignore for PathTools distribution.

---
 dist/PathTools/.gitignore | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 dist/PathTools/.gitignore

diff --git a/dist/PathTools/.gitignore b/dist/PathTools/.gitignore
new file mode 100644
index 0000000..a87d516
--- /dev/null
+++ b/dist/PathTools/.gitignore
@@ -0,0 +1,2 @@
+/Cwd.c
+/Cwd.bs
-- 
2.7.4

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2018

From @jkeenan

0002-Ensure-that-all-tests-in-t-cwd.t-have-descriptions.patch
From 346aca5cf3d5ac5b7829bba94ba0ce5cbd1d3626 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sun, 11 Feb 2018 11:44:21 -0500
Subject: [PATCH 2/3] Ensure that all tests in t/cwd.t have descriptions.

---
 dist/PathTools/t/cwd.t | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dist/PathTools/t/cwd.t b/dist/PathTools/t/cwd.t
index 8cf3586..483b437 100644
--- a/dist/PathTools/t/cwd.t
+++ b/dist/PathTools/t/cwd.t
@@ -145,7 +145,7 @@ Cwd::chdir $Test_Dir;
 
 foreach my $func (qw(cwd getcwd fastcwd fastgetcwd)) {
   my $result = eval "$func()";
-  is $@, '';
+  is $@, '', "No exception for ${func}() in string eval";
   dir_ends_with( $result, $Test_Dir, "$func()" );
 }
 
@@ -171,7 +171,7 @@ rmtree($test_dirs[0], 0, 0);
   my $check = ($vms_mode ? qr|\b((?i)t)\]$| :
 			   qr|\bt$| );
   
-  like($ENV{PWD}, $check);
+  like($ENV{PWD}, $check, "We're in a 't' directory");
 }
 
 {
@@ -179,7 +179,7 @@ rmtree($test_dirs[0], 0, 0);
   my $start_pwd = $ENV{PWD};
   mkpath([$Test_Dir], 0, 0777);
   Cwd::abs_path($Test_Dir);
-  is $ENV{PWD}, $start_pwd;
+  is $ENV{PWD}, $start_pwd, "abs_path() does not trample \$ENV{PWD}";
   rmtree($test_dirs[0], 0, 0);
 }
 
@@ -192,6 +192,7 @@ SKIP: {
 
     my $abs_path      =  Cwd::abs_path($file);
     my $fast_abs_path =  Cwd::fast_abs_path($file);
+    my $pas           =  Cwd::_perl_abs_path($file);
     my $want          =  quotemeta(
                            File::Spec->rel2abs( $Test_Dir )
                          );
@@ -205,9 +206,9 @@ SKIP: {
        $want = quotemeta($want);
     }
 
-    like($abs_path,      qr|$want$|i);
-    like($fast_abs_path, qr|$want$|i);
-    like(Cwd::_perl_abs_path($file), qr|$want$|i) if $EXTRA_ABSPATH_TESTS;
+    like($abs_path,      qr|$want$|i, "Cwd::abs_path produced $abs_path");
+    like($fast_abs_path, qr|$want$|i, "Cwd::fast_abs_path produced $fast_abs_path");
+    like($pas,           qr|$want$|i, "Cwd::_perl_abs_path produced $pas") if $EXTRA_ABSPATH_TESTS;
 
     rmtree($test_dirs[0], 0, 0);
     1 while unlink $file;
-- 
2.7.4

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2018

From @jkeenan

0003-Add-ABSTRACT-LICENSE-AUTHOR-etc.-elements.patch
From 9c5d14be6d25b04fac0a946edd23f70ee8b6f563 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sun, 11 Feb 2018 11:49:19 -0500
Subject: [PATCH 3/3] Add ABSTRACT, LICENSE, AUTHOR, etc. elements.

Add them conditionally so that CPAN PathTools can accommodate different
versions of ExtUtils::MakeMaker and CPAN metadata protocols.

Styled after Module-CoreList's Makefile.PL for better readability.
---
 dist/PathTools/Makefile.PL | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 71b9a60..11e04af 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@@ -9,11 +9,26 @@ BEGIN { @INC = grep { $_ ne "blib/arch" and $_ ne "blib/lib" } @INC }
 
 require 5.005;
 use ExtUtils::MakeMaker;
+
+my @extra;
+push @extra, 'LICENSE' => 'perl_5'
+    unless $ExtUtils::MakeMaker::VERSION < 6.31;
+push @extra, 'META_MERGE' => {
+        resources => {
+            repository  => 'git://perl5.git.perl.org/perl.git',
+            bugtracker  => 'https://rt.perl.org/rt3/',
+            homepage    => "http://dev.perl.org/",
+            license     => [ 'http://dev.perl.org/licenses/' ],
+        },
+    } unless $ExtUtils::MakeMaker::VERSION < 6.46;
+
 WriteMakefile
 (
           'DISTNAME' => 'PathTools',
           'NAME' => 'Cwd',
           'VERSION_FROM' => 'Cwd.pm',
+          'ABSTRACT' => 'Tools for working with directory and file names',
+          'AUTHOR' => 'Perl 5 Porters',
           'DEFINE' => join(" ",
                 "-DDOUBLE_SLASHES_SPECIAL=@{[$^O eq q(qnx) || $^O eq q(nto) ? 1 : 0]}",
                 ((grep { $_ eq 'PERL_CORE=1' } @ARGV) ? '-DNO_PPPORT_H' : ()),
@@ -27,6 +42,7 @@ WriteMakefile
                          },
           ($] > 5.011) ? () : ( INSTALLDIRS => 'perl' ), # CPAN sourced versions should now install to site
           'EXE_FILES' => [],
-          'PL_FILES' => {}
+          'PL_FILES' => {},
+          @extra,
         )
 ;
-- 
2.7.4

@p5pRT
Copy link
Author

p5pRT commented Feb 11, 2018

From @jkeenan

Summary of my perl5 (revision 5 version 27 subversion 9) configuration​:
  Commit id​: 9c5d14b
  Platform​:
  osname=linux
  osvers=4.4.0-112-generic
  archname=x86_64-linux
  uname='linux zareason 4.4.0-112-generic #135-ubuntu smp fri jan 19 11​:48​:36 utc 2018 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='5.4.1 20160904'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
  libs=-lpthread -lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.23.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.23'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  PERL_USE_DEVEL
  USE_64_BIT_ALL
  USE_64_BIT_INT
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_PERLIO
  USE_PERL_ATOF
  Built under linux
  Compiled at Feb 11 2018 11​:52​:54
  %ENV​:
  PERL2DIR="/home/jkeenan/gitwork/perl2"
  PERLBREW_BASHRC_VERSION="0.78"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.26.0/bin"
  PERLBREW_PERL="perl-5.26.0"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_VERSION="0.78"
  PERL_WORKDIR="/home/jkeenan/gitwork/perl"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.27.9/x86_64-linux
  /usr/local/lib/perl5/site_perl/5.27.9
  /usr/local/lib/perl5/5.27.9/x86_64-linux
  /usr/local/lib/perl5/5.27.9

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2018

From @jkeenan

On Sun, 11 Feb 2018 17​:09​:55 GMT, jkeenan@​pobox.com wrote​:

PathTools falls under dist/, so it's "blead-upstream." It hasn't had a
new CPAN release in a while. In anticipation of that, here are some
patches which add test description, bring its Makefile.PL more
up-to-date with CPAN metadata standards and add a .gitignore.

Please review. It would be nice if we could merge these into blead
before the next release, currently scheduled for Feb. 20.

Hearing no objection, I merged these into blead. In reverse order​:

#####
commit 1e88896
Author​: James E Keenan <jkeenan@​cpan.org>

  Add ABSTRACT, LICENSE, AUTHOR, etc. elements.

commit fb686fb
Author​: James E Keenan <jkeenan@​cpan.org>

  Ensure that all tests in t/cwd.t have descriptions.

commit 5f3e133
Author​: James E Keenan <jkeenan@​cpan.org>

  Provide .gitignore for PathTools distribution.
#####

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2018

@jkeenan - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented Feb 17, 2018

From @xsawyerx

On 02/17/2018 05​:54 PM, James E Keenan via RT wrote​:

On Sun, 11 Feb 2018 17​:09​:55 GMT, jkeenan@​pobox.com wrote​:

PathTools falls under dist/, so it's "blead-upstream." It hasn't had a
new CPAN release in a while. In anticipation of that, here are some
patches which add test description, bring its Makefile.PL more
up-to-date with CPAN metadata standards and add a .gitignore.

Please review. It would be nice if we could merge these into blead
before the next release, currently scheduled for Feb. 20.

Hearing no objection, I merged these into blead. In reverse order​:

I'll be working on a new release.

@p5pRT
Copy link
Author

p5pRT commented Feb 28, 2018

From @xsawyerx

On Sat, 17 Feb 2018 09​:51​:12 -0800, xsawyerx@​gmail.com wrote​:

On 02/17/2018 05​:54 PM, James E Keenan via RT wrote​:

On Sun, 11 Feb 2018 17​:09​:55 GMT, jkeenan@​pobox.com wrote​:

PathTools falls under dist/, so it's "blead-upstream." It hasn't had a
new CPAN release in a while. In anticipation of that, here are some
patches which add test description, bring its Makefile.PL more
up-to-date with CPAN metadata standards and add a .gitignore.

Please review. It would be nice if we could merge these into blead
before the next release, currently scheduled for Feb. 20.

Hearing no objection, I merged these into blead. In reverse order​:

I'll be working on a new release.

I've released a new version and it's also available in 5.27.9.

@p5pRT
Copy link
Author

p5pRT commented Feb 28, 2018

@xsawyerx - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant