Skip to content

Commit

Permalink
Merge pull request #3018 from appolloford/looseversion
Browse files Browse the repository at this point in the history
Use `LooseVersion` from `easybuild.tools` and sort imports
  • Loading branch information
boegel authored Oct 22, 2023
2 parents bb8277d + 59f5041 commit c1ae2e5
Show file tree
Hide file tree
Showing 150 changed files with 152 additions and 156 deletions.
5 changes: 2 additions & 3 deletions easybuild/easyblocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
@author: Jens Timmerman (Ghent University)
"""
import os
from distutils.version import LooseVersion
from pkgutil import extend_path

# note: release candidates should be versioned as a pre-release, e.g. "1.1rc1"
Expand All @@ -43,7 +42,7 @@
# recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like
# UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0'
# This causes problems further up the dependency chain...
VERSION = LooseVersion('5.0.0.dev0')
VERSION = '5.0.0.dev0'
UNKNOWN = 'UNKNOWN'


Expand Down Expand Up @@ -76,7 +75,7 @@ def get_git_revision():
if git_rev == UNKNOWN:
VERBOSE_VERSION = VERSION
else:
VERBOSE_VERSION = LooseVersion("%s-r%s" % (VERSION, git_rev))
VERBOSE_VERSION = "%s-r%s" % (VERSION, git_rev)

# extend path so python finds our easyblocks in the subdirectories where they are located
subdirs = [chr(x) for x in range(ord('a'), ord('z') + 1)] + ['0']
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/abaqus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import glob
import os
from collections import OrderedDict
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyblock import EasyBlock
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/acml.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"""

import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/advisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""

import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.intelbase import IntelBase

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Enhanced/cleaned up by Kenneth Hoste (HPC-UGent)
CMake support (Amber 20) added by James Carpenter and Simon Branford (University of Birmingham)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import os

import easybuild.tools.environment as env
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/ansys.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import os
import re
import stat
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.packedbinary import PackedBinary
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/aocc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import os
import stat

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.packedbinary import PackedBinary
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/armadillo.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@author: Kenneth Hoste (Ghent University)
"""
import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/a/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import re
import os
import sys
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bamtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@author: Andreas Panteli (The Cyprus Institute)
@author: Kenneth Hoste (Ghent University)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.easyblocks.generic.makecp import MakeCp
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"""
EasyBuild support for building and installing Bazel, implemented as an easyblock
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import glob
import os
import tempfile
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/berkeleygw.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@author: Miguel Dias Costa (National University of Singapore)
"""
import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/binutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import glob
import os
import re
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
from easybuild.easyblocks.generic.configuremake import ConfigureMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@author: Michele Dolfi (ETH Zurich)
@author: Simon Branford (University of Birmingham)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import fileinput
import glob
import os
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bowtie.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@author: Kenneth Hoste (Ghent University)
@author: Jens Timmerman (Ghent University)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import glob
import os
import shutil
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bowtie2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@author: Fotis Georgatos (Uni.Lu)
@author: Kenneth Hoste (Ghent University)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import os

from easybuild.easyblocks.generic.makecp import MakeCp
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/b/bwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""
import os
import glob
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""
import os

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import glob
import os
import shutil
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/clang_aomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import glob
import os

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
from easybuild.easyblocks.clang import DEFAULT_TARGETS_MAP as LLVM_ARCH_MAP
from easybuild.easyblocks.generic.bundle import Bundle
from easybuild.framework.easyblock import EasyBlock
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import re
import os
import sys
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
from easybuild.framework.easyblock import EasyBlock
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@author: Pieter De Baets (Ghent University)
@author: Jens Timmerman (Ghent University)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import glob
import os
import stat
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cryptography.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@author: Alexander Grund
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.pythonpackage import PythonPackage
from easybuild.tools.run import run_cmd
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import re
import stat

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cudacompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""

import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyconfig import CUSTOM, MANDATORY
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/c/cudnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@author: Simon Branford (University of Birmingham)
@author: Robert Mijakovic (LuxProvide)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.tarball import Tarball
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/d/dolfin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import os
import re
import tempfile
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
import easybuild.tools.toolchain as toolchain
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/d/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@author: Balazs Hajgato (Free University Brussels (VUB))
"""

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
from easybuild.tools.run import run_cmd
from easybuild.easyblocks.generic.cmakemake import CMakeMake

Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/easybuildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import re
import sys
from collections import OrderedDict
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_pip_version
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/eigen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import os
import shutil
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.cmakemake import CMakeMake
from easybuild.tools.filetools import copy_dir, copy_file, mkdir, apply_regex_substitutions
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/elpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@author: Kenneth Hoste (Ghent University)
"""
import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
from easybuild.easyblocks.generic.configuremake import ConfigureMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/e/esmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@author: Maxime Boissonneault (Digital Research Alliance of Canada)
"""
import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
import easybuild.tools.toolchain as toolchain
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/ferret.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


import os
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.build_log import EasyBuildError
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/fftw.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@author: Kenneth Hoste (HPC-UGent)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@author: Kenneth Hoste (Ghent University)
"""
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion
import os

from easybuild.easyblocks.generic.configuremake import ConfigureMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/fluent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"""
import os
import stat
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.packedbinary import PackedBinary
from easybuild.framework.easyconfig import CUSTOM
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/freesurfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import os

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

from easybuild.easyblocks.generic.tarball import Tarball
from easybuild.framework.easyconfig import MANDATORY
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/f/fsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import difflib
import os
import re
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
from easybuild.framework.easyblock import EasyBlock
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/g/g2clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root

from distutils.version import LooseVersion
from easybuild.tools import LooseVersion


class EB_g2clib(ConfigureMake):
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/g/gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"""
import os
import shutil
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.cmakemake import CMakeMake
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/g/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import re
import shutil
from copy import copy
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion

import easybuild.tools.environment as env
from easybuild.easyblocks.clang import DEFAULT_TARGETS_MAP as LLVM_ARCH_MAP
Expand Down
2 changes: 1 addition & 1 deletion easybuild/easyblocks/g/gctf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from easybuild.tools.filetools import adjust_permissions, copy_file, mkdir
from easybuild.tools.filetools import symlink, write_file
from easybuild.tools.modules import get_software_root
from distutils.version import LooseVersion
from easybuild.tools import LooseVersion


class EB_Gctf(EasyBlock):
Expand Down
Loading

0 comments on commit c1ae2e5

Please sign in to comment.