Commit | Line | Data |
89b5b1c5 |
1 | use inc::Module::Install 0.89; |
fe650234 |
2 | use strict; |
3 | use warnings; |
76607ac8 |
4 | use POSIX (); |
fe650234 |
5 | |
55087b99 |
6 | use 5.008001; |
ce4c07df |
7 | |
93c50889 |
8 | # ****** DO NOT ADD OPTIONAL DEPENDENCIES. EVER. --mst ****** |
9 | |
ce4c07df |
10 | name 'DBIx-Class'; |
b50d0dd3 |
11 | perl_version '5.008001'; |
8e0f16f1 |
12 | all_from 'lib/DBIx/Class.pm'; |
ce4c07df |
13 | |
3a4251e2 |
14 | |
d3523053 |
15 | test_requires 'Test::Builder' => '0.33'; |
16 | test_requires 'Test::Deep' => '0'; |
17 | test_requires 'Test::Exception' => '0'; |
18 | test_requires 'Test::More' => '0.92'; |
19 | test_requires 'Test::Warn' => '0.21'; |
ce4c07df |
20 | |
d3523053 |
21 | test_requires 'File::Temp' => '0.22'; |
4b6337d5 |
22 | |
a410299d |
23 | |
2f8a12ff |
24 | # Core |
d3523053 |
25 | requires 'List::Util' => '0'; |
26 | requires 'Scalar::Util' => '0'; |
27 | requires 'Storable' => '0'; |
ce4c07df |
28 | |
3a4251e2 |
29 | # Dependencies (keep in alphabetical order) |
d3523053 |
30 | requires 'Carp::Clan' => '6.0'; |
7a830802 |
31 | requires 'Class::Accessor::Grouped' => '0.09002'; |
d3523053 |
32 | requires 'Class::C3::Componentised' => '1.0005'; |
33 | requires 'Class::Inspector' => '1.24'; |
34 | requires 'Data::Page' => '2.00'; |
35 | requires 'DBD::SQLite' => '1.25'; |
55087b99 |
36 | requires 'DBI' => '1.609'; |
d3523053 |
37 | requires 'JSON::Any' => '1.18'; |
38 | requires 'MRO::Compat' => '0.09'; |
39 | requires 'Module::Find' => '0.06'; |
40 | requires 'Path::Class' => '0.16'; |
41 | requires 'Scope::Guard' => '0.03'; |
517f9130 |
42 | requires 'SQL::Abstract' => '1.60'; |
d3523053 |
43 | requires 'SQL::Abstract::Limit' => '0.13'; |
44 | requires 'Sub::Name' => '0.04'; |
68628159 |
45 | requires 'Data::Dumper::Concise' => '1.000'; |
82fae370 |
46 | |
a410299d |
47 | my %replication_requires = ( |
c4d78acb |
48 | 'Moose', => '0.90', |
6eca76d5 |
49 | 'MooseX::Types', => '0.21', |
d3523053 |
50 | 'namespace::clean' => '0.11', |
51 | 'Hash::Merge', => '0.11', |
a410299d |
52 | ); |
fe650234 |
53 | |
3c44586e |
54 | #************************************************************************# |
55 | # Make *ABSOLUTELY SURE* that nothing on this list is a real require, # |
56 | # since every module listed in %force_requires_if_author is deleted # |
57 | # from the final META.yml (thus will never make it as a CPAN dependency) # |
58 | #************************************************************************# |
82fae370 |
59 | my %force_requires_if_author = ( |
a410299d |
60 | %replication_requires, |
61 | |
b2b2e7fd |
62 | # when changing also adjust $DBIx::Class::Storage::DBI::minimum_sqlt_version |
3c44586e |
63 | 'SQL::Translator' => '0.11002', |
64 | |
d3523053 |
65 | # 'Module::Install::Pod::Inherit' => '0.01', |
9ac2c0f8 |
66 | |
dc4600b2 |
67 | # when changing also adjust version in t/02pod.t |
68 | 'Test::Pod' => '1.26', |
69 | |
a8064486 |
70 | # when changing also adjust version in t/06notabs.t |
c2b5c835 |
71 | # 'Test::NoTabs' => '0.9', |
a8064486 |
72 | |
0a87afc4 |
73 | # when changing also adjust version in t/07eol.t |
c2b5c835 |
74 | # 'Test::EOL' => '0.6', |
0a87afc4 |
75 | |
dc4600b2 |
76 | # when changing also adjust version in t/03podcoverage.t |
77 | 'Test::Pod::Coverage' => '1.08', |
78 | 'Pod::Coverage' => '0.20', |
79 | |
9ac2c0f8 |
80 | # CDBI-compat related |
d3523053 |
81 | 'DBIx::ContextualFetch' => '0', |
82 | 'Class::DBI::Plugin::DeepAbstractSearch' => '0', |
83 | 'Class::Trigger' => '0', |
84 | 'Time::Piece::MySQL' => '0', |
85 | 'Clone' => '0', |
86 | 'Date::Simple' => '3.03', |
9ac2c0f8 |
87 | |
88 | # t/52cycle.t |
d3523053 |
89 | 'Test::Memory::Cycle' => '0', |
90 | 'Devel::Cycle' => '1.10', |
9ac2c0f8 |
91 | |
40f75181 |
92 | # t/36datetime.t |
c96454c3 |
93 | # t/60core.t |
d3523053 |
94 | 'DateTime::Format::SQLite' => '0', |
5fc1107f |
95 | |
40f75181 |
96 | # t/96_is_deteministic_value.t |
d3523053 |
97 | 'DateTime::Format::Strptime'=> '0', |
40f75181 |
98 | |
3a4251e2 |
99 | # database-dependent reqs |
100 | # |
9d2b098e |
101 | $ENV{DBICTEST_PG_DSN} |
3a4251e2 |
102 | ? ( |
d3523053 |
103 | 'Sys::SigAction' => '0', |
104 | 'DBD::Pg' => '2.009002', |
105 | 'DateTime::Format::Pg' => '0', |
3a4251e2 |
106 | ) : () |
9d2b098e |
107 | , |
108 | |
3a4251e2 |
109 | $ENV{DBICTEST_MYSQL_DSN} |
110 | ? ( |
d3523053 |
111 | 'DateTime::Format::MySQL' => '0', |
3a4251e2 |
112 | ) : () |
113 | , |
c96454c3 |
114 | |
d0f52dd4 |
115 | $ENV{DBICTEST_ORA_DSN} |
3a4251e2 |
116 | ? ( |
d3523053 |
117 | 'DateTime::Format::Oracle' => '0', |
3a4251e2 |
118 | ) : () |
119 | , |
d867eeda |
120 | |
121 | $ENV{DBICTEST_SYBASE_DSN} |
122 | ? ( |
123 | 'DateTime::Format::Sybase' => 0, |
124 | ) : () |
125 | , |
5be953ff |
126 | grep $_, @ENV{qw/DBICTEST_SYBASE_ASA_DSN DBICTEST_SYBASE_ASA_ODBC_DSN/} |
127 | ? ( |
128 | 'DateTime::Format::Strptime' => 0, |
129 | ) : () |
130 | , |
fe650234 |
131 | ); |
3c44586e |
132 | #************************************************************************# |
4256480a |
133 | # Make ABSOLUTELY SURE that nothing on the list above is a real require, # |
3c44586e |
134 | # since every module listed in %force_requires_if_author is deleted # |
135 | # from the final META.yml (thus will never make it as a CPAN dependency) # |
136 | #************************************************************************# |
fe650234 |
137 | |
a410299d |
138 | |
139 | install_script (qw| |
140 | script/dbicadmin |
141 | |); |
142 | |
143 | tests_recursive (qw| |
144 | t |
145 | |); |
146 | |
147 | resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; |
148 | resources 'license' => 'http://dev.perl.org/licenses/'; |
1d682114 |
149 | resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/'; |
a410299d |
150 | resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class'; |
151 | |
974fe5e8 |
152 | # Deprecated/internal modules need no exposure |
153 | no_index directory => $_ for (qw| |
154 | lib/DBIx/Class/SQLAHacks |
281738a4 |
155 | lib/DBIx/Class/PK/Auto |
974fe5e8 |
156 | |); |
157 | no_index package => $_ for (qw/ |
158 | DBIx::Class::Storage::DBI::AmbiguousGlob |
159 | DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks |
160 | /); |
a410299d |
161 | |
162 | # re-build README and require extra modules for testing if we're in a checkout |
163 | |
fe650234 |
164 | if ($Module::Install::AUTHOR) { |
d7fda552 |
165 | warn <<'EOW'; |
166 | ****************************************************************************** |
167 | ****************************************************************************** |
168 | *** *** |
169 | *** AUTHOR MODE: all optional test dependencies converted to hard requires *** |
170 | *** *** |
171 | ****************************************************************************** |
172 | ****************************************************************************** |
173 | |
174 | EOW |
269228af |
175 | |
3a4251e2 |
176 | foreach my $module (sort keys %force_requires_if_author) { |
80ff5ae0 |
177 | build_requires ($module => $force_requires_if_author{$module}); |
178 | } |
269228af |
179 | |
7ff18dbd |
180 | print "Regenerating README\n"; |
80ff5ae0 |
181 | system('pod2text lib/DBIx/Class.pm > README'); |
269228af |
182 | |
7ff18dbd |
183 | if (-f 'MANIFEST') { |
184 | print "Removing MANIFEST\n"; |
185 | unlink 'MANIFEST'; |
186 | } |
044e70c7 |
187 | |
a410299d |
188 | # require Module::Install::Pod::Inherit; |
189 | # PodInherit(); |
7ff18dbd |
190 | } |
269228af |
191 | |
7ff18dbd |
192 | auto_install(); |
09d46657 |
193 | |
713cc98e |
194 | WriteAll(); |
09d46657 |
195 | |
80ff5ae0 |
196 | # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this) |
713cc98e |
197 | if ($Module::Install::AUTHOR) { |
713cc98e |
198 | |
281738a4 |
199 | Meta->{values}{build_requires} = [ grep |
80ff5ae0 |
200 | { not exists $force_requires_if_author{$_->[0]} } |
201 | ( @{Meta->{values}{build_requires}} ) |
202 | ]; |
713cc98e |
203 | |
713cc98e |
204 | Meta->write; |
09d46657 |
205 | } |