-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
48 lines (42 loc) · 1.33 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
import os
import subprocess
from setuptools import setup
"""python-ebtables setup script"""
import ebtables
long_description = """Ebtables is used for Ethernet bridge frame table
administration on Linux. Python-ebtables is a simple Python binding for
Ebtables."""
try:
create_rst = True
if os.path.exists('README.rst'):
s1 = os.stat('README.md')
s2 = os.stat('README.rst')
if s1.st_mtime <= s2.st_mtime:
create_rst = False
if create_rst:
rc = subprocess.call(['pandoc',
'-o', 'README.rst',
'-f', 'markdown',
'-t', 'rst',
'README.md'],
shell=False,
stdout=subprocess.PIPE)
if rc == 0:
with open('README.rst') as f:
long_description = f.read()
except:
pass
setup(
name='ebtables',
version=ebtables.__version__,
author='Vilmos Nebehaj',
author_email='v.nebehaj@gmail.com',
url='/~https://github.com/ldx/python-ebtables',
description='Linux Ebtables bindings',
long_description=long_description,
py_modules=['ebtables'],
setup_requires=['cffi'],
install_requires=['cffi'],
ext_modules=[ebtables.ffi.verifier.get_extension()],
zip_safe=False,
)