-
Notifications
You must be signed in to change notification settings - Fork 63
/
setup.py
31 lines (29 loc) · 1.22 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
# python3 setup.py build
# python3 setup.py sdist upload
from setuptools import setup, Extension
from distutils.command.build import build
import os, platform
class my_build(build):
def run(self):
if platform.system() == 'Darwin':
os.system("cp -f mercuryapi_osx.patch mercuryapi.patch")
os.system("make mercuryapi")
build.run(self)
setup(name="python-mercuryapi", version="0.5.4",
author="Petr Gotthard",
author_email="[email protected]",
description="Python wrapper for the ThingMagic Mercury API",
long_description=open('long_description.txt').read(),
url="https://github.com/gotthardp/python-mercuryapi",
classifiers=[
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta"
],
cmdclass={'build': my_build},
ext_modules=[Extension("mercury",
sources=["mercury.c"],
libraries=["mercuryapi", "ltkc", "ltkctm"],
include_dirs=['build/mercuryapi/include'],
library_dirs=['build/mercuryapi/lib'])])