-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- poetryで作成したsrcパッケージがコンパイルできないため、setuptoolsに戻す
- Loading branch information
1 parent
792f967
commit bcd06bd
Showing
3 changed files
with
69 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools", "cython", "numpy", "poetry_core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "cshogi" | ||
version = "0.7.8" | ||
license = "GPL-v3" | ||
authors = ["Tadao Yamaoka <[email protected]>"] | ||
maintainers = ["Tadao Yamaoka <[email protected]>"] | ||
description = "A fast Python shogi library" | ||
repository = "https://github.com/TadaoYamaoka/cshogi" | ||
homepage = "https://github.com/TadaoYamaoka/cshogi" | ||
|
||
packages = [{ include = "cshogi" }] | ||
exclude = ["docs/*", "build/*", "test/*", "test_cpp/*", ".mypy_cache/*"] | ||
|
||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: GNU General Public License (GPL)", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
[tool.poetry.build] | ||
script = "build.py" | ||
generate-setup-file = true | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.6" | ||
numpy = [ | ||
{ version = "~1.26.0", python = "^3.12" }, | ||
{ version = "*", python = ">=3.8,<3.12" }, | ||
{ version = "~1.21.6", python = "=3.7" }, | ||
{ version = "~1.19.5", python = "=3.6" }, | ||
] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
setuptools = "^57.4.0" | ||
cython = "0.29.22" | ||
twine = "*" | ||
requires = ["setuptools>=57.4.0", "cython==0.29.22", "numpy"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from setuptools import setup | ||
from Cython.Build import build_ext, cythonize | ||
from setuptools import Extension | ||
|
||
|
@@ -81,12 +82,41 @@ def finalize_options(self): | |
] | ||
|
||
|
||
def build(setup_kwargs): | ||
setup_kwargs.update( | ||
{ | ||
"ext_modules": cythonize(ext_modules, language_level="3"), | ||
"cmdclass": {"build_ext": MyBuildExt}, | ||
"package_data": {"cshogi.web.templates": ["*"], "cshogi.web.static": ["*"]}, | ||
"extras_require": {"web": ["flask", "portpicker"]}, | ||
} | ||
) | ||
packages = [ | ||
"cshogi", | ||
"cshogi.dlshogi", | ||
"cshogi.gym_shogi", | ||
"cshogi.gym_shogi.envs", | ||
"cshogi.usi", | ||
"cshogi.web", | ||
] | ||
|
||
package_data = {"": ["*"], "cshogi.web": ["static/*", "templates/*"]} | ||
|
||
extras_require = { | ||
':python_version == "3.6"': ["numpy>=1.19.5,<1.20.0"], | ||
':python_version == "3.7"': ["numpy>=1.21.6,<1.22.0"], | ||
':python_version >= "3.12" and python_version < "4.0"': ["numpy>=1.26.0,<1.27.0"], | ||
':python_version >= "3.8" and python_version < "3.12"': ["numpy"], | ||
"web": ["flask", "portpicker"], | ||
} | ||
|
||
setup_kwargs = { | ||
"name": "cshogi", | ||
"version": "0.7.9", | ||
"description": "A fast Python shogi library", | ||
"long_description": None, | ||
"author": "Tadao Yamaoka", | ||
"author_email": "[email protected]", | ||
"maintainer": "Tadao Yamaoka", | ||
"maintainer_email": "[email protected]", | ||
"url": "https://github.com/TadaoYamaoka/cshogi", | ||
"packages": packages, | ||
"package_data": package_data, | ||
"extras_require": extras_require, | ||
"python_requires": ">=3.6", | ||
"ext_modules": cythonize(ext_modules, language_level="3"), | ||
"cmdclass": {"build_ext": MyBuildExt}, | ||
} | ||
|
||
setup(**setup_kwargs) |