From 303620b0a2e9ad4aebc8512ed6ae51e47b608072 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Thu, 18 Aug 2022 23:41:19 -0700 Subject: [PATCH] Move to hatch-based build --- .gitignore | 7 ++++- MANIFEST.in | 3 --- mem_edit/LICENSE.md | 1 + mem_edit/README.md | 1 + mem_edit/VERSION.py | 4 --- mem_edit/__init__.py | 3 +-- pyproject.toml | 54 ++++++++++++++++++++++++++++++++++++++ setup.py | 62 -------------------------------------------- 8 files changed, 63 insertions(+), 72 deletions(-) delete mode 100644 MANIFEST.in create mode 120000 mem_edit/LICENSE.md create mode 120000 mem_edit/README.md delete mode 100644 mem_edit/VERSION.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 6ad846b..ad16919 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,13 @@ .idea/ -__pycache__ +__pycache__/ *.pyc *.egg-info/ build/ dist/ + +.pytest_cache/ +.mypy_cache/ + +*.pickle diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 2b8b271..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include README.md -include LICENSE.md -include mem_edit/VERSION diff --git a/mem_edit/LICENSE.md b/mem_edit/LICENSE.md new file mode 120000 index 0000000..7eabdb1 --- /dev/null +++ b/mem_edit/LICENSE.md @@ -0,0 +1 @@ +../LICENSE.md \ No newline at end of file diff --git a/mem_edit/README.md b/mem_edit/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/mem_edit/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/mem_edit/VERSION.py b/mem_edit/VERSION.py deleted file mode 100644 index e4f476e..0000000 --- a/mem_edit/VERSION.py +++ /dev/null @@ -1,4 +0,0 @@ -""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """ -__version__ = ''' -0.6 -'''.strip() diff --git a/mem_edit/__init__.py b/mem_edit/__init__.py index a4a0178..1052caf 100644 --- a/mem_edit/__init__.py +++ b/mem_edit/__init__.py @@ -17,8 +17,7 @@ from .utils import MemEditError __author__ = 'Jan Petykiewicz' - -from .VERSION import __version__ +__version__ = '0.6' version = __version__ # legacy compatibility diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5c10cab --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "mem_edit" +description = "Multi-platform library for memory editing" +readme = "README.md" +license = { file = "LICENSE.md" } +authors = [ + { name="Jan Petykiewicz", email="jan@mpxd.net" }, + ] +homepage = "https://mpxd.net/code/jan/mem_edit" +repository = "https://mpxd.net/code/jan/mem_edit" +keywords = [ + "memory", + "edit", + "editing", + "ReadProcessMemory", + "WriteProcessMemory", + "proc", + "mem", + "ptrace", + "multiplatform", + "scan", + "scanner", + "search", + "debug", + "cheat", + "trainer", + ] +classifiers = [ + "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", + "Environment :: Other Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Operating System :: POSIX :: Linux", + "Operating System :: Microsoft :: Windows", + "Topic :: Software Development", + "Topic :: Software Development :: Debuggers", + "Topic :: Software Development :: Testing", + "Topic :: System", + "Topic :: Games/Entertainment", + "Topic :: Utilities", + ] +requires-python = ">=3.7" +dynamic = ["version"] +dependencies = [ + ] + +[tool.hatch.version] +path = "mem_edit/__init__.py" + diff --git a/setup.py b/setup.py deleted file mode 100644 index b5a234e..0000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python3 - -from setuptools import setup, find_packages - - -with open('README.md', 'rt') as f: - long_description = f.read() - -with open('mem_edit/VERSION.py', 'rt') as f: - version = f.readlines()[2].strip() - -setup(name='mem_edit', - version=version, - description='Multi-platform library for memory editing', - long_description=long_description, - long_description_content_type='text/markdown', - author='Jan Petykiewicz', - author_email='jan@mpxd.net', - url='https://mpxd.net/code/jan/mem_edit', - keywords=[ - 'memory', - 'edit', - 'editing', - 'ReadProcessMemory', - 'WriteProcessMemory', - 'proc', - 'mem', - 'ptrace', - 'multiplatform', - 'scan', - 'scanner', - 'search', - 'debug', - 'cheat', - 'trainer', - ], - classifiers=[ - 'Programming Language :: Python :: 3', - 'Development Status :: 4 - Beta', - 'Environment :: Other Environment', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU Affero General Public License v3', - 'Operating System :: POSIX :: Linux', - 'Operating System :: Microsoft :: Windows', - 'Topic :: Software Development', - 'Topic :: Software Development :: Debuggers', - 'Topic :: Software Development :: Testing', - 'Topic :: System', - 'Topic :: Games/Entertainment', - 'Topic :: Utilities', - ], - packages=find_packages(), - package_data={ - 'mem_edit': [] - }, - install_requires=[ - 'typing', - ], - extras_require={ - }, - ) -