forked from ctypesgen/ctypesgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·60 lines (52 loc) · 2.11 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
#!/usr/bin/env python3
# -*- coding: us-ascii -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
"""Examples:
setup.py sdist
setup.py bdist_wininst
"""
import os
from setuptools import setup, find_packages
THIS_DIR = os.path.dirname(__file__)
import ctypesgen
ctypesgen.version.write_version_file()
VERSION_FILE = os.path.relpath(ctypesgen.version.VERSION_FILE, THIS_DIR)
f = open("MANIFEST.in", "w")
f.write("include {}\n".format(VERSION_FILE))
f.write("graft ctypesgen\n")
f.write("recursive-exclude ctypesgen .gitignore\n")
f.close()
try:
setup(
name="ctypesgen",
version=ctypesgen.VERSION.partition("-g")[0],
description="Python wrapper generator for ctypes",
long_description="ctypesgen reads parses c header files and creates a wrapper for "
"libraries based on what it finds. Preprocessor macros are handled "
"in a manner consistent with typical c code. Preprocessor macro "
"functions are translated into Python functions that are then made "
"available to the user of the newly-generated Python wrapper "
"library.\n"
"ctypesgen can also output JSON, which can be used with Mork, "
"which generates bindings for Lua, using the alien module (which "
"binds libffi to Lua).",
long_description_content_type="text/plain",
url="https://github.com/davidjamesca/ctypesgen",
license="BSD License",
packages=find_packages(),
include_package_data=True,
classifiers=[
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Pre-processors",
"Topic :: Software Development :: Build Tools",
],
entry_points={"console_scripts": ["ctypesgen = ctypesgen.main:main"]},
)
finally:
os.unlink("MANIFEST.in")