|
1 | 1 | #!/usr/bin/env python |
2 | | -from distutils.command.install_data import install_data |
3 | | -from distutils.sysconfig import get_python_lib |
4 | | -from distutils.core import setup, Extension |
5 | | -from distutils.dep_util import newer |
6 | | -from distutils.log import info |
7 | | -from distutils import sysconfig |
8 | | -import distutils.file_util |
9 | | -import distutils.dir_util |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | + |
| 4 | +from setuptools import setup |
10 | 5 | import sys, os |
11 | 6 | import glob |
12 | 7 | import platform |
13 | 8 | import re |
14 | 9 |
|
15 | | -# Make distutils copy bpython.py to bpython |
16 | | -copy_file_orig = distutils.file_util.copy_file |
17 | | -copy_tree_orig = distutils.dir_util.copy_tree |
18 | | -def copy_file(src, dst, *args, **kwargs): |
19 | | - if dst.endswith("bin/bpython.py"): |
20 | | - dst = dst[:-3] |
21 | | - return copy_file_orig(src, dst, *args, **kwargs) |
22 | | -def copy_tree(*args, **kwargs): |
23 | | - outputs = copy_tree_orig(*args, **kwargs) |
24 | | - for i in range(len(outputs)): |
25 | | - if outputs[i].endswith("bin/bpython.py"): |
26 | | - outputs[i] = outputs[i][:-3] |
27 | | - return outputs |
28 | | -distutils.file_util.copy_file = copy_file |
29 | | -distutils.dir_util.copy_tree = copy_tree |
30 | | - |
31 | | -PYTHONLIB = os.path.join(get_python_lib(standard_lib=1, prefix=""), |
32 | | - "site-packages") |
33 | | - |
34 | 10 | if platform.system() == 'FreeBSD': |
35 | 11 | man_dir = 'man' |
36 | 12 | else: |
37 | 13 | man_dir = 'share/man' |
38 | 14 |
|
39 | | -setup(name="bpython", |
40 | | - version = "0.6.4", |
41 | | - description = "Fancy Interface to the Python Interpreter", |
42 | | - author = "Robert Anthony Farrell", |
43 | | - author_email = "robertanthonyfarrell@gmail.com", |
44 | | - license = "MIT/X", |
45 | | - url = "http://www.noiseforfree.com/bpython/", |
46 | | - long_description = |
47 | | -"""\ |
48 | | -bpython is a fancy interface to the Python interpreter for Unix-like operating systems. |
49 | | -""", |
50 | | - packages = ["bpython"], |
51 | | - scripts = ["bpython.py"], |
52 | | - data_files = [ |
53 | | - (os.path.join(man_dir, 'man1'), ['doc/bpython.1']), |
54 | | - (os.path.join(man_dir, 'man5'), ['doc/bpythonrc.5']), |
55 | | - ('share/applications', ['data/bpython.desktop']) |
56 | | - ] |
57 | | - ) |
| 15 | +setup( |
| 16 | + name="bpython", |
| 17 | + version = "0.6.4", |
| 18 | + author = "Robert Anthony Farrell", |
| 19 | + author_email = "robertanthonyfarrell@gmail.com", |
| 20 | + description = "Fancy Interface to the Python Interpreter", |
| 21 | + license = "MIT/X", |
| 22 | + url = "http://www.noiseforfree.com/bpython/", |
| 23 | + long_description = """bpython is a fancy interface to the Python interpreter for Unix-like operating systems.""", |
| 24 | + install_requires = [ |
| 25 | + 'pygments', |
| 26 | + 'pyparsing', |
| 27 | + ], |
| 28 | + packages = ["bpython"], |
| 29 | + data_files = [ |
| 30 | + (os.path.join(man_dir, 'man1'), ['doc/bpython.1']), |
| 31 | + (os.path.join(man_dir, 'man5'), ['doc/bpythonrc.5']), |
| 32 | + ('share/applications', ['data/bpython.desktop']) |
| 33 | + ], |
| 34 | + entry_points = { |
| 35 | + 'console_scripts': [ |
| 36 | + 'bpython = bpython.cli:main' |
| 37 | + ], |
| 38 | + } |
| 39 | +) |
| 40 | + |
| 41 | +# vim: encoding=utf-8 sw=4 ts=4 sts=4 ai et sta |
0 commit comments