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", - ], )