From 9b93a79f7715b672179100ba30e7eff26e48cbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C3=A1kona?= Date: Fri, 1 Nov 2024 23:54:03 +0100 Subject: [PATCH] Update installation procedure and documentation. --- README.md | 6 ++++-- pyproject.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/README.md b/README.md index 0f80ba0..09fc78a 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,13 @@ Dependencies are also available on pip (useful on systems without native package The latest version of pymlab library use true I²C transfers instead of SMBus transfers. It is needed by some sensors. Namely by SHT31, SHT25 etc. Therefore an updated version of i2c-tools and python-smbus module is needed for correct working of pymlab library and some examples. The latest version of python-smbus could be installed from [this fork of i2c-tools](https://github.com/MLAB-project/i2c-tools). -### Install in to Ubuntu python system +### Install in to Ubuntu venv system + +Create venv by `python3 -m ven .venv` then activate it using `source .venv/bin/activate` in the python enviroment you can install the pymlab library: $ git clone https://github.com/MLAB-project/pymlab $ cd pymlab/ - $ sudo python3 setup.py develop + $ pip install -e . #### HIDAPI interface for the USBI2C01A MLAB module (Optional support) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..20435c3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,44 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "pymlab" +dynamic = ["version"] +description = "Toolbox for interfacing I2C sensors." +readme = "README.md" +license = {text = "Lesser General Public License v3"} +authors = [ + {name = "Jan Milík", email = "milikjan@fit.cvut.cz"}, + {name = "Roman Dvořák", email = "romandvorak@mlab.cz"}, + {name = "Jakub Kákona", email = "kaklik@mlab.cz"} +] +keywords = ["TWI", "IIC", "I2C", "USB", "sensors", "drivers"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", + "Natural Language :: Czech", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7" +] + +dependencies = [ + "smbus", + "six", + "numpy", + "hidapi" +] + +[project.optional-dependencies] +test = ["pytest"] + +[tool.setuptools] +package-dir = {"" = "src"} +packages = ["pymlab", "pymlab.sensors", "pymlab.tests"] + +[tool.setuptools_scm] +version_scheme = "guess-next-dev" +local_scheme = "node-and-date" + +