diff --git a/pyproject.toml b/pyproject.toml index 5d155b1..6509a20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["hatchling>=1.20.0"] -build-backend = "hatchling.build" +requires = ["setuptools", "mypy[mypyc]"] +build-backend = "setuptools.build_meta" [project] name = "bgm-tv-wiki" @@ -30,7 +30,6 @@ mypy = [ dev = [ 'bgm-tv-wiki[mypy]', - "pytest==8.3.3", "pytest-github-actions-annotate-failures==0.2.0", "coverage==7.6.3", @@ -41,31 +40,9 @@ dev = [ [project.urls] -[tool.hatch.build.targets.sdist] -sources = ['src/'] -include = ['src/'] - -[tool.hatch.build.targets.wheel] -packages = ["src/bgm_tv_wiki"] -include = ['src/*'] - -[tool.hatch.build.targets.wheel.hooks.mypyc] -# for pure python wheel -enable-by-default = false -feature = ['mypy'] -dependencies = [ - "hatch-mypyc", -] -mypy-args = [ - "--disallow-untyped-defs", -] - [tool.cibuildwheel] skip = "pp* *musllinux*" -[tool.cibuildwheel.environment] -HATCH_BUILD_HOOKS_ENABLE = "1" - [tool.pytest.ini_options] addopts = '-rav -Werror' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..064ad62 --- /dev/null +++ b/setup.py @@ -0,0 +1,14 @@ +from mypyc.build import mypycify +from setuptools import setup + +setup( + name="bgm_tv_wiki", + package_dir={"": "src"}, + packages=["bgm_tv_wiki"], + ext_modules=mypycify( + [ + "--disallow-untyped-defs", # mypy flag + "src/", + ] + ), +) diff --git a/src/bgm_tv_wiki/__.py b/src/bgm_tv_wiki/__.py deleted file mode 100644 index e65db49..0000000 --- a/src/bgm_tv_wiki/__.py +++ /dev/null @@ -1 +0,0 @@ -# workaround for https://github.com/ofek/hatch-mypyc/issues/40