forked from picotech/picosdk-python-wrappers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupPicosynth.py
36 lines (31 loc) · 948 Bytes
/
setupPicosynth.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
#
# Copyright (C) 2017-2018 Pico Technology Ltd.
#
from __future__ import print_function
from distutils.core import setup
import ctypes
from ctypes import *
from ctypes.util import find_library
import sys
import os.path
signalfile = ".sdkwarning"
if not os.path.exists(signalfile):
name = 'picosynth'
try:
if sys.platform == 'win32':
result = ctypes.WinDLL(find_library(name))
print(result)
else:
result = cdll.LoadLibrary(find_library(name))
except OSError:
print("Please install PicoSynth software in order to use this wrapper."
"Visit https://www.picotech.com/downloads")
exit(1)
open(signalfile, 'a').close()
setup(name='PicoSDK',
version='1.0',
description='PicoSDK Python wrapper',
author='Pico Technology Ltd',
author_email='[email protected]',
url='https://www.picotech.com',
packages=['picosdk'])