From a66804b8f097814f63e9da7377a2f91c7090507a Mon Sep 17 00:00:00 2001 From: adku Date: Wed, 25 Sep 2024 09:58:59 +0200 Subject: [PATCH] adds pyproject.toml (#64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Delete pybind11 V2.2.0 * Add pybind11 V2.13.6 * Fix CMakeList.txt * Merge branch 'toml' * adjust version --------- Co-authored-by: David Díaz-Guerra Aparicio Co-authored-by: DavidDiazGuerra --- README.md | 2 +- pyproject.toml | 27 +++++++++++++++++++++++++++ setup.py | 27 ++------------------------- 3 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 pyproject.toml diff --git a/README.md b/README.md index 105c571..1dea75e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ## Installation -You can use `pip` to install **gpuRIR** from our repository through `pip install https://github.com/DavidDiazGuerra/gpuRIR/zipball/master`. You can also clone or download our repository and run `python setup.py install`. +You can use `pip` to install **gpuRIR** from our repository through `pip install https://github.com/DavidDiazGuerra/gpuRIR/zipball/master`. You can also clone or download our repository and run `pip install gpuRIR/`. ## License diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..910cee8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,27 @@ +[build-system] +requires = ["setuptools", "wheel", "cmake>=3.23"] +build-backend = "setuptools.build_meta" + +[project] +name = "gpuRIR" +version = "1.2.0" +description = "Room Impulse Response (RIR) simulation through Image Source Method (ISM) with GPU acceleration" +authors = [ + {name = "David Diaz-Guerra", email = "ddga@unizar.es"} +] +readme = "README.md" +keywords = ["RIR", "GPU", "Image Source Method", "simulation"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Programming Language :: C++", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Operating System :: OS Independent", +] + +[tool.setuptools] +packages = ["gpuRIR"] + +[project.optional-dependencies] +dev = ["pytest"] diff --git a/setup.py b/setup.py index fbd2884..aa768af 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,10 @@ -# Install the python library. -# -# Script based on the cmake_example of pybind11 by Dean Moldovan ( https://github.com/pybind/cmake_example ) - +"""Script is based on the cmake_example of pybind11 by Dean Moldovan: https://github.com/pybind/cmake_example""" import os import re import sys import platform import subprocess -import setuptools from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion @@ -16,7 +12,7 @@ class CMakeExtension(Extension): def __init__(self, name, sourcedir=''): - Extension.__init__(self, name, sources=[]) + super().__init__(name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) @@ -61,28 +57,9 @@ def build_extension(self, ext): subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) -with open("README.md", "r") as fh: - long_description = fh.read() setup( - name='gpuRIR', - version='1.2.0', - author='David Diaz-Guerra', - author_email='ddga@unizar.es', - url='', - description='Room Impulse Response (RIR) simulation through Image Source Method (ISM) with GPU aceleration', - long_description=long_description, - long_description_content_type="text/markdown", ext_modules=[CMakeExtension('gpuRIR_bind')], - packages=setuptools.find_packages(), cmdclass=dict(build_ext=CMakeBuild), zip_safe=False, - classifiers=[ - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Programming Language :: C++", - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", - "Operating System :: OS Independent", - ], )