File: setup.py

package info (click to toggle)
python-ptrace 0.6.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 572 kB
  • ctags: 770
  • sloc: python: 6,126; ansic: 237; makefile: 23; sh: 6
file content (64 lines) | stat: -rwxr-xr-x 1,803 bytes parent folder | download
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
#!/usr/bin/env python

# Produce to release a new version:
#  - check version in ptrace/version.py
#  - set release date in the ChangeLog
#  - create a Mercurial tag
#  - push the Mercurial
#  - run ./setup.py register sdist upload
#
# After the release:
#  - set version to n+1 (ptrace/version.py)
#  - add a new empty section in the changelog for version n+1

MODULES = ["ptrace", "ptrace.binding", "ptrace.syscall", "ptrace.debugger"]

SCRIPTS = ("strace.py", "gdb.py")

CLASSIFIERS = [
    'Intended Audience :: Developers',
    'Development Status :: 4 - Beta',
    'Environment :: Console',
    'License :: OSI Approved :: GNU General Public License (GPL)',
    'Operating System :: OS Independent',
    'Natural Language :: English',
    'Programming Language :: Python',
]

LONG_DESCRIPTION = open('README').read() + open('ChangeLog').read()

def main():
    from imp import load_source
    from os import path
    from sys import argv

    if "--setuptools" in argv:
        argv.remove("--setuptools")
        from setuptools import setup
    else:
        from distutils.core import setup

    ptrace = load_source("version", path.join("ptrace", "version.py"))
    PACKAGES = {}
    for name in MODULES:
        PACKAGES[name] = name.replace(".", "/")

    install_options = {
        "name": ptrace.PACKAGE,
        "version": ptrace.VERSION,
        "url": ptrace.WEBSITE,
        "download_url": ptrace.WEBSITE,
        "author": "Victor Stinner",
        "description": "python binding of ptrace",
        "long_description": LONG_DESCRIPTION,
        "classifiers": CLASSIFIERS,
        "license": ptrace.LICENSE,
        "packages": PACKAGES.keys(),
        "package_dir": PACKAGES,
        "scripts": SCRIPTS,
    }
    setup(**install_options)

if __name__ == "__main__":
    main()