From 61be95679104f8cf6f7805ca036e28acfe28cc33 Mon Sep 17 00:00:00 2001 From: Syun'ichi Shiraiwa Date: Wed, 7 Aug 2024 20:10:01 -0400 Subject: [PATCH] removing the current directory from search path in _ser/setup.py and _par/setup.py, since it causes an issue with recent setuptools --- .github/workflows/testrelease_binary.yml | 2 -- mfem/__init__.py | 2 +- mfem/_par/setup.py | 11 ++++++++--- mfem/_ser/setup.py | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testrelease_binary.yml b/.github/workflows/testrelease_binary.yml index ac9ca346..ae08741e 100644 --- a/.github/workflows/testrelease_binary.yml +++ b/.github/workflows/testrelease_binary.yml @@ -60,8 +60,6 @@ jobs: ls -l /opt/python/ export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH - python -c "import setuptools;print('setuptools version', setuptools.__version__)" - pip3 install setuptools==67.4.0 pip3 install auditwheel twine pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue diff --git a/mfem/__init__.py b/mfem/__init__.py index 8658dced..6bae478a 100644 --- a/mfem/__init__.py +++ b/mfem/__init__.py @@ -20,5 +20,5 @@ def debug_print(message): print(message) -__version__ = '4.7.0rc4' +__version__ = '4.7.0rc5' diff --git a/mfem/_par/setup.py b/mfem/_par/setup.py index 8240df93..f879469e 100644 --- a/mfem/_par/setup.py +++ b/mfem/_par/setup.py @@ -3,12 +3,17 @@ """ setup.py file for SWIG example """ -from distutils.core import Extension, setup -import numpy -import os + import sys +import os +import numpy + print('building paralel version') +# this remove *.py in this directory to be imported from setuptools +sys.path.remove(os.path.abspath(os.path.dirname(sys.argv[0]))) +from distutils.core import Extension, setup + # first load variables from PyMFEM_ROOT/setup_local.py diff --git a/mfem/_ser/setup.py b/mfem/_ser/setup.py index 3fe1afbd..85eaafdc 100644 --- a/mfem/_ser/setup.py +++ b/mfem/_ser/setup.py @@ -10,6 +10,8 @@ import os import numpy +# this remove *.py in this directory to be imported from setuptools +sys.path.remove(os.path.abspath(os.path.dirname(sys.argv[0]))) from distutils.core import Extension, setup