Commit c7b5d739 authored by alina's avatar alina

Validation of linux kernel version in setup.py

parent 5fab780a
......@@ -2,6 +2,14 @@
# vim: set fileencoding=utf-8
# vim: ts=4:sw=4:et:ai:sts=4
from distutils.core import setup, Extension, Command
import platform
# CHECK dependencies
# Linux kernel >= 2.6.36
l = platform.uname()[2].split("-")[0].split(".")
l.reverse()
if sum( int(l[i])*pow(10,i) for i in xrange(len(l))) < 296:
raise RuntimeError("Linux kernel >= 2.6.36 is required")
setup(
name = 'netns',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment