| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
import sys |
| 13 |
import setuptools |
| 14 |
from setuptools.command.build_py import \ |
| 15 |
build_py as std_build_py |
| 16 |
|
| 17 |
class my_build_py(std_build_py) : |
| 18 |
"customization of build to perform additional validation." |
| 19 |
|
| 20 |
def run(self) : |
| 21 |
try : |
| 22 |
exec \ |
| 23 |
( |
| 24 |
"async def dummy() :\n" |
| 25 |
" pass\n" |
| 26 |
"#end dummy\n" |
| 27 |
) |
| 28 |
except SyntaxError : |
| 29 |
sys.stderr.write("This module requires Python 3.5 or later.\n") |
| 30 |
sys.exit(-1) |
| 31 |
|
| 32 |
super().run() |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
setuptools.setup \ |
| 38 |
( |
| 39 |
name = "DBussy", |
| 40 |
version = "1.3", |
| 41 |
description = "language bindings for libdbus, for Python 3.5 or later", |
| 42 |
long_description = "language bindings for libdbus, for Python 3.5 or later", |
| 43 |
author = "Lawrence D'Oliveiro", |
| 44 |
author_email = "[email protected]", |
| 45 |
url = "https://gitlab.com/ldo/dbussy", |
| 46 |
license = "LGPL v2.1+", |
| 47 |
py_modules = ["dbussy", "ravel"], |
| 48 |
cmdclass = |
| 49 |
{ |
| 50 |
"build_py" : my_build_py, |
| 51 |
}, |
| 52 |
) |