-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
91 lines (74 loc) · 2.28 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
from setuptools import setup, find_packages
import sys
import os
NAME = "libzfs"
VERBOSE_NAME = "libzfs"
DESC = """
Python CFFI bindings for libzfs
"""
AUTHOR_NAME = "Steven 'Xaroth' Noorbergen"
AUTHOR_EMAIL = "[email protected]"
AUTHOR_URL = "https://github.com/Xaroth/libzfs-python"
classes = """
Development Status :: 2 - Pre-Alpha
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Operating System :: POSIX
Operating System :: Unix
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Programming Language :: Python :: Implementation :: Jython
Topic :: Software Development :: Libraries :: Python Modules
Topic :: System :: Systems Administration
Topic :: Utilities
"""
classifiers = [s.strip() for s in classes.split('\n') if s]
PY3 = sys.version_info[0] == 3
JYTHON = sys.platform.startswith('java')
PYPY = hasattr(sys, 'pypy_version_info')
def strip_comments(l):
return l.split('#', 1)[0].strip()
def reqs():
try:
return [
r for r in (
strip_comments(l) for l in open(
os.path.join(os.getcwd(), 'requirements.txt')).readlines()
) if r]
except:
return []
install_requires = reqs()
entrypoints = {}
extra = {}
console_scripts = entrypoints['console_scripts'] = [
]
import libzfs
VERSION = libzfs.__version__
if os.environ.get('SETUP_NORUN'):
setup = lambda *args, **kwargs: None # noqa
setup(
name=NAME,
version=VERSION,
description=DESC,
author=AUTHOR_NAME,
author_email=AUTHOR_EMAIL,
url=AUTHOR_URL,
platforms=['any'],
license='MIT License',
packages=find_packages(exclude=['test', 'test.*', 'docs', 'docs.*']),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
classifiers=classifiers,
entry_points=entrypoints,
long_description=DESC,
extras_require={},
setup_requires=["cffi>=1.0.0"],
cffi_modules=['build_bindings.py:ffi'],
**extra)