[py-svn] r57429 - in py/trunk: . py py/apigen/tracer/testing py/c-extension py/compat/testing py/doc py/execnet/script py/misc py/misc/testing py/rest/testing py/rest/testing/data
hpk at codespeak.net
hpk at codespeak.net
Mon Aug 18 17:08:41 CEST 2008
Author: hpk
Date: Mon Aug 18 17:08:39 2008
New Revision: 57429
Added:
py/trunk/CHANGELOG
- copied unchanged from r57428, py/release/0.9.x/CHANGELOG
py/trunk/LICENSE
- copied unchanged from r57428, py/release/0.9.x/LICENSE
py/trunk/MANIFEST
- copied unchanged from r57428, py/release/0.9.x/MANIFEST
py/trunk/README.txt
- copied unchanged from r57428, py/release/0.9.x/README.txt
py/trunk/_findpy.py
- copied unchanged from r57428, py/release/0.9.x/_findpy.py
py/trunk/ez_setup.py
- copied unchanged from r57428, py/release/0.9.x/ez_setup.py
py/trunk/py/doc/release-0.9.2.txt
- copied unchanged from r57428, py/release/0.9.x/py/doc/release-0.9.2.txt
py/trunk/py/execnet/script/__init__.py
- copied unchanged from r57428, py/release/0.9.x/py/execnet/script/__init__.py
py/trunk/py/rest/testing/setup.py
- copied unchanged from r57428, py/release/0.9.x/py/rest/testing/setup.py
Removed:
py/trunk/py/c-extension/conftest.py
py/trunk/py/compat/testing/_findpy.py
py/trunk/py/misc/testing/test_update_website.py
Modified:
py/trunk/ (props changed)
py/trunk/py/LICENSE
py/trunk/py/__init__.py
py/trunk/py/apigen/tracer/testing/test_package.py
py/trunk/py/doc/bin.txt
py/trunk/py/initpkg.py
py/trunk/py/misc/buildcmodule.py
py/trunk/py/misc/testing/test_initpkg.py
py/trunk/py/rest/testing/data/ (props changed)
py/trunk/py/rest/testing/test_convert.py
py/trunk/py/rest/testing/test_directive.py
py/trunk/py/rest/testing/test_htmlrest.py
py/trunk/py/rest/testing/test_rst2pdf.py
py/trunk/setup.py
Log:
merging/porting the release branch changes and
cleanups to trunk.
svn merge -r 56716:HEAD ../release/0.9.x/ to trunk
Modified: py/trunk/py/LICENSE
==============================================================================
--- py/trunk/py/LICENSE (original)
+++ py/trunk/py/LICENSE Mon Aug 18 17:08:39 2008
@@ -1,25 +1,28 @@
-py lib Copyright holders, 2003-2005
+py lib Copyright holders, 2003-2008
=======================================
Except when otherwise stated (look for LICENSE files or information at
the beginning of each file) the files in the 'py' directory are
-copyrighted by one or more of the following people and organizations:
+copyrighted by one or more of the following people and organizations:
- Holger Krekel <hpk at trillke.net>
- merlinux GmbH, Germany <office at merlinux.de>
- Armin Rigo <arigo at tunes.org>
- Carl Friedrich Bolz <cfbolz at merlinux.de>
- Maciek Fijalkowski <fijal at genesilico.pl>
- Guido Wesdorp <guido at merlinux.de>
- Jan Balster <jan at balster.info>
+ Holger Krekel, holger at merlinux eu
+ Guido Wesdorp, johnny at johnnydebris net
+ Carl Friedrich Bolz, cfbolz at gmx de
+ Armin Rigo, arigo at tunes org
+ Maciek Fijalkowski, fijal at genesilico.pl
+ Briand Dorsey, briandorsey at gmail com
+ merlinux GmbH, Germany, office at merlinux eu
Contributors include::
- Ian Bicking <ianb at colorstudy.com>
- Grig Gheorghiu <grig at gheorghiu.net>
- Bob Ippolito <bob at redivi.com>
- Christian Tismer <tismer at stackless.com>
- Samuele Pedroni <pedronis at strakt.com>
+ Samuele Pedroni
+ Harald Armin Massa
+ Ralf Schmitt
+ Ian Bicking
+ Jan Balster
+ Grig Gheorghiu
+ Bob Ippolito
+ Christian Tismer
Except when otherwise stated (look for LICENSE files or information at
the beginning of each file) all files in the 'py' directory are
Modified: py/trunk/py/__init__.py
==============================================================================
--- py/trunk/py/__init__.py (original)
+++ py/trunk/py/__init__.py Mon Aug 18 17:08:39 2008
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
"""
- the py lib is a development support library featuring
- py.test, ad-hoc distributed execution, micro-threads
- and svn abstractions.
+the py lib is a development support library featuring
+py.test, ad-hoc distributed execution, micro-threads
+and svn abstractions.
"""
from initpkg import initpkg
@@ -14,13 +14,27 @@
revision = int('$LastChangedRevision$'.split(':')[1][:-1]),
lastchangedate = '$LastChangedDate$',
version = version,
- url = "http://codespeak.net/py",
- download_url = "XXX", # "http://codespeak.net/download/py/py-%s.tar.gz" %(version,),
+ url = "http://pylib.org",
+ download_url = "http://pypi.python.org/pypi?:action=display&name=py",
license = "MIT license",
- platforms = ['unix', 'linux', 'cygwin', 'win32'],
- author = "holger krekel, Carl Friedrich Bolz, Guido Wesdorp, Maciej Fijalkowski, Armin Rigo & others",
- author_email = "py-dev at codespeak.net",
+ platforms = ['unix', 'linux', 'osx', 'cygwin', 'win32'],
+ author = "holger krekel, Guido Wesdorp, Carl Friedrich Bolz, Armin Rigo, Maciej Fijalkowski & others",
+ author_email = "holger at merlinux.eu, py-dev at codespeak.net",
long_description = globals()['__doc__'],
+ classifiers = [
+ "Development Status :: 3 - Alpha",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: POSIX",
+ "Operating System :: Microsoft :: Windows",
+ "Operating System :: MacOS :: MacOS X",
+ "Topic :: Software Development :: Testing",
+ "Topic :: Software Development :: Libraries",
+ "Topic :: System :: Distributed Computing",
+ "Topic :: Utilities",
+ "Programming Language :: Python",
+ ],
+
# EXPORTED API
exportdefs = {
Modified: py/trunk/py/apigen/tracer/testing/test_package.py
==============================================================================
--- py/trunk/py/apigen/tracer/testing/test_package.py (original)
+++ py/trunk/py/apigen/tracer/testing/test_package.py Mon Aug 18 17:08:39 2008
@@ -8,6 +8,7 @@
import sys
import py
+
def setup_module(mod):
sys.path.insert(0, str(py.path.local(__file__).dirpath().join("package")))
import submodule
@@ -24,6 +25,8 @@
def test_init(self):
ds = self.ds
print py.builtin.sorted(ds.descs.keys())
+ if sys.platform == "win32":
+ py.test.skip("not sure why, but this fails with 4 == 6")
assert len(ds.descs) == 6
assert py.builtin.sorted(ds.descs.keys()) == [
'notpak.notmod.notclass', 'notpak.notmod.notclass.__init__',
Deleted: /py/trunk/py/c-extension/conftest.py
==============================================================================
--- /py/trunk/py/c-extension/conftest.py Mon Aug 18 17:08:39 2008
+++ (empty file)
@@ -1,14 +0,0 @@
-import py
-
-class Directory(py.test.collect.Directory):
- # XXX see in which situations/platforms we want
- # run tests here
- #def recfilter(self, path):
- # if py.std.sys.platform == 'linux2':
- # if path.basename == 'greenlet':
- # return False
- # return super(Directory, self).recfilter(path)
-
- #def run(self):
- # py.test.skip("c-extension testing needs platform selection")
- pass
Deleted: /py/trunk/py/compat/testing/_findpy.py
==============================================================================
--- /py/trunk/py/compat/testing/_findpy.py Mon Aug 18 17:08:39 2008
+++ (empty file)
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-
-#
-# find and import a version of 'py'
-#
-import sys
-import os
-from os.path import dirname as opd, exists, join, basename, abspath
-
-def searchpy(current):
- while 1:
- last = current
- initpy = join(current, '__init__.py')
- if not exists(initpy):
- pydir = join(current, 'py')
- # recognize py-package and ensure it is importable
- if exists(pydir) and exists(join(pydir, '__init__.py')):
- #for p in sys.path:
- # if p == current:
- # return True
- if current != sys.path[0]: # if we are already first, then ok
- print >>sys.stderr, "inserting into sys.path:", current
- sys.path.insert(0, current)
- return True
- current = opd(current)
- if last == current:
- return False
-
-if not searchpy(abspath(os.curdir)):
- if not searchpy(opd(abspath(sys.argv[0]))):
- if not searchpy(opd(__file__)):
- pass # let's hope it is just on sys.path
-
-import py
-
-if __name__ == '__main__':
- print "py lib is at", py.__file__
Modified: py/trunk/py/doc/bin.txt
==============================================================================
--- py/trunk/py/doc/bin.txt (original)
+++ py/trunk/py/doc/bin.txt Mon Aug 18 17:08:39 2008
@@ -52,7 +52,9 @@
Usage: ``py.rest [PATHS] [options]``
Loot recursively for .txt files starting from ``PATHS`` and convert them to
-html using docutils (or to pdf files, if the --pdf option is used).
+html using docutils or to pdf files, if the ``--pdf`` option is used. For
+conversion to PDF you will need several command line tools, on Ubuntu Linux
+this is **texlive** and **texlive-extra-utils**.
``py.rest`` has some extra features over rst2html (which is shipped with
docutils). Most of these are still experimental, the one which is most likely
Modified: py/trunk/py/initpkg.py
==============================================================================
--- py/trunk/py/initpkg.py (original)
+++ py/trunk/py/initpkg.py Mon Aug 18 17:08:39 2008
@@ -32,7 +32,7 @@
# ---------------------------------------------------
class Package(object):
- def __init__(self, name, exportdefs):
+ def __init__(self, name, exportdefs, metainfo):
pkgmodule = sys.modules[name]
assert pkgmodule.__name__ == name
self.name = name
@@ -54,6 +54,13 @@
# inhibit further direct filesystem imports through the package module
del pkgmodule.__path__
+ # set metainfo
+ for name, value in metainfo.items():
+ setattr(self, name, value)
+ version = metainfo.get('version', None)
+ if version:
+ pkgmodule.__version__ = version
+
def _resolve(self, extpyish):
""" resolve a combined filesystem/python extpy-ish path. """
fspath, modpath = extpyish
@@ -229,9 +236,7 @@
def initpkg(pkgname, exportdefs, **kw):
#print "initializing package", pkgname
# bootstrap Package object
- pkg = Package(pkgname, exportdefs)
- for name, value in kw.items():
- setattr(pkg, name, value)
+ pkg = Package(pkgname, exportdefs, kw)
seen = { pkgname : pkg.module }
deferred_imports = []
Modified: py/trunk/py/misc/buildcmodule.py
==============================================================================
--- py/trunk/py/misc/buildcmodule.py (original)
+++ py/trunk/py/misc/buildcmodule.py Mon Aug 18 17:08:39 2008
@@ -32,7 +32,7 @@
lib = dirpath.join(modname+ext)
# XXX argl! we need better "build"-locations alltogether!
- if lib.check():
+ if lib.check() and lib.stat().mtime < cfile.stat().mtime:
try:
lib.remove()
except EnvironmentError:
Modified: py/trunk/py/misc/testing/test_initpkg.py
==============================================================================
--- py/trunk/py/misc/testing/test_initpkg.py (original)
+++ py/trunk/py/misc/testing/test_initpkg.py Mon Aug 18 17:08:39 2008
@@ -255,13 +255,3 @@
# help(std.path)
# #assert False
-def test_url_of_version():
- #py.test.skip("FAILING! - provide a proper URL or upload pylib tgz")
- from urllib import URLopener
- url = py.__pkg__.download_url
- if url.lower() == "xxx":
- assert py.__pkg__.version.find("alpha") != -1
- else:
- URLopener().open(url)
-
-
Deleted: /py/trunk/py/misc/testing/test_update_website.py
==============================================================================
--- /py/trunk/py/misc/testing/test_update_website.py Mon Aug 18 17:08:39 2008
+++ (empty file)
@@ -1,75 +0,0 @@
-import py
-import sys
-
-here = py.magic.autopath().dirpath()
-update_website = here.join('../../bin/_update_website.py').pyimport()
-
-def test_rsync():
- temp = py.test.ensuretemp('update_website_rsync')
- pkgpath = temp.join('pkg')
- apipath = temp.join('apigen')
- pkgpath.ensure('foo/bar.txt', file=True).write('baz')
- pkgpath.ensure('spam/eggs.txt', file=True).write('spam')
- apipath.ensure('api/foo.html', file=True).write('<html />')
- apipath.ensure('source/spam.html', file=True).write('<html />')
-
- rsyncpath = temp.join('rsync')
- assert not rsyncpath.check()
- gateway = py.execnet.PopenGateway()
- update_website.rsync(pkgpath, apipath, gateway, rsyncpath.strpath)
- assert rsyncpath.check(dir=True)
- assert rsyncpath.join('pkg').check(dir=True)
- assert rsyncpath.join('pkg/spam/eggs.txt').read() == 'spam'
- assert rsyncpath.join('apigen').check(dir=True)
- assert rsyncpath.join('apigen/api/foo.html').read() == '<html />'
-
-def setup_pkg(testname):
- temp = py.test.ensuretemp(testname)
- pkgpath = temp.ensure('pkg', dir=True)
- pyfile = pkgpath.ensure('mod.py').write(py.code.Source("""
- def foo(x):
- return x + 1
- """))
- testfile = pkgpath.ensure('test/test_mod.py').write(py.code.Source("""
- from pkg.sub import foo
- def test_foo():
- assert foo(1) == 2
- """))
- initfile = pkgpath.ensure('__init__.py').write(py.code.Source("""
- import py
- from py.__.initpkg import initpkg
- initpkg(__name__, exportdefs={
- 'sub.foo': ('./mod.py', 'foo'),
- })
- """))
- initfile = pkgpath.ensure('apigen/apigen.py').write(py.code.Source("""
- from py.__.apigen.apigen import build, \
- get_documentable_items_pkgdir as get_documentable_items
- """))
- return pkgpath
-
-def test_run_tests():
- if py.std.sys.platform == "win32":
- py.test.skip("update_website is not supposed to be run from win32")
- pkgpath = setup_pkg('update_website_run_tests')
- errors = update_website.run_tests(pkgpath,
- pkgpath.dirpath().join('apigen'),
- captureouterr=True)
- print errors
- assert not errors
- py.test.skip("Apigen turned off")
- assert pkgpath.join('../apigen').check(dir=True)
- assert pkgpath.join('../apigen/api/sub.foo.html').check(file=True)
-
-def test_run_tests_failure():
- if py.std.sys.platform == "win32":
- py.test.skip("update_website is not supposed to be run from win32")
- pkgpath = setup_pkg('update_website_run_tests_failure')
- assert not pkgpath.join('../apigen').check(dir=True)
- py.test.skip("Apigen turned off")
- pkgpath.ensure('../apigen', file=True)
- errors = update_website.run_tests(pkgpath,
- pkgpath.dirpath().join('apigen'),
- captureouterr=True)
- assert errors # some error message
-
Modified: py/trunk/py/rest/testing/test_convert.py
==============================================================================
--- py/trunk/py/rest/testing/test_convert.py (original)
+++ py/trunk/py/rest/testing/test_convert.py Mon Aug 18 17:08:39 2008
@@ -1,13 +1,13 @@
import py
from py.__.rest.convert import convert_dot, latexformula2png
-
-datadir = py.magic.autopath().dirpath().join("data")
+from py.__.rest.testing.setup import getdata
def setup_module(mod):
required = 'gs', 'dot', 'latex', 'epstopdf',
for exe in required:
if not py.path.local.sysfind(exe):
py.test.skip("%r not found, required: %r" %(exe, required))
+ mod.datadir = getdata()
def test_convert_dot():
# XXX not really clear that the result is valid pdf/eps
Modified: py/trunk/py/rest/testing/test_directive.py
==============================================================================
--- py/trunk/py/rest/testing/test_directive.py (original)
+++ py/trunk/py/rest/testing/test_directive.py Mon Aug 18 17:08:39 2008
@@ -7,9 +7,11 @@
from py.__.rest import directive
from py.__.misc import rest
from py.__.rest.latex import process_rest_file
+from py.__.rest.testing.setup import getdata
-datadir = py.magic.autopath().dirpath().join("data")
-testdir = py.test.ensuretemp("rest")
+def setup_module(mod):
+ mod.datadir = getdata()
+ mod.testdir = py.test.ensuretemp("rest")
class TestGraphviz(object):
def _graphviz_html(self):
Modified: py/trunk/py/rest/testing/test_htmlrest.py
==============================================================================
--- py/trunk/py/rest/testing/test_htmlrest.py (original)
+++ py/trunk/py/rest/testing/test_htmlrest.py Mon Aug 18 17:08:39 2008
@@ -2,6 +2,7 @@
import py
from py.__.misc import rest
+from py.__.rest.testing.setup import getdata
def setup_module(mod):
if not py.path.local.sysfind("gs") or \
@@ -13,12 +14,12 @@
except ImportError:
py.test.skip("docutils not present")
-data = py.magic.autopath().dirpath().join("data")
+ mod.datadir = getdata()
def test_process_simple():
# fallback test: only checks that no exception is raised
def rec(p):
return p.check(dotfile=0)
- for x in data.visit("*.txt", rec=rec):
+ for x in datadir.visit("*.txt", rec=rec):
yield rest.process, x
Modified: py/trunk/py/rest/testing/test_rst2pdf.py
==============================================================================
--- py/trunk/py/rest/testing/test_rst2pdf.py (original)
+++ py/trunk/py/rest/testing/test_rst2pdf.py Mon Aug 18 17:08:39 2008
@@ -2,6 +2,8 @@
import py
from py.__.rest.latex import process_configfile, process_rest_file
+from py.__.rest.testing.setup import getdata
+
try:
import docutils
except ImportError:
@@ -13,22 +15,20 @@
not py.path.local.sysfind("dot") or \
not py.path.local.sysfind("latex"):
py.test.skip("ghostscript, graphviz and latex needed")
- mod.data = py.magic.autopath().dirpath().join("data")
+ mod.datadir = getdata()
class TestRst2Pdf(object):
def _process_rest_file(self):
- data = py.magic.autopath().dirpath().join("data")
- part2 = data.join("part1.txt")
+ part2 = datadir.join("part1.txt")
pdf = part2.new(ext="pdf")
process_rest_file(part2)
assert pdf.check()
pdf.remove()
def _process_configfile(self):
- data = py.magic.autopath().dirpath().join("data")
- config = data.join("example.rst2pdfconfig")
+ config = datadir.join("example.rst2pdfconfig")
pdf = config.new(ext="pdf")
- tex = data.join('example.tex')
+ tex = datadir.join('example.tex')
process_configfile(config, debug=True)
assert pdf.check()
assert tex.check()
@@ -45,9 +45,9 @@
def rec(p):
return p.check(dotfile=0)
- for x in data.visit("*.rst2pdfconfig", rec=rec):
+ for x in datadir.visit("*.rst2pdfconfig", rec=rec):
process_configfile(x)
- for x in data.visit("*.txt", rec=rec):
+ for x in datadir.visit("*.txt", rec=rec):
process_rest_file(x)
def test_rst2pdf(self):
Modified: py/trunk/setup.py
==============================================================================
--- py/trunk/setup.py (original)
+++ py/trunk/setup.py Mon Aug 18 17:08:39 2008
@@ -1,3 +1,207 @@
-import py
-from py.__.misc._dist import setup
-setup(py)
+"""
+ setup file for 'py' package based on:
+
+ https://codespeak.net/svn/py/release/0.9.x, revision=57387
+
+ autogenerated by gensetup.py
+"""
+import os, sys
+
+if 1: # set to zero if you want plain distutils
+ import ez_setup
+ ez_setup.use_setuptools()
+ from setuptools import setup, Extension
+else:
+ from distutils.core import setup, Extension
+
+def main():
+ setup(cmdclass=cmdclass,
+ name='py',
+ description='py lib: agile development and test support library',
+ version='0.9.2-alpha-6',
+ url='http://pylib.org',
+ license='MIT license',
+ platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
+ author='holger krekel, Guido Wesdorp, Carl Friedrich Bolz, Armin Rigo, Maciej Fijalkowski & others',
+ author_email='holger at merlinux.eu, py-dev at codespeak.net',
+ ext_modules = [Extension("py.c-extension.greenlet.greenlet",
+ ["py/c-extension/greenlet/greenlet.c"]),],
+
+ py_modules=['_findpy'],
+ long_description='the py lib is a development support library featuring py.test, ad-hoc distributed execution, micro-threads and svn abstractions.',
+ classifiers=['Development Status :: 3 - Alpha',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: POSIX',
+ 'Operating System :: Microsoft :: Windows',
+ 'Operating System :: MacOS :: MacOS X',
+ 'Topic :: Software Development :: Testing',
+ 'Topic :: Software Development :: Libraries',
+ 'Topic :: System :: Distributed Computing',
+ 'Topic :: Utilities',
+ 'Programming Language :: Python'],
+ scripts=['py/bin/py.cleanup',
+ 'py/bin/py.countloc',
+ 'py/bin/py.lookup',
+ 'py/bin/py.rest',
+ 'py/bin/py.test'],
+ packages=['py',
+ 'py.apigen',
+ 'py.apigen.rest',
+ 'py.apigen.rest.testing',
+ 'py.apigen.source',
+ 'py.apigen.source.testing',
+ 'py.apigen.testing',
+ 'py.apigen.tracer',
+ 'py.apigen.tracer.testing',
+ 'py.apigen.tracer.testing.package',
+ 'py.apigen.tracer.testing.package.submodule',
+ 'py.apigen.tracer.testing.package.submodule.pak',
+ 'py.builtin',
+ 'py.builtin.testing',
+ 'py.code',
+ 'py.code.testing',
+ 'py.compat',
+ 'py.compat.testing',
+ 'py.doc',
+ 'py.execnet',
+ 'py.execnet.script',
+ 'py.execnet.testing',
+ 'py.io',
+ 'py.io.test',
+ 'py.log',
+ 'py.log.testing',
+ 'py.magic',
+ 'py.magic.testing',
+ 'py.misc',
+ 'py.misc.cmdline',
+ 'py.misc.testing',
+ 'py.path',
+ 'py.path.gateway',
+ 'py.path.local',
+ 'py.path.local.testing',
+ 'py.path.svn',
+ 'py.path.svn.testing',
+ 'py.path.testing',
+ 'py.process',
+ 'py.process.testing',
+ 'py.rest',
+ 'py.rest.testing',
+ 'py.test',
+ 'py.test.rsession',
+ 'py.test.rsession.testing',
+ 'py.test.rsession.webdata',
+ 'py.test.terminal',
+ 'py.test.testing',
+ 'py.test.testing.import_test.package',
+ 'py.test.web',
+ 'py.thread',
+ 'py.thread.testing',
+ 'py.tool',
+ 'py.tool.testing',
+ 'py.xmlobj',
+ 'py.xmlobj.testing'],
+ package_data={'py': ['LICENSE',
+ 'apigen/api.js',
+ 'apigen/apigen.js',
+ 'apigen/source/index.cgi',
+ 'apigen/style.css',
+ 'apigen/todo-apigen.txt',
+ 'apigen/todo.txt',
+ 'bin/py.cleanup',
+ 'bin/py.countloc',
+ 'bin/py.lookup',
+ 'bin/py.rest',
+ 'bin/py.test',
+ 'c-extension/greenlet/README.txt',
+ 'c-extension/greenlet/greenlet.c',
+ 'c-extension/greenlet/greenlet.h',
+ 'c-extension/greenlet/slp_platformselect.h',
+ 'c-extension/greenlet/switch_amd64_unix.h',
+ 'c-extension/greenlet/switch_ppc_macosx.h',
+ 'c-extension/greenlet/switch_ppc_unix.h',
+ 'c-extension/greenlet/switch_s390_unix.h',
+ 'c-extension/greenlet/switch_sparc_sun_gcc.h',
+ 'c-extension/greenlet/switch_x86_msvc.h',
+ 'c-extension/greenlet/switch_x86_unix.h',
+ 'compat/LICENSE',
+ 'compat/testing/test_doctest.txt',
+ 'compat/testing/test_doctest2.txt',
+ 'doc/TODO.txt',
+ 'doc/apigen.txt',
+ 'doc/bin.txt',
+ 'doc/code.txt',
+ 'doc/coding-style.txt',
+ 'doc/contact.txt',
+ 'doc/download.txt',
+ 'doc/execnet.txt',
+ 'doc/future.txt',
+ 'doc/future/code_template.txt',
+ 'doc/future/planning.txt',
+ 'doc/future/pylib_pypy.txt',
+ 'doc/future/rsession_todo.txt',
+ 'doc/greenlet.txt',
+ 'doc/impl-test.txt',
+ 'doc/index.txt',
+ 'doc/io.txt',
+ 'doc/links.txt',
+ 'doc/log.txt',
+ 'doc/misc.txt',
+ 'doc/path.txt',
+ 'doc/release-0.9.0.txt',
+ 'doc/release-0.9.1.txt',
+ 'doc/release-0.9.2.txt',
+ 'doc/style.css',
+ 'doc/test.txt',
+ 'doc/why_py.txt',
+ 'doc/xml.txt',
+ 'env.cmd',
+ 'execnet/NOTES',
+ 'misc/testing/data/svnlookrepo.dump',
+ 'path/gateway/TODO.txt',
+ 'path/svn/quoting.txt',
+ 'path/svn/testing/repotest.dump',
+ 'rest/rest.sty.template',
+ 'rest/testing/data/example.rst2pdfconfig',
+ 'rest/testing/data/example1.dot',
+ 'rest/testing/data/formula.txt',
+ 'rest/testing/data/formula1.txt',
+ 'rest/testing/data/graphviz.txt',
+ 'rest/testing/data/part1.txt',
+ 'rest/testing/data/part2.txt',
+ 'rest/testing/data/tocdepth.rst2pdfconfig',
+ 'test/rsession/webdata/index.html',
+ 'test/rsession/webdata/source.js']},
+ zip_safe=False,
+ )
+
+# on windows we need to hack up the to-be-installed scripts
+from distutils.command.install_scripts import install_scripts
+class my_install_scripts(install_scripts):
+ def run(self):
+ install_scripts.run(self)
+ #print self.outfiles
+ for fn in self.outfiles:
+ basename = os.path.basename(fn)
+ if "." in basename:
+ #print "tackling", fn
+ newbasename = basename.replace(".", "_")
+ newfn = os.path.join(os.path.dirname(fn), newbasename)
+ if os.path.exists(newfn):
+ os.remove(newfn)
+ os.rename(fn, newfn)
+ newname = fn + ".cmd"
+ if os.path.exists(newname):
+ os.remove(newname)
+ f = open(newname, 'w')
+ f.write("@echo off\n")
+ f.write('python "%%~dp0\%s" %%*\n' % newbasename)
+ f.close()
+if sys.platform == "win32":
+ cmdclass = {'install_scripts': my_install_scripts}
+else:
+ cmdclass = {}
+
+if __name__ == '__main__':
+ main()
+
\ No newline at end of file
More information about the pytest-commit
mailing list