From 34b923c12ff83472ceaffce09014a95de9655773 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wagenaar" Date: Sun, 8 Feb 2026 07:57:54 -0800 Subject: [PATCH] Replaced setup.py with pyproject.toml This resolves issue #11. For reasons I do not understand, the setup.py-based installer ("pip install .") fails to access numpy, even if it has just been installed ("pip install -r requirements.txt") and is provably present in the python environment. This patch fixes the problem by replacing "setup.py" and "requirements.txt" with a new "pyproject.toml" that contains the same information. Now, a simple "pip install ." works as expected, both in a plain virtual environment (tested with Python 3.12.3 on Ubuntu 24.04) and in a conda environment (tested with Python 3.13 and PyCharm 25.06 on Windows 11). --- pyproject.toml | 29 +++++++++++++++++++++++++++++ requirements.txt | 3 --- setup.py | 34 ---------------------------------- 3 files changed, 29 insertions(+), 37 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d025771 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "dorna2" +authors = [ + {name = "Dorna Robotics", email = "info@dorna.ai"}, +] +description = "Dorna robot python" +readme = "README.md" +version = "0.10.2" + +dependencies = [ + "numpy", + "requests", +] +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT", + "Operating System :: OS Independent" +] +[tool.setuptools.package-data] +dorna2 = ['cfg/*'] + +[project.urls] +"Homepage" = "https://github.com/dorna-robotics/dorna2-python" + diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2677dbd..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -setuptools -numpy -requests diff --git a/setup.py b/setup.py deleted file mode 100644 index 960618c..0000000 --- a/setup.py +++ /dev/null @@ -1,34 +0,0 @@ -import setuptools -import dorna2 -with open("README.md", "r") as fh: - readme = fh.read() - -version = dorna2.__version__ - -setuptools.setup( - name="dorna2", - author="Dorna Robotics", - version=version, - author_email="info@dorna.ai", - description="Python API for Dorna 2", - long_description=readme, - long_description_content_type='text/markdown', - url="https://dorna.ai/", - project_urls={ - 'gitHub': 'https://github.com/dorna-robotics/dorna2-python', - }, - package_data={ - 'dorna2': ['cfg/*'], - }, - packages=setuptools.find_packages(), - classifiers=[ - 'Intended Audience :: Developers', - 'Programming Language :: Python :: 3.8', - "Operating System :: OS Independent", - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - install_requires=[], - license="MIT", - include_package_data=True, - zip_safe = False, -) \ No newline at end of file