diff --git a/snakemake-7.32.4-pulp-2.8.patch b/snakemake-7.32.4-pulp-2.8.patch new file mode 100644 index 0000000..f26dd34 --- /dev/null +++ b/snakemake-7.32.4-pulp-2.8.patch @@ -0,0 +1,12 @@ +diff -Naur snakemake-7.32.4-original/snakemake/__init__.py snakemake-7.32.4/snakemake/__init__.py +--- snakemake-7.32.4-original/snakemake/__init__.py 2023-09-18 10:42:36.000000000 -0400 ++++ snakemake-7.32.4/snakemake/__init__.py 2024-07-16 10:12:09.542270257 -0400 +@@ -1604,7 +1604,7 @@ + try: + import pulp + +- lp_solvers = pulp.list_solvers(onlyAvailable=True) ++ lp_solvers = pulp.listSolvers(onlyAvailable=True) + except ImportError: + # Dummy list for the case that pulp is not available + # This only happened when building docs. diff --git a/snakemake.spec b/snakemake.spec index 46fd73f..baadeeb 100644 --- a/snakemake.spec +++ b/snakemake.spec @@ -32,6 +32,9 @@ BuildArch: noarch # Since we build the docs as a PDF, we can’t include an animated GIF demo. # Patch out the image reference and the text referring to it. Patch: snakemake-7.11.0-docs-no-animated-demo.patch +# Fix compatibility with python-pulp 2.8.0 +# Downstream-only since snakemake 7.x is no longer developed, and 8.x is OK +Patch: snakemake-7.32.4-pulp-2.8.patch BuildRequires: python3-devel @@ -42,6 +45,9 @@ Requires: vim-filesystem Provides: vim-snakemake = %{version}-%{release} +# The patch for pulp 2.8 is not backwards-compatible with 2.7. +Requires: (%{py3_dist pulp} >= 2.8 if %{py3_dist pulp}) + %if %{with tests} # See test-environment.yml for a listing of test dependencies, along with a lot # of other cruft.