File: setup.py

package info (click to toggle)
tnetstring 0.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 164 kB
  • sloc: ansic: 1,099; python: 446; makefile: 5
file content (76 lines) | stat: -rw-r--r-- 1,812 bytes parent folder | download | duplicates (3)
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
#
#  This is the tnetstring setuptools script.
#  Originally developed by Ryan Kelly, 2011.
#
#  This script is placed in the public domain.
#  If there's no public domain where you come from,
#  you can use it under the MIT license.
#

import sys
setup_kwds = {}
if sys.version_info > (3,):
    from setuptools import setup, Extension
    setup_kwds["test_suite"] = "tnetstring.test"
    setup_kwds["use_2to3"] = True
else:
    from distutils.core import setup, Extension


try:
    next = next
except NameError:
    def next(i):
        return i.next()


info = {}
try:
    src = open("tnetstring/__init__.py")
    lines = []
    ln = next(src)
    while "__version__" not in ln:
        lines.append(ln)
        ln = next(src)
    while "__version__" in ln:
        lines.append(ln)
        ln = next(src)
    exec("".join(lines),info)
except Exception:
    pass


NAME = "tnetstring"
VERSION = info["__version__"]
DESCRIPTION = "data serialization using typed netstrings"
LONG_DESC = info["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="http://github.com/rfk/tnetstring"
LICENSE = "MIT"
KEYWORDS = "netstring serialize"
CLASSIFIERS = [
    "Programming Language :: Python",
    "Programming Language :: Python :: 2",
    #"Programming Language :: Python :: 3",
    "Development Status :: 4 - Beta",
    "License :: OSI Approved :: MIT License"
]

setup(name=NAME,
      version=VERSION,
      author=AUTHOR,
      author_email=AUTHOR_EMAIL,
      url=URL,
      description=DESCRIPTION,
      long_description=LONG_DESC,
      license=LICENSE,
      keywords=KEYWORDS,
      packages=["tnetstring","tnetstring.tests"],
      ext_modules = [
          Extension(name="_tnetstring",sources=["tnetstring/_tnetstring.c"]),
      ],
      classifiers=CLASSIFIERS,
      **setup_kwds
     )