Skip to content

Commit

Permalink
build: why use hatch anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Oct 17, 2024
1 parent 4e79961 commit ab68de7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
27 changes: 2 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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'

Expand Down
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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/",
]
),
)
1 change: 0 additions & 1 deletion src/bgm_tv_wiki/__.py

This file was deleted.

0 comments on commit ab68de7

Please sign in to comment.