Skip to content

Commit 8d7b136

Browse files
authored
Merge pull request #1 from ndc-dev/chore/pyproject-toml
setup.py から pyproject.toml (PEP 621) へ移行
2 parents 8801d53 + 338e26e commit 8d7b136

3 files changed

Lines changed: 40 additions & 29 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ NDC Parser for developer
44

55
## Install
66

7-
pip install ndc_parser
7+
pip install ndc-parser
88

99
## Sample
1010
[sample.py](https://github.com/ndc-dev/python-parser/blob/master/sample.py)
@@ -13,5 +13,6 @@ pip install ndc_parser
1313
[https://github.com/ndc-dev/api](https://github.com/ndc-dev/api)
1414

1515
## build
16-
pip install wheel
17-
python setup.py bdist_wheel
16+
uv build
17+
18+
`dist/` に sdist と wheel が出力される。

pyproject.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[project]
2+
# PyPI 上のバージョンは 0.1 のまま据え置く。README 経由の long_description や
3+
# 依存ゼロという構成は setup.py 時代から変えていないので、公開済みの
4+
# ndc_parser-0.1-py3-none-any.whl と中身が一致する状態を維持している。
5+
name = "ndc-parser"
6+
version = "0.1"
7+
description = "NDC Parser"
8+
readme = "README.md"
9+
requires-python = ">=3.10"
10+
license = "MIT"
11+
license-files = ["LICENSE.txt"]
12+
authors = [{ name = "CALIL Inc.", email = "info@calil.jp" }]
13+
keywords = ["NDC", "Nippon Decimal Classification", "Parser"]
14+
classifiers = [
15+
"Development Status :: 3 - Alpha",
16+
"Intended Audience :: Developers",
17+
"Natural Language :: Japanese",
18+
"Programming Language :: Python :: 3",
19+
"Topic :: Text Processing :: Markup",
20+
]
21+
22+
[project.urls]
23+
Homepage = "https://github.com/ndc-dev/python-parser"
24+
Repository = "https://github.com/ndc-dev/python-parser"
25+
26+
[build-system]
27+
requires = ["hatchling"]
28+
build-backend = "hatchling.build"
29+
30+
# zips/(NDC の TTL、約1.9MB)と sample.py は配布物に含めない。
31+
# sample.py は README から GitHub 上のリンクとして案内している。
32+
[tool.hatch.build.targets.wheel]
33+
packages = ["ndc_parser"]
34+
35+
[tool.hatch.build.targets.sdist]
36+
include = ["ndc_parser", "README.md", "LICENSE.txt"]

setup.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)