-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
executable file
·50 lines (42 loc) · 1.31 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
#!/usr/bin/python
from setuptools import setup
from setuptools import find_packages
from setuptools import Extension
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
__module__ = 'adbus'
__url__ = 'https://github.com/ccxtechnologies'
__version__ = None
exec(open(f'{__module__}/__version__.py').read())
ext = '.pyx' if USE_CYTHON else '.c'
module = [
Extension(
f"{__module__}.sdbus",
sources=[f"{__module__}/sdbus" + ext],
libraries=["systemd"],
extra_compile_args=["-O3", "-std=c99"], # match systemd
)
]
if USE_CYTHON:
module = cythonize(module)
setup(
name=__module__,
version=__version__,
author='CCX Technologies',
author_email='charles@ccxtechnologies.com',
description='asyncio based dbus interface',
long_description=open('README.rst', 'rt').read(),
license='MIT',
url=f'{__url__}/{__module__}',
download_url=f'{__url__}/archive/v{__version__}.tar.gz',
python_requires='>=3.7',
packages=find_packages(exclude=["tests"]),
setup_requires=[
'setuptools>=18.0', # Handles Cython extensions natively
'cython>=0.25.2',
],
ext_modules=module,
)