Skip to content
Snippets Groups Projects
Verified Commit 5bb186c6 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

stop supporting EOL python

parent 369af8d2
No related branches found
No related tags found
1 merge request!412take over the changes from master
......@@ -41,14 +41,6 @@ build-env:debian:
--dockerfile $CI_PROJECT_DIR/docker/Dockerfile.debian
--destination $CI_REGISTRY_IMAGE/debian
build-env:conda:
<<: *build-env
script:
- /kaniko/executor
--context $CI_PROJECT_DIR/docker
--dockerfile $CI_PROJECT_DIR/docker/Dockerfile.conda
--destination $CI_REGISTRY_IMAGE/conda
build-env:default:
<<: *build-env
script:
......@@ -73,25 +65,25 @@ build-env:default:
.stable-env: &stable_env
before_script:
- source deactivate
- source activate kwant-stable
- eval "$(micromamba shell hook --shell bash)"
- micromamba activate kwant-stable
.no-extras-env: &no_extras_env
before_script:
- source deactivate
- source activate kwant-stable-no-extras
- eval "$(micromamba shell hook --shell bash)"
- micromamba activate kwant-stable-no-extras
# Note that this is 'latest' as of when the image was last built
.latest-env: &latest_env
before_script:
- source deactivate
- source activate kwant-latest
- eval "$(micromamba shell hook --shell bash)"
- micromamba activate kwant-latest
.bleeding-edge-env: &bleeding_edge_env
before_script:
- source deactivate
- conda env update -f /kwant-latest.yml
- source activate kwant-latest
- eval "$(micromamba shell hook --shell bash)"
- micromamba env update -f /kwant-latest.yml
- micromamba activate kwant-latest
.ubuntu-env: &ubuntu_env
image: gitlab.kwant-project.org:5005/kwant/kwant/ubuntu
......
......@@ -29,10 +29,10 @@ Prerequisites
=============
Building Kwant requires
* `Python <https://www.python.org/>`_ 3.7 or above,
* `NumPy <https://numpy.org/>`_ 1.16.2 or newer,
* `SciPy <https://www.scipy.org/>`_ 1.1.0 or newer,
* `LAPACK <https://netlib.org/lapack/>`_ and `BLAS <https://netlib.org/blas/>`_,
* `Python <https://www.python.org/>`_ 3.8 or above,
* `NumPy <http://numpy.org/>`_ 1.11.0 or newer,
* `SciPy <https://www.scipy.org/>`_ 0.17.0 or newer,
* `LAPACK <http://netlib.org/lapack/>`_ and `BLAS <http://netlib.org/blas/>`_,
(For best performance we recommend the free `OpenBLAS
<https://www.openblas.net/>`_ or the nonfree `MKL
<https://software.intel.com/en-us/intel-mkl>`_.)
......
FROM conda/miniconda3:latest
FROM mambaorg/micromamba:1.5.5-jammy
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Etc/UTC
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
# all the hard non-Python dependencies
git make patch build-essential \
......@@ -14,10 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY kwant-latest.yml kwant-stable.yml kwant-stable-no-extras.yml /
USER $MAMBA_USER
COPY --chown=$MAMBA_USER:$MAMBA_USER kwant-latest.yml kwant-stable.yml kwant-stable-no-extras.yml /
RUN conda env create -qf kwant-stable.yml
RUN conda env create -qf kwant-stable-no-extras.yml
RUN conda env create -qf kwant-latest.yml
RUN /usr/local/envs/kwant-latest/bin/python -m ipykernel install --user --name kwant-latest
RUN micromamba env create -f /kwant-stable.yml
RUN micromamba env create -f /kwant-stable-no-extras.yml
RUN micromamba env create -f /kwant-latest.yml
FROM debian:buster
FROM debian:latest
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
......@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg dirmngr apt-transport-https ca-certificates curl software-properties-common
RUN echo "deb https://downloads.kwant-project.org/debian/ stable main" >> /etc/apt/sources.list && \
apt-key adv --no-tty --keyserver pool.sks-keyservers.net --recv-key C3F147F5980F3535 && \
apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-key C3F147F5980F3535 && \
apt-get update && apt-get install -y --no-install-recommends \
# all the hard non-Python dependencies
git g++ make patch gfortran libblas-dev liblapack-dev \
......@@ -27,10 +27,10 @@ RUN pip3 install \
qsymm==1.3.0
### install build and testing dependencies
RUN pip3 install \
RUN pip3 install --break-system-packages\
cython \
pytest \
pytest-runner \
pytest-cov \
pytest-flakes \
pytest-pep8
pytest-pep8 \
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Etc/UTC
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg dirmngr apt-transport-https software-properties-common
......
......@@ -2,7 +2,7 @@ name: kwant-latest
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.12
- pip
- numpy
- scipy
......@@ -11,12 +11,13 @@ dependencies:
- matplotlib-base
- plotly
- qsymm
# Linear algebra libraraies
- mumps
- blas #=1.1 openblas
- openblas #=0.2.20
# Linear algebra libraries
# Pin mumps due to switching int size in 5.5.1
- mumps-seq=5.2.1
- blas
- openblas
# Build toolchain
- toolchain3
- compilers
- cython
- libgfortran
## Dev Dependencies
......@@ -26,9 +27,9 @@ dependencies:
- pytest-flakes
- pytest-pep8
# Documentation building
- sphinx
- numpydoc
- requests
- jupyter_sphinx
- pip:
- git+https://github.com/sphinx-doc/sphinx.git@bedbb8c8259f1b4520ed654ffda3a045c55163d7
- sphinxcontrib-svg2pdfconverter
......@@ -2,15 +2,15 @@ name: kwant-stable-no-extras
channels:
- conda-forge
dependencies:
- python=3.7
- numpy=1.16.2
- scipy=1.1.0
- tinyarray=1.2
# Linear algebra libraraies
- python=3.8
- numpy=1.18
- scipy=1.3
- tinyarray=1.2.2
# Linear algebra libraries
- blas #=1.1 openblas
- openblas #=0.2.20
# Build toolchain
- toolchain3
- compilers
- cython
- libgfortran
## Dev Dependencies
......@@ -19,3 +19,7 @@ dependencies:
- pytest-cov
- pytest-flakes
- pytest-pep8
# Documentation building
- sphinx=2.4.4 # later versions seem to have problems
- numpydoc
- requests
......@@ -2,20 +2,21 @@ name: kwant-stable
channels:
- conda-forge
dependencies:
- python=3.7
- numpy=1.16.2
- scipy=1.1.0
- tinyarray=1.2
- sympy=1.3.0
- matplotlib-base=3.0.2
- plotly=3.6.1
- qsymm=1.3.0
# Linear algebra libraraies
- mumps
- python=3.8
- numpy=1.18
- scipy=1.3
- tinyarray=1.2.2
- sympy=1.5.1
- matplotlib-base=3.2.2
- plotly=2.2.2
- qsymm=1.2.6
# Linear algebra libraries
# Pin mumps due to switching int size in 5.5.1
- mumps-seq=5.2.1
- blas #=1.1 openblas
- openblas #=0.2.20
# Build toolchain
- toolchain3
- compilers
- cython
- libgfortran
## Dev Dependencies
......@@ -24,3 +25,7 @@ dependencies:
- pytest-cov
- pytest-flakes
- pytest-pep8
# Documentation building
- sphinx=2.4.4
- numpydoc
- requests
......@@ -19,13 +19,11 @@ __all__ = []
package_root = os.path.dirname(os.path.realpath(__file__))
distr_root = os.path.dirname(package_root)
def ensure_python(required_version=(3, 5)):
def ensure_python(required_version=(3, 8)):
v = sys.version_info
if v[:3] < required_version:
error = "This version of Kwant requires Python {} or above.".format(
".".join(str(p) for p in required_version))
if v[0] == 2:
error += "\nKwant 1.1 is the last version to support Python 2."
print(error, file=sys.stderr)
sys.exit(1)
......
......@@ -482,7 +482,8 @@ def maybe_add_numpy_include(exts):
def main():
check_python_version((3, 6))
min_python_version = (3, 8)
check_python_version(min_python_version)
check_versions()
exts = collections.OrderedDict([
......@@ -556,6 +557,7 @@ def main():
# qsymm is only packaged on PyPI
'qsymm': 'qsymm >= 1.3.0',
},
python_requires=f'>={min_python_version[0]}.{min_python_version[1]}',
classifiers=[c.strip() for c in classifiers.split('\n')])
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment