-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
59 lines (48 loc) · 1.37 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
#!/usr/bin/env python
import subprocess
from setuptools import setup, Command, Extension
from Cython.Build import cythonize
class BuildPictCommand(Command):
description = 'build PICT shared library'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
subprocess.check_call(['make', '-C', 'pict', 'clean'])
subprocess.check_call(['make', '-C', 'pict', 'libpict.so'])
subprocess.check_call(['make', '-C', 'pict', 'pict'])
with open('pypict/_version.py') as f:
exec(f.read())
setup(
name='pypict',
version=__version__, # NOQA
description='pypict: Python binding for Microsoft PICT',
long_description=open('README.rst').read(),
author='Kenichi Maehashi',
author_email='[email protected]',
url='https://github.com/kmaehashi/pypict',
license='MIT License',
packages=[
'pypict',
],
test_suite='tests',
python_requires='>=3.7',
ext_modules=cythonize(
Extension(
'pypict.capi',
['pypict/capi.pyx'],
include_dirs=['pict/api'],
library_dirs=['pict'],
libraries=['pict'],
),
language_level=3,
),
package_data={
'pypict': ['py.typed', 'capi.pyi'],
},
cmdclass={
'build_pict': BuildPictCommand
},
)