parent
c1ce0c7357
commit
620805c4d2
132
MANIFEST
132
MANIFEST
|
@ -67,6 +67,7 @@ py/bin/py.countloc
|
|||
py/bin/py.lookup
|
||||
py/bin/py.rest
|
||||
py/bin/py.test
|
||||
py/bin/py.which
|
||||
py/builtin/__init__.py
|
||||
py/builtin/enumerate.py
|
||||
py/builtin/exception.py
|
||||
|
@ -79,6 +80,7 @@ py/builtin/testing/test_exception.py
|
|||
py/builtin/testing/test_reversed.py
|
||||
py/builtin/testing/test_set.py
|
||||
py/builtin/testing/test_sorted.py
|
||||
py/c-extension/__init__.py
|
||||
py/c-extension/greenlet/README.txt
|
||||
py/c-extension/greenlet/dummy_greenlet.py
|
||||
py/c-extension/greenlet/greenlet.c
|
||||
|
@ -86,6 +88,7 @@ py/c-extension/greenlet/greenlet.h
|
|||
py/c-extension/greenlet/setup.py
|
||||
py/c-extension/greenlet/slp_platformselect.h
|
||||
py/c-extension/greenlet/switch_amd64_unix.h
|
||||
py/c-extension/greenlet/switch_mips_unix.h
|
||||
py/c-extension/greenlet/switch_ppc_macosx.h
|
||||
py/c-extension/greenlet/switch_ppc_unix.h
|
||||
py/c-extension/greenlet/switch_s390_unix.h
|
||||
|
@ -105,7 +108,6 @@ py/code/safe_repr.py
|
|||
py/code/source.py
|
||||
py/code/testing/__init__.py
|
||||
py/code/testing/test_code.py
|
||||
py/code/testing/test_cpython_features.py
|
||||
py/code/testing/test_excinfo.py
|
||||
py/code/testing/test_frame.py
|
||||
py/code/testing/test_safe_repr.py
|
||||
|
@ -130,6 +132,7 @@ py/conftest.py
|
|||
py/doc/TODO.txt
|
||||
py/doc/__init__.py
|
||||
py/doc/apigen.txt
|
||||
py/doc/apigen_refactorings.txt
|
||||
py/doc/bin.txt
|
||||
py/doc/code.txt
|
||||
py/doc/coding-style.txt
|
||||
|
@ -147,6 +150,7 @@ py/doc/execnet.txt
|
|||
py/doc/future.txt
|
||||
py/doc/future/code_template.txt
|
||||
py/doc/future/planning.txt
|
||||
py/doc/future/planning2.txt
|
||||
py/doc/future/pylib_pypy.txt
|
||||
py/doc/future/rsession_todo.txt
|
||||
py/doc/greenlet.txt
|
||||
|
@ -158,7 +162,6 @@ py/doc/log.txt
|
|||
py/doc/misc.txt
|
||||
py/doc/path.txt
|
||||
py/doc/release-0.9.0.txt
|
||||
py/doc/release-0.9.1.txt
|
||||
py/doc/release-0.9.2.txt
|
||||
py/doc/style.css
|
||||
py/doc/test.txt
|
||||
|
@ -187,15 +190,36 @@ py/execnet/testing/__init__.py
|
|||
py/execnet/testing/test_gateway.py
|
||||
py/execnet/testing/test_pickle.py
|
||||
py/execnet/testing/test_rsync.py
|
||||
py/green/__init__.py
|
||||
py/green/conftest.py
|
||||
py/green/greenexecnet.py
|
||||
py/green/greensock2.py
|
||||
py/green/msgstruct.py
|
||||
py/green/pipe/__init__.py
|
||||
py/green/pipe/common.py
|
||||
py/green/pipe/fd.py
|
||||
py/green/pipe/gsocket.py
|
||||
py/green/pipe/mp.py
|
||||
py/green/pipelayer.py
|
||||
py/green/server/__init__.py
|
||||
py/green/server/httpserver.py
|
||||
py/green/test/__init__.py
|
||||
py/green/test/test_greenexecnet.py
|
||||
py/green/test/test_greensock2.py
|
||||
py/green/test/test_pipelayer.py
|
||||
py/initpkg.py
|
||||
py/io/__init__.py
|
||||
py/io/dupfile.py
|
||||
py/io/fdcapture.py
|
||||
py/io/forkedfunc.py
|
||||
py/io/stdcapture.py
|
||||
py/io/test/__init__.py
|
||||
py/io/test/test_dupfile.py
|
||||
py/io/test/test_fdcapture.py
|
||||
py/io/test/test_stdcapture.py
|
||||
py/io/terminalwriter.py
|
||||
py/io/testing/__init__.py
|
||||
py/io/testing/test_dupfile.py
|
||||
py/io/testing/test_fdcapture.py
|
||||
py/io/testing/test_forkedfunc.py
|
||||
py/io/testing/test_stdcapture.py
|
||||
py/io/testing/test_terminalwriter.py
|
||||
py/log/__init__.py
|
||||
py/log/consumer.py
|
||||
py/log/logger.py
|
||||
|
@ -307,70 +331,70 @@ py/rest/transform.py
|
|||
py/test/__init__.py
|
||||
py/test/cmdline.py
|
||||
py/test/collect.py
|
||||
py/test/compat.py
|
||||
py/test/config.py
|
||||
py/test/conftesthandle.py
|
||||
py/test/custompdb.py
|
||||
py/test/defaultconftest.py
|
||||
py/test/deprecate.py
|
||||
py/test/doctest.py
|
||||
py/test/item.py
|
||||
py/test/dsession/__init__.py
|
||||
py/test/dsession/dsession.py
|
||||
py/test/dsession/hostmanage.py
|
||||
py/test/dsession/masterslave.py
|
||||
py/test/dsession/mypickle.py
|
||||
py/test/dsession/testing/__init__.py
|
||||
py/test/dsession/testing/basetest.py
|
||||
py/test/dsession/testing/test_dsession.py
|
||||
py/test/dsession/testing/test_functional_dsession.py
|
||||
py/test/dsession/testing/test_hostmanage.py
|
||||
py/test/dsession/testing/test_masterslave.py
|
||||
py/test/dsession/testing/test_mypickle.py
|
||||
py/test/event.py
|
||||
py/test/looponfail/__init__.py
|
||||
py/test/looponfail/remote.py
|
||||
py/test/looponfail/testing/__init__.py
|
||||
py/test/looponfail/testing/test_remote.py
|
||||
py/test/looponfail/testing/test_util.py
|
||||
py/test/looponfail/util.py
|
||||
py/test/outcome.py
|
||||
py/test/raises.py
|
||||
py/test/representation.py
|
||||
py/test/rsession/__init__.py
|
||||
py/test/rsession/box.py
|
||||
py/test/rsession/executor.py
|
||||
py/test/rsession/hostmanage.py
|
||||
py/test/rsession/local.py
|
||||
py/test/rsession/master.py
|
||||
py/test/rsession/outcome.py
|
||||
py/test/rsession/repevent.py
|
||||
py/test/rsession/reporter.py
|
||||
py/test/rsession/rest.py
|
||||
py/test/rsession/rsession.py
|
||||
py/test/rsession/slave.py
|
||||
py/test/rsession/testing/__init__.py
|
||||
py/test/rsession/testing/basetest.py
|
||||
py/test/rsession/testing/example1.py
|
||||
py/test/rsession/testing/example2.py
|
||||
py/test/rsession/testing/test_boxing.py
|
||||
py/test/rsession/testing/test_executor.py
|
||||
py/test/rsession/testing/test_hostmanage.py
|
||||
py/test/rsession/testing/test_lsession.py
|
||||
py/test/rsession/testing/test_master.py
|
||||
py/test/rsession/testing/test_outcome.py
|
||||
py/test/rsession/testing/test_repevent.py
|
||||
py/test/rsession/testing/test_reporter.py
|
||||
py/test/rsession/testing/test_rest.py
|
||||
py/test/rsession/testing/test_rsession.py
|
||||
py/test/rsession/testing/test_slave.py
|
||||
py/test/rsession/testing/test_web.py
|
||||
py/test/rsession/testing/test_webjs.py
|
||||
py/test/rsession/web.py
|
||||
py/test/rsession/webdata/__init__.py
|
||||
py/test/rsession/webdata/index.html
|
||||
py/test/rsession/webdata/json.py
|
||||
py/test/rsession/webdata/source.js
|
||||
py/test/rsession/webjs.py
|
||||
py/test/pycollect.py
|
||||
py/test/report/__init__.py
|
||||
py/test/report/base.py
|
||||
py/test/report/collectonly.py
|
||||
py/test/report/rest.py
|
||||
py/test/report/terminal.py
|
||||
py/test/report/testing/__init__.py
|
||||
py/test/report/testing/test_basereporter.py
|
||||
py/test/report/testing/test_collectonly.py
|
||||
py/test/report/testing/test_rest.py
|
||||
py/test/report/testing/test_terminal.py
|
||||
py/test/report/testing/test_web.py
|
||||
py/test/report/testing/test_webjs.py
|
||||
py/test/report/web.py
|
||||
py/test/report/webdata/__init__.py
|
||||
py/test/report/webdata/index.html
|
||||
py/test/report/webdata/json.py
|
||||
py/test/report/webdata/source.js
|
||||
py/test/report/webjs.py
|
||||
py/test/runner.py
|
||||
py/test/session.py
|
||||
py/test/terminal/__init__.py
|
||||
py/test/terminal/out.py
|
||||
py/test/terminal/remote.py
|
||||
py/test/terminal/terminal.py
|
||||
py/test/testing/__init__.py
|
||||
py/test/testing/acceptance_test.py
|
||||
py/test/testing/import_test/package/__init__.py
|
||||
py/test/testing/import_test/package/absolute_import_shared_lib.py
|
||||
py/test/testing/import_test/package/module_that_imports_shared_lib.py
|
||||
py/test/testing/import_test/package/shared_lib.py
|
||||
py/test/testing/import_test/package/test_import.py
|
||||
py/test/testing/setupdata.py
|
||||
py/test/testing/suptest.py
|
||||
py/test/testing/test_collect.py
|
||||
py/test/testing/test_compat.py
|
||||
py/test/testing/test_config.py
|
||||
py/test/testing/test_conftesthandle.py
|
||||
py/test/testing/test_deprecated.py
|
||||
py/test/testing/test_doctest.py
|
||||
py/test/testing/test_raises.py
|
||||
py/test/testing/test_remote.py
|
||||
py/test/testing/test_repr.py
|
||||
py/test/testing/test_event.py
|
||||
py/test/testing/test_outcome.py
|
||||
py/test/testing/test_repevent.py
|
||||
py/test/testing/test_runner_functional.py
|
||||
py/test/testing/test_session.py
|
||||
py/test/testing/test_setup_nested.py
|
||||
py/test/web/__init__.py
|
||||
|
|
119
setup.py
119
setup.py
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
setup file for 'py' package based on:
|
||||
|
||||
https://codespeak.net/svn/py/release/0.9.x, revision=57387
|
||||
https://codespeak.net/svn/py/trunk, revision=57462
|
||||
|
||||
autogenerated by gensetup.py
|
||||
"""
|
||||
|
@ -17,8 +17,8 @@ else:
|
|||
def main():
|
||||
setup(cmdclass=cmdclass,
|
||||
name='py',
|
||||
description='py lib: agile development and test support library',
|
||||
version='0.9.2-alpha-6',
|
||||
description='pylib and py.test: agile development and test support library',
|
||||
version='1.0.0a1',
|
||||
url='http://pylib.org',
|
||||
license='MIT license',
|
||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||
|
@ -44,7 +44,8 @@ def main():
|
|||
'py/bin/py.countloc',
|
||||
'py/bin/py.lookup',
|
||||
'py/bin/py.rest',
|
||||
'py/bin/py.test'],
|
||||
'py/bin/py.test',
|
||||
'py/bin/py.which'],
|
||||
packages=['py',
|
||||
'py.apigen',
|
||||
'py.apigen.rest',
|
||||
|
@ -59,6 +60,7 @@ def main():
|
|||
'py.apigen.tracer.testing.package.submodule.pak',
|
||||
'py.builtin',
|
||||
'py.builtin.testing',
|
||||
'py.c-extension',
|
||||
'py.code',
|
||||
'py.code.testing',
|
||||
'py.compat',
|
||||
|
@ -67,8 +69,12 @@ def main():
|
|||
'py.execnet',
|
||||
'py.execnet.script',
|
||||
'py.execnet.testing',
|
||||
'py.green',
|
||||
'py.green.pipe',
|
||||
'py.green.server',
|
||||
'py.green.test',
|
||||
'py.io',
|
||||
'py.io.test',
|
||||
'py.io.testing',
|
||||
'py.log',
|
||||
'py.log.testing',
|
||||
'py.magic',
|
||||
|
@ -88,10 +94,13 @@ def main():
|
|||
'py.rest',
|
||||
'py.rest.testing',
|
||||
'py.test',
|
||||
'py.test.rsession',
|
||||
'py.test.rsession.testing',
|
||||
'py.test.rsession.webdata',
|
||||
'py.test.terminal',
|
||||
'py.test.dsession',
|
||||
'py.test.dsession.testing',
|
||||
'py.test.looponfail',
|
||||
'py.test.looponfail.testing',
|
||||
'py.test.report',
|
||||
'py.test.report.testing',
|
||||
'py.test.report.webdata',
|
||||
'py.test.testing',
|
||||
'py.test.testing.import_test.package',
|
||||
'py.test.web',
|
||||
|
@ -108,36 +117,54 @@ def main():
|
|||
'apigen/style.css',
|
||||
'apigen/todo-apigen.txt',
|
||||
'apigen/todo.txt',
|
||||
'bin/_findpy.py',
|
||||
'bin/py.cleanup',
|
||||
'bin/py.countloc',
|
||||
'bin/py.lookup',
|
||||
'bin/py.rest',
|
||||
'bin/py.test',
|
||||
'bin/py.which',
|
||||
'c-extension/greenlet/README.txt',
|
||||
'c-extension/greenlet/dummy_greenlet.py',
|
||||
'c-extension/greenlet/greenlet.c',
|
||||
'c-extension/greenlet/greenlet.h',
|
||||
'c-extension/greenlet/setup.py',
|
||||
'c-extension/greenlet/slp_platformselect.h',
|
||||
'c-extension/greenlet/switch_amd64_unix.h',
|
||||
'c-extension/greenlet/switch_mips_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',
|
||||
'c-extension/greenlet/test_generator.py',
|
||||
'c-extension/greenlet/test_generator_nested.py',
|
||||
'c-extension/greenlet/test_greenlet.py',
|
||||
'c-extension/greenlet/test_remote.py',
|
||||
'c-extension/greenlet/test_throw.py',
|
||||
'compat/LICENSE',
|
||||
'compat/testing/test_doctest.txt',
|
||||
'compat/testing/test_doctest2.txt',
|
||||
'doc/TODO.txt',
|
||||
'doc/apigen.txt',
|
||||
'doc/apigen_refactorings.txt',
|
||||
'doc/bin.txt',
|
||||
'doc/code.txt',
|
||||
'doc/coding-style.txt',
|
||||
'doc/contact.txt',
|
||||
'doc/download.txt',
|
||||
'doc/example/genhtml.py',
|
||||
'doc/example/genhtmlcss.py',
|
||||
'doc/example/genxml.py',
|
||||
'doc/example/pytest/failure_demo.py',
|
||||
'doc/example/pytest/test_failures.py',
|
||||
'doc/example/pytest/test_setup_flow_example.py',
|
||||
'doc/execnet.txt',
|
||||
'doc/future.txt',
|
||||
'doc/future/code_template.txt',
|
||||
'doc/future/planning.txt',
|
||||
'doc/future/planning2.txt',
|
||||
'doc/future/pylib_pypy.txt',
|
||||
'doc/future/rsession_todo.txt',
|
||||
'doc/greenlet.txt',
|
||||
|
@ -149,7 +176,6 @@ def main():
|
|||
'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',
|
||||
|
@ -170,11 +196,75 @@ def main():
|
|||
'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']},
|
||||
'test/report/webdata/index.html',
|
||||
'test/report/webdata/source.js']},
|
||||
zip_safe=False,
|
||||
)
|
||||
|
||||
class Win32PathHandling:
|
||||
""" a helper to remove things added to system PATHs in previous installations. """
|
||||
_winreg = None
|
||||
def __init__(self):
|
||||
if sys.platform == 'win32':
|
||||
try:
|
||||
import _winreg
|
||||
except ImportError:
|
||||
print sys.stderr, "huh could not import _winreg on windows, ignoring"
|
||||
else:
|
||||
self._winreg = _winreg
|
||||
|
||||
def remove_pylib_path(self):
|
||||
reg = self._winreg.ConnectRegistry(
|
||||
None, self._winreg.HKEY_LOCAL_MACHINE)
|
||||
key = r"SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
|
||||
path = self.get_registry_value(reg, key, "Path")
|
||||
newpath = self.prunepath(path)
|
||||
if newpath != path:
|
||||
print "PATH contains old py/bin/win32 scripts:", path
|
||||
print "pruning and setting a new PATH:", newpath
|
||||
self.set_registry_value(reg, key, "Path", newpath)
|
||||
# Propagate changes to current command prompt
|
||||
os.system("set PATH=%s" % path)
|
||||
self.try_propagate_system()
|
||||
|
||||
def prunepath(self, path):
|
||||
basename = os.path.basename
|
||||
dirname = os.path.dirname
|
||||
l = []
|
||||
for p in path.split(';'):
|
||||
if basename(p) == "win32" and basename(dirname(p)) == "bin" \
|
||||
and basename(dirname(dirname(p))) == "py":
|
||||
continue # prune this path
|
||||
l.append(p)
|
||||
return ";".join(l)
|
||||
|
||||
def try_propagate_system(self):
|
||||
try:
|
||||
import win32gui, win32con
|
||||
except ImportError:
|
||||
return
|
||||
# Propagate changes throughout the system
|
||||
win32gui.SendMessageTimeout(win32con.HWND_BROADCAST,
|
||||
win32con.WM_SETTINGCHANGE, 0, "Environment",
|
||||
win32con.SMTO_ABORTIFHUNG, 5000)
|
||||
|
||||
def get_registry_value(self, reg, key, value_name):
|
||||
k = self._winreg.OpenKey(reg, key)
|
||||
value = self._winreg.QueryValueEx(k, value_name)[0]
|
||||
self._winreg.CloseKey(k)
|
||||
return value
|
||||
|
||||
def set_registry_value(self, reg, key, value_name, value):
|
||||
k = self._winreg.OpenKey(reg, key, 0, self._winreg.KEY_WRITE)
|
||||
value_type = self._winreg.REG_SZ
|
||||
# if we handle the Path value, then set its type to REG_EXPAND_SZ
|
||||
# so that things like %SystemRoot% get automatically expanded by the
|
||||
# command prompt
|
||||
if value_name == "Path":
|
||||
value_type = self._winreg.REG_EXPAND_SZ
|
||||
self._winreg.SetValueEx(k, value_name, 0, value_type, value)
|
||||
self._winreg.CloseKey(k)
|
||||
|
||||
# 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):
|
||||
|
@ -195,8 +285,11 @@ class my_install_scripts(install_scripts):
|
|||
os.remove(newname)
|
||||
f = open(newname, 'w')
|
||||
f.write("@echo off\n")
|
||||
f.write('python "%%~dp0\%s" %%*\n' % newbasename)
|
||||
f.write('python "%%~dp0\py_command_trampolin" %s %%*\n' % basename)
|
||||
f.close()
|
||||
w32path = Win32PathHandling()
|
||||
w32path.remove_pylib_path()
|
||||
|
||||
if sys.platform == "win32":
|
||||
cmdclass = {'install_scripts': my_install_scripts}
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue