File: setup.py

package info (click to toggle)
tnetstring3 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 192 kB
  • sloc: ansic: 945; python: 391; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download | duplicates (2)
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
from setuptools import setup, Extension

def get_info():
    info = {}
    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)
    return info

info = get_info()

setup(name="tnetstring3",
      version=info["__version__"],
      author="Carlo Pires",
      author_email="carlopires@gmail",
      url="http://github.com/carlopires/tnetstring3",
      description="Super fast data serialization for Python 3",
      long_description=info["__doc__"],
      license="MIT",
      keywords="netstring serialization",
      packages=["tnetstring"],
      ext_modules = [
          Extension(name="_tnetstring", sources=["tnetstring/_tnetstring.c"]),
      ],
      classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Development Status :: 4 - Beta",
        "License :: OSI Approved :: MIT License"
        ],
      test_suite='tests.suite'
     )