diff --git a/.gitignore b/.gitignore index 7b1a5c4..a6bebdd 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,12 @@ var/ .installed.cfg *.egg +# uv +uv.lock +.python-version + +.vscode/ + # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. diff --git a/dev_requirements.txt b/dev_requirements.txt deleted file mode 100644 index b00073a..0000000 --- a/dev_requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ --r requirements.txt - -mock==3.0.5;python_version<"3.3" -pytest==5.3.1;python_version>="3.5" -pytest==4.6.6;python_version<"3.5" -pytest-cov==2.8.1 -Sphinx==2.2.2;python_version>="3.5" -Sphinx==1.8.5;python_version<"3.5" -sphinx-rtd-theme==0.4.3 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2344bff --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[project] +name = "umodbus" +version = "1.0.4" +description = "Implementation of the Modbus protocol in pure Python" +readme = "README.rst" +license="MPL-2.0" +requires-python = ">=3.5,<3.10" +dependencies = [ + "pyserial~=3.4", +] +classifiers=[ + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Software Development :: Embedded Systems", +] +authors= [{name="Auke Willem Oosterhoff", email="a.oosterhoff@climotion.com" }] +[project.urls] +homepage = "https://github.com/AdvancedClimateSystems/uModbus" +source = "https://github.com/AdvancedClimateSystems/uModbus" +issues = "https://github.com/AdvancedClimateSystems/uModbus/issues" +documentation = "https://umodbus.readthedocs.io/en/latest/" + +[dependency-groups] +dev = [ + "pytest==5.3.1", + "pytest-cov==2.8.1", + "sphinx==2.2.2", + "sphinx-rtd-theme==0.4.3", +] + +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages=[ + "umodbus", + "umodbus.client", + "umodbus.client.serial", + "umodbus.server", + "umodbus.server.serial", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 205196f..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pyserial==3.4 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 79bc678..0000000 --- a/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[bdist_wheel] -# This flag says that the code is written to work on both Python 2 and Python -# 3. If at all possible, it is good practice to do this. If you cannot, you -# will need to generate wheels for each Python version that you support. -universal=1 diff --git a/setup.py b/setup.py deleted file mode 100755 index 1c36cb5..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -""" -uModbus is a pure Python implementation of the Modbus protocol with support -for Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. - -""" -import os -from setuptools import setup - -cwd = os.path.dirname(os.path.abspath(__name__)) - -long_description = open(os.path.join(cwd, 'README.rst'), 'r').read() - -setup(name='uModbus', - version='1.0.4', - author='Auke Willem Oosterhoff', - author_email='a.oosterhoff@climotion.com', - description='Implementation of the Modbus protocol in pure Python.', - url='https://github.com/AdvancedClimateSystems/umodbus/', - long_description=long_description, - license='MPL', - packages=[ - 'umodbus', - 'umodbus.client', - 'umodbus.client.serial', - 'umodbus.server', - 'umodbus.server.serial', - ], - install_requires=[ - 'pyserial~=3.4', - ], - classifiers=[ - 'Development Status :: 6 - Mature', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Topic :: Software Development :: Embedded Systems', - ])