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

setuptools 75.0.1 breaks numpy.distutils test #5493

Open
2 tasks done
kenodegard opened this issue Sep 18, 2024 · 1 comment
Open
2 tasks done

setuptools 75.0.1 breaks numpy.distutils test #5493

kenodegard opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels
in-progress issue is actively being worked on severity::1 blocker; broken functionality with no workaround source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type type::testing issues about tests or the test infrastructure

Comments

@kenodegard
Copy link
Contributor

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

With the recent update of setuptools, numpy.distutils no longer works and produces errors:

Screenshot 2024-09-18 at 15 13 18

We have already attempted to address this in conda-build, e.g.:

try:
# numpy.distutils deprecated in Python 3.12+
# see https://numpy.org/doc/stable/reference/distutils_status_migration.html
import numpy.distutils.core
numpy_setup = numpy.distutils.core.setup
numpy.distutils.core.setup = setup
except ImportError:
log.debug("Failed to import numpy for setup patch. Is numpy installed?")

What else should we, can we do here?

See the recipe that breaks when using numpy 2.0.1 + setuptools 75.1.0 for more context.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

@kenodegard kenodegard added type::bug describes erroneous operation, use severity::* to classify the type source::anaconda created by members of Anaconda, Inc. severity::1 blocker; broken functionality with no workaround in-progress issue is actively being worked on type::testing issues about tests or the test infrastructure labels Sep 18, 2024
@kenodegard kenodegard self-assigned this Sep 18, 2024
@kenodegard
Copy link
Contributor Author

the error is bubbling up from here:

try:
_setuptools_data = _load_setup_py_data.load_setup_py_data(
setup_file,
from_recipe_dir=from_recipe_dir,
recipe_dir=recipe_dir,
work_dir=m.config.work_dir,
permit_undefined_jinja=permit_undefined_jinja,
)
except (TypeError, OSError):
# setup.py file doesn't yet exist. Will get picked up in future parsings
pass
except ImportError as e:
if permit_undefined_jinja:
log.debug(
"Reading setup.py failed due to missing modules. This is probably OK, "
"since it may succeed in later passes. Watch for incomplete recipe "
"info, though."
)
else:
raise CondaBuildException(
"Could not render recipe - need modules "
f'installed in root env. Import error was "{e}"'
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress issue is actively being worked on severity::1 blocker; broken functionality with no workaround source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type type::testing issues about tests or the test infrastructure
Projects
Status: 🏗️ In Progress
Development

No branches or pull requests

1 participant