Move from depreciated setup.py to pyproject.toml

This commit is contained in:
Bjoern Kerler 2023-12-14 14:09:04 +01:00
parent a9f222320a
commit 30b53348cc
9 changed files with 36 additions and 44 deletions

6
.flake8 Normal file
View file

@ -0,0 +1,6 @@
[flake8]
max-line-length = 255
exclude = .git,__pycache__,doc/,docs/,build/,dist/,archive/
#per-file-ignores =
# __init__.py:F401

View file

@ -55,16 +55,14 @@ yay -S python python-pip git libusb
```
git clone https://github.com/bkerler/mtkclient
cd mtkclient
pip3 install -r requirements.txt
python3 setup.py build
python3 setup.py install
pip3 install .
```
#### Install rules
```
sudo usermod -a -G plugdev $USER
sudo usermod -a -G dialout $USER
sudo cp Setup/Linux/*.rules /etc/udev/rules.d
sudo cp mtkclient/Setup/Linux/*.rules /etc/udev/rules.d
sudo udevadm control -R
```
Make sure to reboot after adding the user to dialout/plugdev. If the device
@ -76,7 +74,7 @@ the "/etc/modprobe.d/blacklist.conf".
### Windows
#### Install python + git
- Install python 3.9 and git
- Install python >= 3.9 and git
- If you install python from microsoft store, "python setup.py install" will fail, but that step isn't required.
- WIN+R ```cmd```

View file

@ -6,8 +6,15 @@ requires = [
build-backend = "setuptools.build_meta"
[project]
name="mtkclient"
version="1.6.3"
name = "mtkclient"
description = "Mediatek reverse engineering and flashing tools"
maintainers = [
{name = "Bjoern Kerler", email = "info@revskills.de"}
]
readme = "README.md"
license = {file = "LICENSE"}
version = "1.6.3"
requires-python = ">= 3.8"
dependencies = [
"pyusb",
"pycryptodome",
@ -16,3 +23,21 @@ dependencies = [
"pyside6",
"mock"
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GPLv3 License",
"Operating System :: OS Independent",
]
keywords = ["mediatek", "mtk", "flashing", "reverse engineering", "firmware"]
[project.urls]
Repository = "https://github.com/bkerler/mtkclient.git"
Issues = "https://github.com/bkerler/mtkclient/issues"
[project.scripts]
mtk = "mtk:main"
stage2 = "stage2:main"
[project.gui-scripts]
mtk_gui = "mtk_gui:main"

View file

@ -1,2 +0,0 @@
[metadata]
license_files = LICENSE

View file

@ -1,35 +0,0 @@
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
packages=find_packages(),
long_description=open("README.md").read(),
scripts=['mtk','stage2'],
data_files = ['LICENSE','README.md'],
long_description_content_type="text/markdown",
url='https://github.com/bkerler/mtkclient',
project_urls={
"Bug Tracker": "https://github.com/bkerler/mtkclient/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GPLv3 License",
"Operating System :: OS Independent",
],
license='GPLv3 License',
install_requires=[
'colorama',
'pyusb',
'pyserial',
'pycryptodome',
'pycryptodomex',
'PySide6',
'mock'
],
author='B. Kerler',
author_email='info@revskills.de',
description='Mediatek reverse engineering and flashing tools',
python_requires=">=3.7",
include_package_data=True,
zip_safe=False
)