Skip to content

Commit 14be6af

Browse files
committed
Migrate setup.cfg options to pyproject.toml
1 parent 7ff4342 commit 14be6af

File tree

3 files changed

+39
-32
lines changed

3 files changed

+39
-32
lines changed

pyproject.toml

+38-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,44 @@
1+
[project]
2+
name = "pypcode"
3+
description = "Machine code disassembly and IR translation library"
4+
license = { file = "LICENSE.txt" }
5+
readme = { file = "README.md", content-type = "text/markdown" }
6+
classifiers = [
7+
"Programming Language :: Python",
8+
"Programming Language :: Python :: 3",
9+
"Programming Language :: Python :: 3 :: Only",
10+
"Programming Language :: Python :: 3.10",
11+
"Programming Language :: Python :: 3.11",
12+
"Programming Language :: Python :: 3.12",
13+
"Programming Language :: Python :: 3.13",
14+
]
15+
requires-python = ">=3.10"
16+
dynamic = [ "version" ]
17+
18+
[project.urls]
19+
Homepage = "https://api.angr.io/projects/pypcode/en/latest/"
20+
Repository = "https://github.com/angr/pypcode"
21+
22+
[project.optional-dependencies]
23+
docs = [
24+
"furo",
25+
"ipython",
26+
"myst-parser",
27+
"sphinx",
28+
"sphinx-autodoc-typehints",
29+
]
30+
131
[build-system]
2-
requires = ["setuptools", "nanobind", "cmake"]
32+
requires = [ "setuptools", "nanobind", "cmake" ]
333
build-backend = "setuptools.build_meta"
434

35+
[tool.setuptools]
36+
dynamic = { version = { attr = "pypcode.__version__.__version__" } }
37+
packages = [ "pypcode" ]
38+
ext-modules = [
39+
{ name = "pypcode.pypcode_native", sources = [] }
40+
]
41+
542
[tool.black]
643
line-length = 120
744
target-version = ['py38']

setup.cfg

-29
This file was deleted.

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import struct
77
import subprocess
88
import sys
9-
from setuptools import setup, Extension
9+
from setuptools import setup
1010
from setuptools.command.build_ext import build_ext
1111

1212

@@ -96,7 +96,6 @@ def add_pkg_data_dirs(pkg, dirs):
9696

9797

9898
setup(
99-
ext_modules=[Extension(name="pypcode_native", sources=[])],
10099
package_data={
101100
"pypcode": add_pkg_data_dirs("pypcode", ["bin", "docs", "processors"]) + ["py.typed", "pypcode_native.pyi"]
102101
},

0 commit comments

Comments
 (0)