-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
37 lines (32 loc) · 1.06 KB
/
setup.py
File metadata and controls
37 lines (32 loc) · 1.06 KB
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
import platform
import sys
from setuptools import setup, Extension
if sys.platform != "win32" and platform.python_implementation() == "CPython":
try:
import wheel.bdist_wheel
except ImportError:
cmdclass = {}
else:
class bdist_wheel(wheel.bdist_wheel.bdist_wheel):
def finalize_options(self) -> None:
self.py_limited_api = f"cp3{sys.version_info[1]}"
super().finalize_options()
cmdclass = {"bdist_wheel": bdist_wheel}
else:
cmdclass = {}
setup(
name="ojichat",
author="Lapis256",
version="1.0.0",
license="MIT",
url="https://github.com/Lapis256/ojichat-python",
description="ojichatのPythonラッパーです",
python_requires=">=3.6.1",
setup_requires=["setuptools-golang"],
build_golang={"root": "github.com/Lapis256/ojichat-python"},
ext_modules=[Extension(
"ojichat", ["ojichat/ojichat.go"],
py_limited_api=True, define_macros=[("Py_LIMITED_API", None)],
)],
cmdclass=cmdclass
)