pax_global_header00006660000000000000000000000064117417604600014520gustar00rootroot0000000000000052 comment=04dc269720e5435136af6b09e5f3170a6a522c61 repocop-unittest-altlinux-python-0.10/000075500000000000000000000000001174176046000201375ustar00rootroot00000000000000repocop-unittest-altlinux-python-0.10/.gear/000075500000000000000000000000001174176046000211335ustar00rootroot00000000000000repocop-unittest-altlinux-python-0.10/.gear/rules000064400000000000000000000000071174176046000222050ustar00rootroot00000000000000tar: . repocop-unittest-altlinux-python-0.10/altlinux-python-obsolete-buildreq-python-dev.pl000064400000000000000000000005461174176046000313720ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { ## $spec is RPM::Source::Editor object. ## $sec(tion) is RPM::Source::SpecSection object. my ($spec, $pkgname) = @_; foreach my $section ($spec->get_sections()) { next if $section->get_type() ne 'package'; $section->subst_if(qr/python-dev(?=$|\s)/,'python-devel',qr'equires:|PreReq:'); } }; 1; repocop-unittest-altlinux-python-0.10/altlinux-python-obsolete-buildreq-python-dev.posttest000064400000000000000000000011561174176046000326420ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <get_sections()) { next if $section->get_type() ne 'package'; $section->exclude(qr/^Requires: python = \%__python_version\s*$/); } }; 1; repocop-unittest-altlinux-python-0.10/altlinux-python-obsolete-requires-python-version.posttest000064400000000000000000000006571174176046000336060ustar00rootroot00000000000000#!/bin/sh pushd "$REPOCOP_STATEDIR/specfile" >/dev/null for i in `pcregrep -rl '^Requires:.*\s+python\s*=\s*%__python_version' .` ; do case $i in # *some*) : # some ? # ;; *) key=`echo $i | sed -e 's,^./,,' | sed -e 's,\.spec$,,'` repocop-test-warn -k $key "Requires: python = %__python_version is deprecated according to Python Policy (http://www.altlinux.org/Python_Policy)." ;; esac done popd >/dev/null repocop-unittest-altlinux-python-0.10/altlinux-python-test-is-packaged.posttest000064400000000000000000000054531174176046000302570ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" < 16384 AND filename glob '*/python[0-9].[0-9]*/[Tt]est*/test_*'; DELETE FROM pytest WHERE pkgid GLOB '*-test-*' OR pkgid GLOB '*-tests-*' OR pkgid GLOB '*-devel-*' OR pkgid GLOB '*.test-*' OR pkgid GLOB '*.tests-*' OR pkgid GLOB '*-examples-*' OR pkgid GLOB '*-testing-*' OR pkgid GLOB '*-pickles-*'; DELETE FROM pytest WHERE pkgid GLOB '*.test*' OR pkgid GLOB '*.pytest*'; -- python3-module-testtools DELETE FROM pytest WHERE pkgid GLOB '*-testtools-*'; -- known pure developr's modules DELETE FROM pytest WHERE pkgid GLOB 'python-module-PyDSTool-*' OR pkgid GLOB 'python-module-ETSDevTools-*' OR pkgid GLOB 'python-module-petsc-config-*' OR pkgid GLOB 'python-module-test*' OR pkgid GLOB 'python-module-*-autotest*'; INSERT INTO pyexample SELECT pkgid, filename FROM rpm_files WHERE filemode & 61440 <> 16384 AND filename glob '*/python[0-9].[0-9]*/example*/*'; DELETE FROM pyexample WHERE pkgid GLOB '*-examples-*' OR pkgid GLOB '*-doc-*' OR pkgid GLOB '*-docs-*' OR pkgid GLOB '*-pickles-*' OR pkgid GLOB '*-test-*' OR pkgid GLOB '*-tests-*' OR pkgid GLOB '*.tests-*' OR pkgid GLOB '*-testing-*'; DELETE FROM pyexample WHERE pkgid GLOB '*.test*' OR pkgid GLOB '*.pytest*'; -- known pure developr's modules DELETE FROM pyexample WHERE pkgid GLOB 'python-module-PyDSTool-*' OR pkgid GLOB 'python-module-ETSDevTools-*' OR pkgid GLOB 'python-module-petsc-config-*' OR pkgid GLOB 'python-module-test*' OR pkgid GLOB 'python-module-*-autotest*'; .output $REPOCOP_TEST_TMPDIR/msg SELECT pkgid, filename FROM pytest; .output $REPOCOP_TEST_TMPDIR/msg2 SELECT pkgid, filename FROM pyexample; EOSQL cat > $REPOCOP_TEST_TMPDIR/repocop.awk <<'EOF' BEGIN {FS="\t"} // {system("repocop-test-info -k " $1 " '" $2 ": It is the file in the package whose name matches the format python modules use for test files. It may have been installed by accident. Remove it or move it to the -devel subpackage, if the test is required to build other packages. See http://www.altlinux.org/Python_Policy for details.'")} EOF cat $REPOCOP_TEST_TMPDIR/msg | awk -f $REPOCOP_TEST_TMPDIR/repocop.awk cat > $REPOCOP_TEST_TMPDIR/repocop.awk <<'EOF' BEGIN {FS="\t"} // {system("repocop-test-experimental -k " $1 " '" $2 ": It is the file in the package whose location matches the format python modules use for examples. It may have been installed by accident. Move it to the -examples or -doc subpackage. See http://www.altlinux.org/Python_Policy for details.'")} EOF cat $REPOCOP_TEST_TMPDIR/msg2 | awk -f $REPOCOP_TEST_TMPDIR/repocop.awk rm $REPOCOP_TEST_TMPDIR/* repocop-unittest-altlinux-python-0.10/repocop-unittest-altlinux-python.spec000064400000000000000000000064441174176046000275240ustar00rootroot00000000000000#define testname spec-has-obsolete-macroses %define install_all_tests 0 Name: repocop-unittest-altlinux-python Version: 0.10 Release: alt2 BuildArch: noarch Packager: Igor Yu. Vlasenko Url: http://repocop.altlinux.org Summary: repocop package checks for conformance with Python Packaging Policy. Group: Development/Other License: GPL or Artistic Source: %name-%version.tar Requires: repocop >= 0.10 Requires: repocop-collector-specfile %description set of ALTLinux-specific integration tests for repocop test platform. The tests checks packages for conformance with Python Packaging Policy. %prep %setup %build %install %if %install_all_tests for i in *.posttest; do testname=`echo $i | sed -e s,.posttest\$,,` install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest done install -d -m 755 %buildroot%_datadir/repocop/fixscripts/ install -m 644 *.pl %buildroot%_datadir/repocop/fixscripts/ %else testname=altlinux-python-test-is-packaged install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest %endif %files #doc README ChangeLog %_datadir/repocop/pkgtests/* %if %install_all_tests %_datadir/repocop/fixscripts/* %endif %changelog * Fri Apr 13 2012 Igor Vlasenko 0.10-alt2 - test exception for python3-module-testtools (requested by REAL@) * Sun Jun 12 2011 Igor Vlasenko 0.10-alt1 - test exceptions (requested by REAL@). * Sat Nov 20 2010 Igor Vlasenko 0.09-alt3 - check for Test (requested by REAL@). * Tue Sep 14 2010 Igor Vlasenko 0.09-alt2 - autotest exception (requested by REAL@). * Wed Apr 14 2010 Igor Vlasenko 0.09-alt1 - extra python-module-petsc-config exception (requested by REAL@). * Mon Mar 08 2010 Igor Vlasenko 0.08-alt1 - test level increased to info (requested by REAL@). * Sat Mar 06 2010 Igor Vlasenko 0.07-alt2 - added python-module-petsc-config exception (requested by REAL@). * Sun Jan 24 2010 Igor Vlasenko 0.07-alt1 - added -testing exception (requested by REAL@). * Thu Jan 21 2010 Igor Vlasenko 0.06-alt6 - added tests/examples exception (requested by REAL@). * Fri Jan 08 2010 Igor Vlasenko 0.06-alt5 - added .tests exception (requested by REAL@). * Wed Jan 06 2010 Igor Vlasenko 0.06-alt4 - fixed summary thanks to lav@ and REAL@. * Thu Nov 26 2009 Igor Vlasenko 0.06-alt3 - added exceptions to test-is-packaged test * Tue Nov 24 2009 Igor Vlasenko 0.06-alt2 - added exceptions to test-is-packaged test * Tue Nov 24 2009 Igor Vlasenko 0.06-alt1 - altlinux-python-test-is-packaged changes suggested by REAL@ * Sat Nov 21 2009 Igor Vlasenko 0.05-alt1 - added altlinux-python-test-is-packaged - all other tests are disabled (no policy is written yet). * Wed Sep 30 2009 Igor Vlasenko 0.04-alt1 - posttests migration * Thu Jul 23 2009 Igor Vlasenko 0.03-alt1 - fixed altlinux-python-obsolete-buildreq-python-dev * Wed Jul 22 2009 Igor Vlasenko 0.02-alt1 - added test for buildrequires * Wed Jul 22 2009 Igor Vlasenko 0.01-alt1 - First build for Sisyphus.