Skip to content

Commit

Permalink
Revert "Bump min setuptools version and remove setup.py (FEniCS#154)"
Browse files Browse the repository at this point in the history
This reverts commit 6eeef93.

Numpy currently pins setuptools to 59.2 see:
numpy/numpy#22623

This commit caused UFL to require a lated setuptools. For complex
reasons to do with blas dependencies, Firedrake builds numpy without
build isolation. We also install UFL in editable mode, so that can't
use build isolation. Consequently we are stuck on the pinned setuptools.
  • Loading branch information
dham committed May 5, 2023
1 parent 3c79834 commit 9411323
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build-system]
requires = ["setuptools>=62", "wheel"]
requires = ["setuptools>=58", "wheel"]

build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include_package_data = True
zip_safe = False
python_requires = >= 3.8
setup_requires =
setuptools >= 62
setuptools >= 58
wheel
install_requires =
numpy
Expand Down
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import setuptools

try:
import pip

from packaging import version
if version.parse(pip.__version__) < version.parse("21.3"):
# Issue with older version of pip https://github.com/pypa/pip/issues/7953
import site
import sys
site.ENABLE_USER_SITE = "--user" in sys.argv[1:]

except ImportError:
pass

setuptools.setup()

0 comments on commit 9411323

Please sign in to comment.