From bf53047dbd7176ff2a84c56b7cdcc7e5f4159278 Mon Sep 17 00:00:00 2001 From: paugier Date: Wed, 24 Jan 2024 12:59:42 +0100 Subject: [PATCH] Start to simplify setup.py --- pyproject.toml | 1 - setup.py | 21 +-------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c33b0b7..a87e093 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ authors = [ ] dependencies = [ "fluiddyn >= 0.2.3", - "mpi4py", "transonic >= 0.4", ] requires-python = ">= 3.9" diff --git a/setup.py b/setup.py index 77b97e5..2fdf1df 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -from runpy import run_path from pathlib import Path import sys @@ -14,32 +13,14 @@ ) from setup_build import FluidFFTBuildExt -# Get the long description from the relevant file -with open("README.rst") as file: - lines = file.readlines() -for i, line in enumerate(lines): - if line.endswith(":alt: Code coverage\n"): - iline_coverage = i - break -long_description = "".join(lines[iline_coverage + 2 :]) - -# Get the version from the relevant file -d = run_path("src/fluidfft/_version.py") -__version__ = d["__version__"] - -# Set setup_requires and install_requires depending on the configuration -install_requires = ["fluiddyn >= 0.2.3", "transonic >= 0.4"] +# Set setup_requires depending on the configuration setup_requires = [] setup_requires.extend(build_dependencies_backends[TRANSONIC_BACKEND]) if build_needs_mpi4py: setup_requires.append("mpi4py") - install_requires.append("mpi4py") setup( - version=__version__, - long_description=long_description, setup_requires=setup_requires, - install_requires=install_requires, # To trick build into running build_ext (taken from h5py) ext_modules=[Extension("trick.x", ["trick.c"])], cmdclass={"build_ext": FluidFFTBuildExt},