Ticket #30676: nose-unified.diff
File nose-unified.diff, 2.9 KB (added by jmroot (Joshua Root), 13 years ago) |
---|
-
Portfile
2 2 # $Id$ 3 3 4 4 PortSystem 1.0 5 PortGroup python241.05 PortGroup python 1.0 6 6 7 name py-nose 7 set my_name nose 8 name py-${my_name} 8 9 version 1.0.0 9 10 categories-append www 10 11 license LGPL-2+ 11 maintainers openmaintainer akitada12 maintainers akitada mcalhoun openmaintainer 12 13 description A Python unittest extension. 13 long_description A unittest extension offering automatic test \ 14 long_description \ 15 A unittest extension offering automatic test \ 14 16 suite discovery, simplified test authoring, \ 15 17 and output capture. Nose provides an alternate \ 16 18 test discovery and running process for \ … … 21 23 platforms darwin 22 24 supported_archs noarch 23 25 24 homepage http://somethingaboutorange.com/mrl/projects/ nose/25 master_sites ${homepage}26 distname nose-${version}26 homepage http://somethingaboutorange.com/mrl/projects/${my_name} 27 master_sites http://pypi.python.org/packages/source/n/${my_name} 28 distname ${my_name}-${version} 27 29 28 depends_lib port:py-setuptools 30 checksums md5 47a4784c817afa6ef11a505b574584ed \ 31 sha1 186d223d0d74e94093bc0c42223d2ad92c090eed 29 32 30 checksums md5 9542d4c66e04880d8144990de76e0b88 \ 31 sha1 30015cbcb201975dbb8613acb651984255458741 \ 33 python.versions 24 25 26 27 31 32 32 34 33 patch { 35 if {$subport != $name} { 36 if {${python.version} == "24"} { 37 depends_lib port:py-setuptools 38 } else { 39 depends_lib port:py${python.version}-distribute 40 } 41 42 post-patch { 34 43 reinplace "s|man/man|share/man/man|" ${worksrcpath}/setup.py 44 45 # One of the tests fails if this directory does not exist 46 file mkdir ${worksrcpath}/functional_tests/support/empty 47 } 48 49 post-destroot { 50 if {${python.version} == "24" || ${python.version} == "25"} { 51 move ${destroot}${prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1 52 delete ${destroot}${prefix}/bin/nosetests 53 } else { 54 ln -s ${python.prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1 55 } 56 57 xinstall -m 644 -W ${worksrcpath} \ 58 AUTHORS CHANGELOG NEWS README.txt \ 59 ${destroot}${prefix}/share/doc/${subport} 60 61 file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${subport}/html 62 63 file delete ${destroot}${prefix}/share/doc/${subport}/examples 64 file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport} 65 } 66 67 test.run yes 68 test.cmd ${python.bin} setup.py test 35 69 } 70 71 livecheck.type regex 72 livecheck.url ${master_sites} 73 livecheck.regex "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"