diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..dfad784d58054f1b49db8f42dbfd83700a01610b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + 'setuptools', + 'wheel', + 'numpy'] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2304d7b5c16704dbaa581df75871785b02fc82f5 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,35 @@ +[metadata] +name = chainsaddiction +version = 0.1 +description = Discrete time, finit state space, stationary Hidden Markov Model. +long_description = file: README.md +license = BSD 3-Clause License +author = Michael Blaß +author_email = mblass@posteo.net +keywords = music, analysis, hmm +project_urls = + Source code = https://gitlab.rrz.uni-hamburg.de/bal7668/chainsaddiction + Bug Tracker = https://gitlab.rrz.uni-hamburg.de/bal7668/chainsaddiction/-/issues + +classifiers = + License :: OSI Approved :: BSD License + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython + Topic :: Scientific/Engineering + Topic :: Multimedia :: Sound/Audio :: Analysis + Intended Audience :: Science/Research + Intended Audience :: Information Technology + License :: OSI Approved :: BSD License + +[options] +zip_safe = False + +packages = hmm +python_requires >= "3.7" +install_requires = + numpy >= '1.20' + diff --git a/setup.py b/setup.py index 656ca3e17427161d195c0340dcbe7938ff714589..e15d760956a2e5394f89e0e896dea80975287ed7 100644 --- a/setup.py +++ b/setup.py @@ -1,24 +1,16 @@ -#/usr/bin/env python3 - from setuptools import setup, Extension -from numpy.distutils.misc_util import get_numpy_include_dirs +from setuptools.config import read_configuration +import numpy as np + -setup( - name = 'chainsaddiction', - version = '0.1', - description = 'Discrete time, finit state space, stationary Hidden Markov Model.', - install_requires = ['numpy>=1.15.0'], - include_dirs = get_numpy_include_dirs(), - ext_modules = [ - Extension( - 'chainsaddiction', - sources = [ 'hmm/stats.c', - 'hmm/fwbw.c', - 'hmm/em.c', - 'hmm/hmm.c', - 'hmm/hmm_module.c'], +config = read_configuration('./setup.cfg') - include_dirs = ['./include/']) - ] - ) +ext_hmm = Extension('chainsaddiction', + sources = ['hmm/stats.c', + 'hmm/fwbw.c', + 'hmm/em.c', + 'hmm/hmm.c', + 'hmm/hmm_module.c'], + include_dirs = ['include', np.get_include()]) +setup(ext_modules = [ext_hmm])