Skip to content

Commit

Permalink
adds pyproject.toml (#64)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: DavidDiazGuerra <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent c09c866 commit a66804b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"}
]
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"]
27 changes: 2 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# 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


class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
super().__init__(name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)


Expand Down Expand Up @@ -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='[email protected]',
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",
],
)

0 comments on commit a66804b

Please sign in to comment.