From e59ab270fc578111596725444e4c60e6f8217c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sotetsu=20KOYAMADA=EF=BC=88=E5=B0=8F=E5=B1=B1=E7=94=B0?= =?UTF-8?q?=E5=89=B5=E5=93=B2=EF=BC=89?= Date: Sun, 21 Aug 2022 18:17:27 +0900 Subject: [PATCH] Fix build and checks (#1099) * fix setup.py * fix check --- pyproject.toml | 3 +-- setup.py | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c13bb3651..6768bddd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,7 @@ requires = [ "setuptools>=42", "wheel", "ninja; sys_platform != 'win32' and platform_machine != 'arm64'", - "cmake>=3.12", -] + "cmake>=3.12"] build-backend = "setuptools.build_meta" [tool.black] diff --git a/setup.py b/setup.py index 75696ce44..f4ad5ed3f 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ import subprocess import sys +from pathlib import Path from setuptools import Extension, find_packages, setup from setuptools.command.build_ext import build_ext @@ -129,6 +130,9 @@ def build_extension(self, ext): subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=self.build_temp) +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text() + # The information here can also be placed in setup.cfg - better separation of # logic and declaration, and simpler if you include description/version in a file. setup( @@ -137,7 +141,8 @@ def build_extension(self, ext): author="Mjx Project Team", author_email="koyamada-s@sys.i.kyoto-u.ac.jp", description="", - long_description="", + long_description=long_description, + long_description_content_type='text/markdown', packages=find_packages("."), package_dir={"": "."}, package_data={"mjx": ["visualizer/*.svg", "visualizer/GL-MahjongTile.ttf"]},