-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure build to use pyproject.toml
- Loading branch information
Showing
5 changed files
with
58 additions
and
42 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "setuptools_scm", "cmake", "scikit-build"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
[aliases] | ||
test=pytest | ||
[metadata] | ||
name = signalflow | ||
version = 0.4.9 | ||
author = Daniel Jones | ||
author_email = [email protected] | ||
description = SignalFlow is a sound synthesis library designed to make it quick and intuitive to explore complex sonic ideas | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
keywords = audio, sound, synthesis, dsp, sound-synthesis | ||
classifiers = | ||
Topic :: Multimedia :: Sound/Audio | ||
Topic :: Multimedia :: Sound/Audio :: Sound Synthesis | ||
Topic :: Artistic Software | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
|
||
[tool:pytest] | ||
addopts = --verbose | ||
[options] | ||
python_requires = >=3.8 | ||
setup_requires = | ||
pytest-runner | ||
pybind11-stubgen | ||
install_requires = | ||
numpy | ||
tests_require = | ||
pytest | ||
numpy | ||
scipy | ||
package_dir = | ||
= auxiliary/libs | ||
packages = | ||
signalflow_stubs | ||
signalflow_midi | ||
signalflow_cli | ||
signalflow_examples | ||
signalflow_visualisation | ||
signalflow_analysis | ||
include_package_data = true | ||
|
||
[options.packages.find] | ||
exclude = | ||
tests | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
signalflow = signalflow_cli:main | ||
|
||
[options.package_data] | ||
signalflow_stubs = *.pyi | ||
signalflow = *.pyd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
class CMakeExtension(Extension): | ||
def __init__(self, name, sourcedir=''): | ||
Extension.__init__(self, name, sources=[]) | ||
super().__init__(name, sources=[]) | ||
self.sourcedir = os.path.abspath(sourcedir) | ||
|
||
|
||
|
@@ -20,17 +20,18 @@ def run(self): | |
|
||
def build_extension(self, ext): | ||
extdir = os.path.abspath(self.build_lib) | ||
|
||
cfg = 'Debug' if self.debug else 'Release' | ||
cpu_count = os.cpu_count() | ||
build_args = ['--config', cfg, '-j', str(cpu_count)] | ||
|
||
print("Building signalflow version " + self.distribution.get_version()) | ||
print("Detected %d CPUs" % os.cpu_count()) | ||
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, | ||
'-DCMAKE_BUILD_PYTHON=1', | ||
'-DCMAKE_BUILD_TYPE=' + cfg, | ||
'-DSIGNALFLOW_VERSION=' + self.distribution.get_version()] | ||
cmake_args = [ | ||
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, | ||
'-DCMAKE_BUILD_PYTHON=1', | ||
'-DCMAKE_BUILD_TYPE=' + cfg, | ||
'-DSIGNALFLOW_VERSION=' + self.distribution.get_version() | ||
] | ||
if 'CMAKE_OSX_ARCHITECTURES' in os.environ: | ||
cmake_args += ['-DCMAKE_OSX_ARCHITECTURES=%s' % os.environ['CMAKE_OSX_ARCHITECTURES']] | ||
|
||
|
@@ -68,38 +69,6 @@ def build_extension(self, ext): | |
signalflow_package_data = ['*.pyd'] | ||
|
||
setup( | ||
name='signalflow', | ||
version='0.4.7', | ||
author='Daniel Jones', | ||
author_email='[email protected]', | ||
description='SignalFlow is a sound synthesis library designed to make it quick and intuitive to explore complex sonic ideas', | ||
keywords=['audio', 'sound', 'synthesis', 'dsp', 'sound-synthesis'], | ||
classifiers=[ | ||
'Topic :: Multimedia :: Sound/Audio', | ||
'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis', | ||
'Topic :: Artistic Software', | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers' | ||
], | ||
long_description=open("README.md", "r").read(), | ||
long_description_content_type="text/markdown", | ||
ext_modules=[CMakeExtension('signalflow')], | ||
cmdclass=dict(build_ext=CMakeBuild), | ||
python_requires=">=3.8", | ||
setup_requires=['pytest-runner', 'pybind11-stubgen'], | ||
install_requires=['numpy'], | ||
tests_require=['pytest', 'numpy', 'scipy'], | ||
package_dir={'': 'auxiliary/libs'}, | ||
packages=signalflow_packages, | ||
include_package_data=True, | ||
# signalflow-stubs contains type hint data in a .pyi file, per PEP 561 | ||
package_data={ | ||
"signalflow-stubs": ["*.pyi"], | ||
"signalflow": signalflow_package_data | ||
}, | ||
entry_points = { | ||
'console_scripts': [ | ||
'signalflow = signalflow_cli:main', | ||
], | ||
} | ||
) |