Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: support Numpy2 and legacy Numpy #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[build-system]
requires = [
"wheel",
"setuptools",
"numpy",
"numpy>=2; python_version>='3.9'",
"oldest-supported-numpy; python_version<'3.9'",
"cython",
]
build-backend = "setuptools.build_meta"
98 changes: 45 additions & 53 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,45 @@
from __future__ import with_statement, print_function, absolute_import

from setuptools import setup, find_packages, Extension
from distutils.version import LooseVersion

import sys
from glob import glob
from os.path import join
import numpy

from setuptools.command.build_ext import build_ext


_VERSION = '0.3.4'


world_src_top = join("lib", "World", "src")
world_sources = glob(join(world_src_top, "*.cpp"))

ext_modules = [
Extension(
name="pyworld.pyworld",
include_dirs=[world_src_top, numpy.get_include()],
sources=[join("pyworld", "pyworld.pyx")] + world_sources,
language="c++")]

kwargs = {"encoding": "utf-8"} if int(sys.version[0]) > 2 else {}
setup(
name="pyworld",
description="PyWorld: a Python wrapper for WORLD vocoder",
long_description=open("README.md", "r", **kwargs).read(),
long_description_content_type="text/markdown",
ext_modules=ext_modules,
cmdclass={'build_ext': build_ext},
version=_VERSION,
packages=find_packages(),
setup_requires=[
'numpy',
],
install_requires=[
'numpy',
'cython>=0.24',
],
extras_require={
'test': ['nose'],
'sdist': ['numpy', 'cython>=0.24'],
},
author="Pyworld Contributors",
author_email="[email protected]",
url="https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder",
keywords=['vocoder'],
classifiers=[],
)
from __future__ import absolute_import, print_function, with_statement

import sys
from glob import glob
from os.path import join

import numpy
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext


_VERSION = '0.3.4'


world_src_top = join("lib", "World", "src")
world_sources = glob(join(world_src_top, "*.cpp"))

ext_modules = [
Extension(
name="pyworld.pyworld",
include_dirs=[world_src_top, numpy.get_include()],
sources=[join("pyworld", "pyworld.pyx")] + world_sources,
language="c++")]

kwargs = {"encoding": "utf-8"} if int(sys.version[0]) > 2 else {}
setup(
name="pyworld",
description="PyWorld: a Python wrapper for WORLD vocoder",
long_description=open("README.md", "r", **kwargs).read(),
long_description_content_type="text/markdown",
ext_modules=ext_modules,
cmdclass={'build_ext': build_ext},
version=_VERSION,
packages=find_packages(),
install_requires=['numpy'],
extras_require={
'test': ['nose'],
'sdist': ['numpy', 'cython>=0.24'],
},
author="Pyworld Contributors",
author_email="[email protected]",
url="https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder",
keywords=['vocoder'],
classifiers=[],
)