-
Notifications
You must be signed in to change notification settings - Fork 66
/
setup.py
94 lines (78 loc) · 2.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from __future__ import print_function
import sys
import os.path
from setuptools import setup, find_packages
from setuptools.command.install import install
from distutils.core import Command
HACK = 'pdbmm_hijack_pdb.pth'
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
changelog = os.path.join(os.path.dirname(__file__), 'CHANGELOG')
long_description = open(readme).read() + '\n\n' + open(changelog).read()
class install_with_pth(install):
sub_commands = install.sub_commands + [
('install_pth_hack', lambda self:
self.single_version_externally_managed)
]
class install_pth_hack(Command):
user_options = [
('install-dir=', 'd', "directory to install to"),
]
@property
def target(self):
return os.path.join(self.install_dir, HACK)
def get_outputs(self):
return [self.target]
def initialize_options(self):
self.install_dir = None
def finalize_options(self):
self.set_undefined_options(
'install', ('install_lib', 'install_dir'))
def run(self):
with open(HACK) as infp:
with open(self.target, 'w') as outfp:
outfp.write(infp.read())
install_requires = [
"fancycompleter>=0.2",
"wmctrl",
"pygments",
]
if sys.version_info < (2, 7):
install_requires.append("ordereddict")
setup(
name='pdbpp',
use_scm_version=True,
author='Antonio Cuni',
author_email='anto.cuni@gmail.com',
py_modules=['pdb', '_pdbpp_path_hack.pdb'],
url='http://bitbucket.org/antocuni/pdb',
license='BSD',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
description='pdb++, a drop-in replacement for pdb',
long_description=long_description,
keywords='pdb debugger tab color completion',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python',
'Topic :: Utilities',
],
install_requires=install_requires,
extras_require={'funcsigs': ["funcsigs"]},
setup_requires=['setuptools_scm'],
cmdclass={
'install': install_with_pth,
'install_pth_hack': install_pth_hack,
}
)