From 9fc489e5a30493ba340fe263a4bcfda1ccf96dad Mon Sep 17 00:00:00 2001 From: yfh01 <987751945@qq.com> Date: Thu, 25 Jan 2024 15:59:43 +0800 Subject: [PATCH] feat: Adopt pyproject.toml for Project Improvement --- pyproject.toml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 40 ---------------------------------------- 2 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 pyproject.toml delete mode 100755 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..817b0be --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "opcodes" +authors = [ + { name = "Marat Dukhan", email = "maratek@gmail.com" }, +] +maintainers = [ + { name = "Marat Dukhan" }, +] +dynamic = ["version", "readme", "dependencies"] +license = { file = "LICENSE", content-type = "text/plain" } +description = "Database of Processor Instructions/Opcodes" +requires-python = ">=3.7" +keywords = ["assembly", "assembler", "asm", "opcodes", "x86", "x86-64", "isa", "cpu"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Assembly", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering", + "Topic :: Software Development", + "Topic :: Software Development :: Assemblers", + "Topic :: Software Development :: Documentation" +] +scripts = { "bilibili-api-docs" = " bilibili_api.tools.opendocs.__main__:main", "ivitools" = "bilibili_api.tools.ivitools.__main__:main" } + +[tool.setuptools.dynamic] +version = { attr = "opcodes.__version__" } +readme = { file = ["README.md"], content-type = "text/markdown" } +dependencies = { file = ["requirements.txt"] } + +[tool.setuptools] +packages = [ + "opcodes", +] + +[tool.setuptools.package-data] +"opcodes" = [ + "x86.xml", + "x86_64.xml", + "k1om.xml" +] diff --git a/setup.py b/setup.py deleted file mode 100755 index 3cdeb10..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/python - -from opcodes import __version__, __author__, __email__ -from setuptools import setup - - -def read_text_file(path): - import os - with open(os.path.join(os.path.dirname(__file__), path)) as f: - return f.read() - - -setup( - name="opcodes", - version=__version__, - description="Database of Processor Instructions/Opcodes", - long_description=read_text_file("README.md"), - long_description_content_type='text/markdown', - author=__author__, - author_email=__email__, - url="https://github.com/Maratyszcza/Opcodes", - packages=["opcodes"], - package_data={"opcodes": ["x86.xml", "x86_64.xml", "k1om.xml"]}, - keywords=["assembly", "assembler", "asm", "opcodes", "x86", "x86-64", "isa", "cpu"], - install_requires=["setuptools"], - requires=[], - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Assembly", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering", - "Topic :: Software Development", - "Topic :: Software Development :: Assemblers", - "Topic :: Software Development :: Documentation" - ])