Skip to content
Snippets Groups Projects
Commit c82e5a22 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add python adapter

parent 025327b0
No related branches found
No related tags found
No related merge requests found
/__pycache__
/install
\ No newline at end of file
MOBERG_VERSION=$(shell git describe --tags)
all: BUILD
.PHONY: BUILD
BUILD:
python2 ./setup.py build
python3 ./setup.py build
.PHONY: INSTALL
INSTALL:
MOBERG_VERSION=$(MOBERG_VERSION) python2 \
./setup.py install -O1 --prefix=/usr/ --root=./install
MOBERG_VERSION=$(MOBERG_VERSION) python3 \
./setup.py install -O1 --prefix=/usr/ --root=./install
clean:
rm -rf build install
This diff is collapsed.
#!/usr/bin/env python
from distutils.core import setup, Extension
module = Extension('moberg',
sources = ['python-moberg.c'],
include_dirs=['../..'],
libraries=['moberg'])
longdesc = '''This extension provides bindings to the Moberg I/O library
'''
try:
import os
VERSION=os.environ['MOBERG_VERSION']
except KeyError:
VERSION='_UNKNOWN_'
pass
setup(
name = 'python-moberg',
version = VERSION,
description = 'Python bindings to the Moberg I/O library',
long_description = longdesc,
author = 'Anders Blomdell',
author_email = 'anders.blomdell@control.lth.se',
url = 'http://gitlab.control.lth.se/anders_blomdell/moberg.git',
license = 'GPLv2',
platforms = 'Linux',
ext_modules = [module])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment