-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (42 loc) · 1.43 KB
/
setup.py
File metadata and controls
47 lines (42 loc) · 1.43 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
38
39
40
41
42
43
44
45
46
47
import pathlib
from setuptools import setup
from setuptools.dist import Distribution
import os
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
VERSION = (HERE / "version.py").read_text().split()[-1].strip("\"'")
RAYLIB_PLATFORM = os.getenv("RAYLIB_PLATFORM", "Desktop")
if RAYLIB_PLATFORM == "SDL":
NAME = "_sdl"
elif RAYLIB_PLATFORM == "DRM":
NAME = "_drm"
else:
NAME = ""
class BinaryDistribution(Distribution):
"""Distribution which always forces a binary package with platform name"""
def has_ext_modules(foo):
return True
# should be name="raylib"+NAME but then Github doesn't track dependants
setup(
name="raylib"+NAME,
version=VERSION,
description="Python CFFI bindings for Raylib",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/electronstudio/raylib-python-cffi",
author="Electron Studio",
author_email="github@electronstudio.co.uk",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
],
packages=["raylib", "pyray"],
include_package_data=True,
install_requires=["cffi>=1.15.1"],
distclass=BinaryDistribution,
cffi_modules=["raylib/build.py:ffibuilder"]
)