mirror of
https://github.com/kennethreitz-archive/bpython-gist.git
synced 2026-06-05 23:50:18 +00:00
2f6555bfd2
A few people pointed out that help() can cause problems, specifically when the help string is really big, so I've internalised it and injected my own help() function into the interpreter which pages the output, but it's pretty ghetto so I'm open to suggestions for improvement. That said, it's pretty obvious that scrolling up and down (like less) would be the main requested improvement so I should get to work on that at some point.
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
#!/usr/bin/env python
|
|
from distutils.command.install_data import install_data
|
|
from distutils.sysconfig import get_python_lib
|
|
from distutils.core import setup, Extension
|
|
from distutils.dep_util import newer
|
|
from distutils.log import info
|
|
from distutils import sysconfig
|
|
import distutils.file_util
|
|
import distutils.dir_util
|
|
import sys, os
|
|
import glob
|
|
import re
|
|
|
|
# Make distutils copy bpython.py to bpython
|
|
copy_file_orig = distutils.file_util.copy_file
|
|
copy_tree_orig = distutils.dir_util.copy_tree
|
|
def copy_file(src, dst, *args, **kwargs):
|
|
if dst.endswith("bin/bpython.py"):
|
|
dst = dst[:-3]
|
|
return copy_file_orig(src, dst, *args, **kwargs)
|
|
def copy_tree(*args, **kwargs):
|
|
outputs = copy_tree_orig(*args, **kwargs)
|
|
for i in range(len(outputs)):
|
|
if outputs[i].endswith("bin/bpython.py"):
|
|
outputs[i] = outputs[i][:-3]
|
|
return outputs
|
|
distutils.file_util.copy_file = copy_file
|
|
distutils.dir_util.copy_tree = copy_tree
|
|
|
|
PYTHONLIB = os.path.join(get_python_lib(standard_lib=1, prefix=""),
|
|
"site-packages")
|
|
|
|
setup(name="bpython",
|
|
version = "0.5.0",
|
|
description = "Fancy Interface to the Python Interpreter",
|
|
author = "Robert Anthony Farrell",
|
|
author_email = "robertanthonyfarrell@gmail.com",
|
|
license = "MIT/X",
|
|
url = "http://www.noiseforfree.com/bpython/",
|
|
long_description =
|
|
"""\
|
|
bpython is a fancy interface to the Python interpreter for Unix-like operating systems.
|
|
""",
|
|
packages = ["bpython"],
|
|
scripts = ["bpython.py"],
|
|
)
|
|
|
|
|