remove some more cruft

--HG--
branch : trunk
This commit is contained in:
holger krekel 2010-10-10 15:52:13 +02:00
parent 7a461a2f3b
commit 854f6a98ae
19 changed files with 0 additions and 118 deletions

View File

@ -1,39 +0,0 @@
#!/usr/bin/env python
#
# find and import a version of 'py' that exists in a parent dir
# of the current working directory. fall back to import a
# globally available version
#
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
sys.stderr.write("inserting into sys.path: %s\n" % 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 %s" % py.__file__)

View File

@ -1,2 +0,0 @@
@echo off
for /F "usebackq delims=" %%i in (`python "%~dp0\env.py"`) do %%i

View File

@ -1,33 +0,0 @@
#!/usr/bin/env python
import sys, os, os.path
progpath = sys.argv[0]
packagedir = os.path.dirname(os.path.dirname(os.path.abspath(progpath)))
packagename = os.path.basename(packagedir)
bindir = os.path.join(packagedir, 'bin')
if sys.platform == 'win32':
bindir = os.path.join(bindir, 'win32')
rootdir = os.path.dirname(packagedir)
def prepend_path(name, value):
sep = os.path.pathsep
curpath = os.environ.get(name, '')
newpath = [value] + [ x for x in curpath.split(sep) if x and x != value ]
return setenv(name, sep.join(newpath))
def setenv(name, value):
shell = os.environ.get('SHELL', '')
comspec = os.environ.get('COMSPEC', '')
if shell.endswith('csh'):
cmd = 'setenv %s "%s"' % (name, value)
elif shell.endswith('sh'):
cmd = '%s="%s"; export %s' % (name, value, name)
elif comspec.endswith('cmd.exe'):
cmd = 'set %s=%s' % (name, value)
else:
assert False, 'Shell not supported.'
return cmd
print(prepend_path('PATH', bindir))
print(prepend_path('PYTHONPATH', rootdir))

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pycleanup()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pyconvert_unittest()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pycountloc()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pylookup()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pysvnwcrevert()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pytest()

View File

@ -1,3 +0,0 @@
#!/usr/bin/env python
from _findpy import py
py.cmdline.pywhich()

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.cleanup" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.convert_unittest" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.countloc" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.lookup" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.svnwcrevert" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.test" %*

View File

@ -1,2 +0,0 @@
@echo off
python "%~dp0\..\py.which" %*

View File

@ -1,4 +0,0 @@
docutils
pygments
pexpect
hg+http://bitbucket.org/hpk42/execnet#egg=execnet

View File

@ -1,5 +0,0 @@
docutils
pygments
pexpect
figleaf
execnet