-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
58 lines (50 loc) · 1.73 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
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext
from acbs import __version__
class get_pybind_include(object):
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
until it is actually installed, so that the ``get_include()``
method can be invoked. """
def __str__(self):
try:
import pybind11
except ImportError:
return None
return pybind11.get_include()
ext_modules = [Extension(
'acbs.miniapt_query', sorted(['src/miniapt-query.cc']),
include_dirs=[get_pybind_include()], extra_link_args=['-lapt-pkg'], language='c++', optional=True
)]
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="acbs",
version=f"0.1.{__version__}",
author="liushuyu",
author_email="[email protected]",
description="AOSC CI Building System",
license="GNU Lesser General Public License v2 (LGPLv2)",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/AOSC-Dev/acbs",
packages=find_packages(),
install_requires=[
"pyparsing>=2.4,<3"
],
extras_require={
"Build logging": ["pexpect"]
},
classifiers=[
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"Operating System :: POSIX :: Linux",
],
python_requires='>=3.6',
ext_modules=ext_modules,
setup_requires=['pybind11>=2.5.0'],
cmdclass={'build_ext': build_ext},
scripts=["acbs-build"]
)