samplerate 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {samplerate-0.2.0 → samplerate-0.2.2}/CMakeLists.txt +3 -2
  2. {samplerate-0.2.0 → samplerate-0.2.2}/PKG-INFO +1 -1
  3. {samplerate-0.2.0 → samplerate-0.2.2}/external/CMakeLists.txt +1 -1
  4. {samplerate-0.2.0 → samplerate-0.2.2}/pyproject.toml +1 -1
  5. {samplerate-0.2.0 → samplerate-0.2.2}/setup.py +11 -8
  6. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.cpp +2 -2
  7. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.egg-info/PKG-INFO +1 -1
  8. {samplerate-0.2.0 → samplerate-0.2.2}/.gitattributes +0 -0
  9. {samplerate-0.2.0 → samplerate-0.2.2}/.github/workflows/pythonpackage.yml +0 -0
  10. {samplerate-0.2.0 → samplerate-0.2.2}/.gitignore +0 -0
  11. {samplerate-0.2.0 → samplerate-0.2.2}/LICENSE.rst +0 -0
  12. {samplerate-0.2.0 → samplerate-0.2.2}/MANIFEST.in +0 -0
  13. {samplerate-0.2.0 → samplerate-0.2.2}/README.rst +0 -0
  14. {samplerate-0.2.0 → samplerate-0.2.2}/docs/Makefile +0 -0
  15. {samplerate-0.2.0 → samplerate-0.2.2}/docs/changelog.rst +0 -0
  16. {samplerate-0.2.0 → samplerate-0.2.2}/docs/conf.py +0 -0
  17. {samplerate-0.2.0 → samplerate-0.2.2}/docs/index.rst +0 -0
  18. {samplerate-0.2.0 → samplerate-0.2.2}/docs/samplerate/converters.rst +0 -0
  19. {samplerate-0.2.0 → samplerate-0.2.2}/docs/samplerate/exceptions.rst +0 -0
  20. {samplerate-0.2.0 → samplerate-0.2.2}/docs/samplerate/index.rst +0 -0
  21. {samplerate-0.2.0 → samplerate-0.2.2}/docs/samplerate/samplerate.rst +0 -0
  22. {samplerate-0.2.0 → samplerate-0.2.2}/examples/play_modulation.py +0 -0
  23. {samplerate-0.2.0 → samplerate-0.2.2}/requirements.txt +0 -0
  24. {samplerate-0.2.0 → samplerate-0.2.2}/setup.cfg +0 -0
  25. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.egg-info/SOURCES.txt +0 -0
  26. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.egg-info/dependency_links.txt +0 -0
  27. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.egg-info/requires.txt +0 -0
  28. {samplerate-0.2.0 → samplerate-0.2.2}/src/samplerate.egg-info/top_level.txt +0 -0
  29. {samplerate-0.2.0 → samplerate-0.2.2}/tests/test_api.py +0 -0
  30. {samplerate-0.2.0 → samplerate-0.2.2}/tests/test_exception.py +0 -0
  31. {samplerate-0.2.0 → samplerate-0.2.2}/tests/test_resampling.py +0 -0
  32. {samplerate-0.2.0 → samplerate-0.2.2}/tests/test_resize.py +0 -0
@@ -1,6 +1,7 @@
1
1
  # https://stackoverflow.com/questions/51907755/building-a-pybind11-module-with-cpp-and-cuda-sources-using-cmake
2
2
 
3
3
  cmake_minimum_required(VERSION 3.15)
4
+ set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
4
5
 
5
6
  message(STATUS "Found Python prefix ${PYTHON_PREFIX}")
6
7
  list(PREPEND CMAKE_PREFIX_PATH "${PYTHON_PREFIX}")
@@ -8,7 +9,7 @@ list(PREPEND CMAKE_PREFIX_PATH "${PYTHON_PREFIX}")
8
9
  project(python-samplerate)
9
10
  set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
10
11
 
11
- cmake_policy(SET CMP0094 NEW)
12
+ cmake_policy(SET CMP0148 NEW)
12
13
 
13
14
  # adds the external dependencies
14
15
  add_subdirectory(external)
@@ -25,7 +26,7 @@ endif()
25
26
  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
26
27
  CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
27
28
  (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32))
28
- target_compile_options(python-samplerate PRIVATE -std=c++14 -O3 -Wall -Wextra)
29
+ target_compile_options(python-samplerate PRIVATE -std=c++14 -O3 -Wall -Wextra -fPIC)
29
30
  endif()
30
31
 
31
32
  ### stick the package and libsamplerate version into the module
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: samplerate
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Monolithic python wrapper for libsamplerate based on pybind11 and NumPy
5
5
  Author-email: Robin Scheibler <fakufaku@gmail.com>, Tino Wagner <ich@tinowagner.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ include(FetchContent)
4
4
  FetchContent_Declare(
5
5
  pybind11
6
6
  GIT_REPOSITORY https://github.com/pybind/pybind11
7
- GIT_TAG 5b0a6fc2017fcc176545afe3e09c9f9885283242 # 2.10.4
7
+ GIT_TAG f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8 # 3.0.1
8
8
  )
9
9
 
10
10
  FetchContent_MakeAvailable(pybind11)
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2"]
2
+ requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2", "cmake"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
@@ -4,14 +4,11 @@
4
4
  # https://github.com/pybind/cmake_example
5
5
 
6
6
  import os
7
- import platform
8
7
  from pathlib import Path
9
- import re
10
8
  import subprocess
11
9
  import sys
12
10
  from pathlib import Path
13
11
 
14
- import setuptools
15
12
  from setuptools import Extension, setup
16
13
  from setuptools.command.build_ext import build_ext
17
14
 
@@ -104,11 +101,17 @@ class CMakeBuild(build_ext):
104
101
  ]
105
102
  build_args += ["--config", cfg]
106
103
 
107
- if sys.platform.startswith("darwin"):
108
- # Cross-compile support for macOS - respect ARCHFLAGS if set
109
- archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", ""))
110
- if archs:
111
- cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
104
+ # When building universal2 wheels, we need to set the architectures for CMake.
105
+ if "universal2" in self.plat_name:
106
+ cmake_args += ["-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"]
107
+
108
+ # Set MACOSX_DEPLOYMENT_TARGET for macOS builds.
109
+ if (
110
+ self.plat_name.startswith("macosx-")
111
+ and "MACOSX_DEPLOYMENT_TARGET" not in os.environ
112
+ ):
113
+ target_version = self.plat_name.split("-")[1]
114
+ os.environ["MACOSX_DEPLOYMENT_TARGET"] = target_version
112
115
 
113
116
  # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
114
117
  # across all generators.
@@ -328,8 +328,8 @@ class CallbackResampler {
328
328
 
329
329
  CallbackResampler clone() const { return CallbackResampler(*this); }
330
330
  CallbackResampler &__enter__() { return *this; }
331
- void __exit__(const py::object &exc_type, const py::object &exc,
332
- const py::object &exc_tb) {
331
+ void __exit__(const py::object &/*exc_type*/, const py::object &/*exc*/,
332
+ const py::object &/*exc_tb*/) {
333
333
  _destroy();
334
334
  }
335
335
  };
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: samplerate
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Monolithic python wrapper for libsamplerate based on pybind11 and NumPy
5
5
  Author-email: Robin Scheibler <fakufaku@gmail.com>, Tino Wagner <ich@tinowagner.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes