Blame SPECS/perl-Specio.spec

329b74
# Run optional test
329b74
%if ! (0%{?rhel})
329b74
%bcond_without perl_Specio_enables_optional_test
329b74
%else
329b74
%bcond_with perl_Specio_enables_optional_test
329b74
%endif
329b74
329b74
Name:		perl-Specio
329b74
Version:	0.42
329b74
Release:	2%{?dist}
329b74
Summary:	Type constraints and coercions for Perl
329b74
License:	Artistic 2.0
329b74
URL:		http://search.cpan.org/dist/Specio/
329b74
Source0:	http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Specio-%{version}.tar.gz
329b74
BuildArch:	noarch
329b74
# Module Build
329b74
BuildRequires:	coreutils
329b74
BuildRequires:	make
329b74
BuildRequires:	perl-generators
329b74
BuildRequires:	perl-interpreter
329b74
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.76
329b74
# Module Runtime
329b74
BuildRequires:	perl(B)
329b74
BuildRequires:	perl(Carp)
329b74
BuildRequires:	perl(Devel::StackTrace)
329b74
BuildRequires:	perl(Eval::Closure)
329b74
BuildRequires:	perl(Exporter)
329b74
BuildRequires:	perl(IO::File)
329b74
BuildRequires:	perl(List::Util) >= 1.33
329b74
BuildRequires:	perl(Module::Runtime)
329b74
BuildRequires:	perl(MRO::Compat)
329b74
BuildRequires:	perl(overload)
329b74
BuildRequires:	perl(parent)
329b74
BuildRequires:	perl(re)
329b74
BuildRequires:	perl(Ref::Util) >= 0.112
329b74
BuildRequires:	perl(Role::Tiny) >= 1.003003
329b74
BuildRequires:	perl(Role::Tiny::With)
329b74
BuildRequires:	perl(Scalar::Util)
329b74
BuildRequires:	perl(Storable)
329b74
BuildRequires:	perl(strict)
329b74
BuildRequires:	perl(Sub::Quote)
329b74
BuildRequires:	perl(Sub::Util) >= 1.40
329b74
BuildRequires:	perl(Test::Fatal)
329b74
BuildRequires:	perl(Test::More) >= 0.96
329b74
BuildRequires:	perl(Try::Tiny)
329b74
BuildRequires:	perl(version) >= 0.83
329b74
BuildRequires:	perl(warnings)
329b74
# Test Suite
329b74
BuildRequires:	perl(File::Spec)
329b74
BuildRequires:	perl(lib)
329b74
BuildRequires:	perl(open)
329b74
BuildRequires:	perl(Test::Needs)
329b74
BuildRequires:	perl(utf8)
329b74
%if %{with perl_Specio_enables_optional_test}
329b74
# Optional Tests
329b74
BuildRequires:	perl(CPAN::Meta) >= 2.120900
329b74
BuildRequires:	perl(CPAN::Meta::Prereqs)
329b74
BuildRequires:	perl(Moo)
329b74
%if !%{defined perl_bootstrap}
329b74
# Break cycle: perl-Moose → perl-DateTime → perl-Specio
329b74
BuildRequires:	perl(Moose) >= 2.1207
329b74
# Break cycle: perl-Mouse → perl-Moose → perl-DateTime → perl-Specio
329b74
BuildRequires:	perl(Mouse)
329b74
%endif
329b74
BuildRequires:	perl(namespace::autoclean)
329b74
%endif
329b74
# Dependencies
329b74
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
329b74
Requires:	perl(Ref::Util) >= 0.112
329b74
Requires:	perl(Sub::Util) >= 1.40
329b74
329b74
# Avoid provides for private packages
329b74
%global __provides_exclude ^perl\\(_T::.*\\)
329b74
329b74
%description
329b74
The Specio distribution provides classes for representing type constraints
329b74
and coercion, along with syntax sugar for declaring them.
329b74
329b74
Note that this is not a proper type system for Perl. Nothing in this
329b74
distribution will magically make the Perl interpreter start checking a value's
329b74
type on assignment to a variable. In fact, there's no built-in way to apply a
329b74
type to a variable at all.
329b74
329b74
Instead, you can explicitly check a value against a type, and optionally coerce
329b74
values to that type.
329b74
329b74
%package -n perl-Test-Specio
329b74
Summary:	Test helpers for Specio
329b74
License:	Artistic 2.0
329b74
Requires:	%{name} = %{version}-%{release}
329b74
329b74
%description -n perl-Test-Specio
329b74
This package provides some helper functions and variables for testing Specio
329b74
types.
329b74
329b74
%prep
329b74
%setup -q -n Specio-%{version}
329b74
329b74
%build
329b74
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
329b74
make %{?_smp_mflags}
329b74
329b74
%install
329b74
make install DESTDIR=%{buildroot}
329b74
%{_fixperms} -c %{buildroot}
329b74
329b74
%check
329b74
make test
329b74
329b74
%files
329b74
%license LICENSE
329b74
%doc Changes CONTRIBUTING.md README.md TODO.md
329b74
%{perl_vendorlib}/Specio.pm
329b74
%{perl_vendorlib}/Specio/
329b74
%{_mandir}/man3/Specio.3*
329b74
%{_mandir}/man3/Specio::Coercion.3*
329b74
%{_mandir}/man3/Specio::Constraint::AnyCan.3*
329b74
%{_mandir}/man3/Specio::Constraint::AnyDoes.3*
329b74
%{_mandir}/man3/Specio::Constraint::AnyIsa.3*
329b74
%{_mandir}/man3/Specio::Constraint::Enum.3*
329b74
%{_mandir}/man3/Specio::Constraint::Intersection.3*
329b74
%{_mandir}/man3/Specio::Constraint::ObjectCan.3*
329b74
%{_mandir}/man3/Specio::Constraint::ObjectDoes.3*
329b74
%{_mandir}/man3/Specio::Constraint::ObjectIsa.3*
329b74
%{_mandir}/man3/Specio::Constraint::Parameterizable.3*
329b74
%{_mandir}/man3/Specio::Constraint::Parameterized.3*
329b74
%{_mandir}/man3/Specio::Constraint::Role::CanType.3*
329b74
%{_mandir}/man3/Specio::Constraint::Role::DoesType.3*
329b74
%{_mandir}/man3/Specio::Constraint::Role::Interface.3*
329b74
%{_mandir}/man3/Specio::Constraint::Role::IsaType.3*
329b74
%{_mandir}/man3/Specio::Constraint::Simple.3*
329b74
%{_mandir}/man3/Specio::Constraint::Structurable.3*
329b74
%{_mandir}/man3/Specio::Constraint::Structured.3*
329b74
%{_mandir}/man3/Specio::Constraint::Union.3*
329b74
%{_mandir}/man3/Specio::Declare.3*
329b74
%{_mandir}/man3/Specio::DeclaredAt.3*
329b74
%{_mandir}/man3/Specio::Exception.3*
329b74
%{_mandir}/man3/Specio::Exporter.3*
329b74
%{_mandir}/man3/Specio::Helpers.3*
329b74
%{_mandir}/man3/Specio::Library::Builtins.3*
329b74
%{_mandir}/man3/Specio::Library::Numeric.3*
329b74
%{_mandir}/man3/Specio::Library::Perl.3*
329b74
%{_mandir}/man3/Specio::Library::String.3*
329b74
%{_mandir}/man3/Specio::Library::Structured.3*
329b74
%{_mandir}/man3/Specio::Library::Structured::Dict.3*
329b74
%{_mandir}/man3/Specio::Library::Structured::Map.3*
329b74
%{_mandir}/man3/Specio::Library::Structured::Tuple.3*
329b74
%{_mandir}/man3/Specio::OO.3*
329b74
%{_mandir}/man3/Specio::PartialDump.3*
329b74
%{_mandir}/man3/Specio::Registry.3*
329b74
%{_mandir}/man3/Specio::Role::Inlinable.3*
329b74
%{_mandir}/man3/Specio::Subs.3*
329b74
%{_mandir}/man3/Specio::TypeChecks.3*
329b74
329b74
%files -n perl-Test-Specio
329b74
%{perl_vendorlib}/Test/
329b74
%{_mandir}/man3/Test::Specio.3*
329b74
329b74
%changelog
329b74
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-2
329b74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
329b74
329b74
* Mon Nov  6 2017 Paul Howarth <paul@city-fan.org> - 0.42-1
329b74
- Update to 0.42
329b74
  - Fixed checks for whether a class is loaded in light of upcoming
329b74
    optimization in Perl 5.28 (GH#12)
329b74
  - The Perl library claimed it provided types named LaxVersionStr and
329b74
    StrictVersionStr but they were really named LaxVersion and StrictVersion;
329b74
    the names have now been fixed to match the documentation, so they are
329b74
    LaxVersionStr and StrictVersionStr
329b74
329b74
* Fri Aug  4 2017 Paul Howarth <paul@city-fan.org> - 0.40-1
329b74
- Update to 0.40
329b74
  - Fixed more bugs with {any,object}_{can,does,isa}_type
329b74
    - When passed a glob (not a globref) they would die in their type check
329b74
    - On Perl 5.16 or earlier, passing a number to an any_* type would also die
329b74
  - Fixed subification overloading: if Sub::Quote was loaded, this would be
329b74
    used, but any environment variables needed for the closure would not be
329b74
    included, which broke enums, among other things
329b74
329b74
* Thu Aug  3 2017 Paul Howarth <paul@city-fan.org> - 0.39-1
329b74
- Update to 0.39
329b74
  - Many bug fixes and improvements to the types created by
329b74
    {any,object}_{can,does,isa}_type; in some cases, an invalid value could
329b74
    cause an exception in type check itself, and in other cases, a value that
329b74
    failed a type check would cause an exception when generating a message
329b74
    describing the failure
329b74
  - The messages describing a failure for all of these types have been improved
329b74
  - You can now create anonymous *_does and *_isa types using the exports from
329b74
    Specio::Declare
329b74
329b74
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-2
329b74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
329b74
329b74
* Sat Jul  1 2017 Paul Howarth <paul@city-fan.org> - 0.38-1
329b74
- Update to 0.38
329b74
  - Simplify checks for overloading to not call overload::Overloaded(); just
329b74
    checking the return value of overload::Method() is sufficient
329b74
329b74
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-3
329b74
- Perl 5.26 re-rebuild of bootstrapped packages
329b74
329b74
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-2
329b74
- Perl 5.26 rebuild
329b74
329b74
* Tue May  9 2017 Paul Howarth <paul@city-fan.org> - 0.37-1
329b74
- Update to 0.37
329b74
  - Possible fix for very weird failures seen under threaded Perls with some
329b74
    modules that use Specio
329b74
329b74
* Mon Feb 20 2017 Paul Howarth <paul@city-fan.org> - 0.36-1
329b74
- Update to 0.36
329b74
  - Inlined coercions would attempt to coerce for every type that matched the
329b74
    value given, instead of stopping after the first type (GH#11)
329b74
  - Inlined coercions did not include the inline environment variables needed
329b74
    by the type from which the coercion was being performed (GH#8)
329b74
  - When you use the same type repeatedly as coderef (for example, as a
329b74
    constraint with Moo), it will only generate its subified form once, rather
329b74
    than regenerating it each time it is de-referenced
329b74
  - Added an API to Specio::Subs to allow you to combine type libraries and
329b74
    helper subs in one package for exporting; see the Specio::Exporter docs for
329b74
    more detail
329b74
329b74
* Mon Feb 13 2017 Paul Howarth <paul@city-fan.org> - 0.35-1
329b74
- Update to 0.35
329b74
  - Added Specio::Subs, a module that allows you to turn one or more library's
329b74
    types into subroutines like is_Int() and to_Int()
329b74
  - Added an inline_coercion method to Specio constraints
329b74
329b74
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
329b74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
329b74
329b74
* Mon Jan 30 2017 Paul Howarth <paul@city-fan.org> - 0.34-1
329b74
- Update to 0.34
329b74
  - Packages with Specio::Exporter can now specify additional arbitrary subs to
329b74
    exporter; see the Specio::Exporter docs for details
329b74
  - Importing the same library twice in a given package would throw an
329b74
    exception; the second attempt to import is now ignored
329b74
329b74
* Wed Jan 25 2017 Paul Howarth <paul@city-fan.org> - 0.33-1
329b74
- Update to 0.33
329b74
  - Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the
329b74
    *_isa_type helpers was not correct
329b74
  - Removed the alpha warning from the docs; this is being used by enough of my
329b74
    modules on CPAN that I don't plan on doing any big breaking changes without
329b74
    a deprecation first
329b74
329b74
* Fri Jan 13 2017 Paul Howarth <paul@city-fan.org> - 0.32-1
329b74
- Update to 0.32
329b74
  - Fixed a bug in the inlining for types create by any_can_type() and
329b74
    object_can_type(); this inlining mostly worked by accident because of some
329b74
    List::Util XS magic, but this broke under the debugger (GH#6,
329b74
    https://github.com/houseabsolute/DateTime.pm/issues/49)
329b74
329b74
* Mon Nov  7 2016 Paul Howarth <paul@city-fan.org> - 0.31-1
329b74
- Update to 0.31
329b74
  - The stack trace contained by Specio::Exception objects no longer includes
329b74
    stack frames for the Specio::Exception package
329b74
  - Made the inline_environment() and description() methods public on type and
329b74
    coercion objects
329b74
329b74
* Thu Oct 20 2016 Petr Pisar <ppisar@redhat.com> - 0.30-2
329b74
- Break build cycle: perl-Moose → perl-DateTime → perl-Specio
329b74
329b74
* Sun Oct 16 2016 Paul Howarth <paul@city-fan.org> - 0.30-1
329b74
- Update to 0.30
329b74
  - Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a
329b74
    type had more than one coercion, the generated sub could end up coercing
329b74
    the value to undef some of the time and, depending on hash key ordering,
329b74
    this could end up being a heisenbug that only occurred some of the time
329b74
329b74
* Mon Oct 10 2016 Paul Howarth <paul@city-fan.org> - 0.29-1
329b74
- Update to 0.29
329b74
  - Document Specio::PartialDump because you may want to use it as part of the
329b74
    failure message generation code for a type
329b74
329b74
* Mon Oct  3 2016 Paul Howarth <paul@city-fan.org> - 0.28-1
329b74
- Update to 0.28
329b74
  - Added a Test::Specio module to provide helpers for testing Specio libraries
329b74
  - Fixed another bug with a subtype of special types and inlining
329b74
- Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal
329b74
  and Test::More in main package
329b74
329b74
* Sun Oct  2 2016 Paul Howarth <paul@city-fan.org> - 0.27-1
329b74
- Update to 0.27
329b74
  - Cloning a type with coercions defined on it would cause an exception
329b74
  - Creating a subtype of a special type created by *_isa_type, *_can_type, or
329b74
    *_does_type, or enum would die when trying to inline type constraint
329b74
  - Removed the never-documented Any type
329b74
  - Added documentation for each type in Specio::Library::Builtins
329b74
329b74
* Mon Sep 26 2016 Paul Howarth <paul@city-fan.org> - 0.26-1
329b74
- Update to 0.26
329b74
  - Require Role::Tiny 1.003003, which should fix some test failures
329b74
329b74
* Mon Sep  5 2016 Paul Howarth <paul@city-fan.org> - 0.25-1
329b74
- Update to 0.25
329b74
  - Calling {any,object}_{isa,does}_type repeatedly in a package with the same
329b74
    class or role name would die; these subs are now special-cased to simply
329b74
    return an existing type for the given name when they receive a single
329b74
    argument (the name of the class or role)
329b74
329b74
* Fri Jul  1 2016 Paul Howarth <paul@city-fan.org> - 0.24-2
329b74
- Sanitize for Fedora submission
329b74
329b74
* Fri Jul  1 2016 Paul Howarth <paul@city-fan.org> - 0.24-1
329b74
- Initial RPM version