Skip to content

Commit

Permalink
Merge branch '930-python3.9' into 'master'
Browse files Browse the repository at this point in the history
feat: support python >= 3.9

See merge request 3d/cars-park/cars!774
  • Loading branch information
dyoussef committed Dec 3, 2024
2 parents 9a8c05e + c6b04b6 commit 35aabf8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ FROM orfeotoolbox/otb:latest
LABEL maintainer="CNES"

# Dependencies packages
RUN apt-get update && apt install software-properties-common -y && add-apt-repository ppa:deadsnakes/ppa

# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y --quiet \
git \
libpython3.8 \
python3.8-dev \
python3.8-venv \
python3.8 \
libpython3.10 \
python3.10-dev \
python3.10-venv \
python3.10 \
python3-pip \
python3-numpy \
python3-virtualenv \
Expand All @@ -18,7 +20,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y --quiet \
# copy and install cars with mccnn plugin capabilities installed (but not configured by default)
WORKDIR /app


RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# Create a virtual environment
RUN python3 -m venv /app/venv

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<h4>CARS, a satellite multi view stereo framework </h4>

[![Python](https://img.shields.io/badge/python-v3.8+-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Python](https://img.shields.io/badge/python-v3.9+-blue.svg)](https://www.python.org/downloads/release/python-390/)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](CONTRIBUTING.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0/)
[![Documentation](https://readthedocs.org/projects/cars/badge/?version=latest)](https://cars.readthedocs.io/?badge=latest)
Expand Down
6 changes: 3 additions & 3 deletions cars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

import os
import sys
from importlib import metadata

# VERSION through setuptools_scm when python3 > 3.8
from setuptools_scm import get_version

try:
__version__ = metadata.version("cars")
__version__ = get_version()
except Exception: # pylint: disable=broad-except
__version__ = "unknown"

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ classifiers =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9

[options]
python_requires = >=3.8
python_requires = >=3.9

setup_requires =
setuptools>=45
Expand Down

0 comments on commit 35aabf8

Please sign in to comment.