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

Prompt installation of setuptools or packaging if neither found #3944

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions scripts/firedrake-install
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ from glob import iglob
from itertools import chain
import re
import importlib


class InstallError(Exception):
# Exception for generic install problems.
pass


try:
from pkg_resources.extern.packaging.version import Version, InvalidVersion
except ModuleNotFoundError:
from packaging.version import Version, InvalidVersion
try:
from packaging.version import Version, InvalidVersion
except ModuleNotFoundError:
raise InstallError("Neither setuptools or packaging found. Please "
"install one of these packages before trying again.")

osname = platform.uname().system
arch = platform.uname().machine
Expand Down Expand Up @@ -52,11 +63,6 @@ firedrake_apps = {
}


class InstallError(Exception):
# Exception for generic install problems.
pass


class FiredrakeConfiguration(dict):
"""A dictionary extended to facilitate the storage of Firedrake
configuration information."""
Expand Down
Loading