forked from ldo/qahirah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (42 loc) · 1.13 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
#+
# Distutils script to install qahirah. Invoke from the command line
# in this directory as follows:
#
# python3 setup.py build
# sudo python3 setup.py install
#
# Written by Lawrence D'Oliveiro <[email protected]>.
#-
import sys
import distutils.core
from distutils.command.build import \
build as std_build
class my_build(std_build) :
"customization of build to perform additional validation."
def run(self) :
try :
class dummy :
pass
#end dummy
dummy.__doc__ = "something"
except AttributeError :
sys.stderr.write("This module requires Python 3.3 or later.\n")
sys.exit(-1)
#end try
super().run()
#end run
#end my_build
distutils.core.setup \
(
name = "Qahirah",
version = "1.0",
description = "language bindings for the Cairo graphics library, for Python 3.3 or later",
author = "Lawrence D'Oliveiro",
author_email = "[email protected]",
url = "https://github.com/ldo/qahirah",
py_modules = ["qahirah"],
cmdclass =
{
"build" : my_build,
},
)