From b411be9d5332b3fb39999da8f00e20eaf35d098e Mon Sep 17 00:00:00 2001 From: Aaron Holtzman Date: Sat, 5 Nov 2016 11:56:12 -0400 Subject: [PATCH 1/6] remove unecessary fortran options --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 56832ff..c23298b 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ # distutils -sys.path.extend('config_fc --fcompiler=gnu95 --f90flags=-fopenmp --f90exec=/usr/bin/gfortran '.split()) setup(name='fht', version='1.0.1', description='Fast Hadamard Transform', @@ -34,9 +33,7 @@ packages=['fht'], ext_modules=[Extension('fht._C_fht_%(ctype)s' % {"ctype":t}, [join('fht', 'C_fht_%(ctype)s.c') % {"ctype":t}], - include_dirs=[join(get_include(), 'numpy')], - extra_compile_args=['-fopenmp'], - extra_link_args=['-fopenmp'],) + include_dirs=[join(get_include(), 'numpy')], ) for t in types], data_files=[('tests', ['test_fht'])] ) From e5fa7a59a9e25b0d01b3d870fcac166159cc76ea Mon Sep 17 00:00:00 2001 From: Aaron Holtzman Date: Tue, 16 Feb 2021 14:52:15 -0500 Subject: [PATCH 2/6] Add pyproject file so pip knows the build requirements. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ec38f06 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ['setuptools>=40.8.0', 'wheel', 'numpy >= 1.3.0'] From d5257ebd77e668019b6210d51fe68c52b96a8350 Mon Sep 17 00:00:00 2001 From: aholtzma Date: Thu, 4 Nov 2021 11:08:42 -0400 Subject: [PATCH 3/6] Pin setuptools version to less than 58.5 which breaks the build. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec38f06..266b90d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ['setuptools>=40.8.0', 'wheel', 'numpy >= 1.3.0'] +requires = ['setuptools<58.5', 'wheel', 'numpy >= 1.3.0'] From dbe7a1f5fa2b79975cd4578685f59ed900ef2e99 Mon Sep 17 00:00:00 2001 From: Aaron Holtzman <77404441+aholtzma-am@users.noreply.github.com> Date: Thu, 31 Mar 2022 23:55:03 -0400 Subject: [PATCH 4/6] Manually require numpy before we import numpy in setup.py --- .gitignore | 2 ++ setup.py | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7484af1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.eggs/* +*.egg-info diff --git a/setup.py b/setup.py index c23298b..a862c4a 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,8 @@ #!/usr/bin/env python +import setuptools + +setuptools.setup(setup_requires=['numpy']) + from numpy.distutils.core import Extension, setup from numpy import get_include from os.path import join From 0ad1ce7c168cba1d92579c58c043287745e591eb Mon Sep 17 00:00:00 2001 From: Aaron Holtzman Date: Wed, 6 Mar 2024 21:35:33 -0500 Subject: [PATCH 5/6] Fix build for Python >= 3.12 --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c23298b..cf8771a 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -from numpy.distutils.core import Extension, setup +from distutils.core import Extension, setup from numpy import get_include from os.path import join import os @@ -35,5 +35,4 @@ [join('fht', 'C_fht_%(ctype)s.c') % {"ctype":t}], include_dirs=[join(get_include(), 'numpy')], ) for t in types], - data_files=[('tests', ['test_fht'])] ) From 7a4f0acef22f9dc8513077549aa0e937400947bd Mon Sep 17 00:00:00 2001 From: Aaron Holtzman Date: Mon, 17 Jun 2024 22:33:35 +0000 Subject: [PATCH 6/6] Force build numpy to be less than 2.0, as there seem to be problems in the headers for new APIs. --- pyproject.toml | 2 +- setup.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8751531..ddc741d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ['setuptools', 'wheel', 'numpy'] +requires = ['setuptools', 'wheel', 'numpy < 2'] diff --git a/setup.py b/setup.py index 3817bf1..a7a33af 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,6 @@ from numpy import get_include from os.path import join import os -import sys # possible types types = ("int", "long", "float", "double") @@ -26,14 +25,14 @@ # distutils setup(name='fht', - version='1.0.1', + version='1.0.2', description='Fast Hadamard Transform', author='Nicolas Barbey', author_email='nicolas.a.barbey@gmail.com', - requires=['numpy (>1.3.0)'], packages=['fht'], ext_modules=[Extension('fht._C_fht_%(ctype)s' % {"ctype":t}, [join('fht', 'C_fht_%(ctype)s.c') % {"ctype":t}], include_dirs=[join(get_include(), 'numpy')], ) + #include_dirs=[get_include()], ) for t in types], )