From ac98d40f30eac1c2941b9c67fd18b4c9794af3a5 Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Sat, 26 Oct 2024 07:09:29 +0000 Subject: [PATCH 1/6] Update cgat-apps to 0.7.4 --- recipes/cgat-apps/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/cgat-apps/meta.yaml b/recipes/cgat-apps/meta.yaml index 4cf264a7950fe..fec337e0216ee 100644 --- a/recipes/cgat-apps/meta.yaml +++ b/recipes/cgat-apps/meta.yaml @@ -1,5 +1,5 @@ {% set name = "cgat-apps" %} -{% set version = "0.7.2" %} +{% set version = "0.7.4" %} package: name: {{ name|lower }} @@ -7,11 +7,11 @@ package: source: url: https://pypi.io/packages/source/c/cgat/cgat-{{ version }}.tar.gz - sha256: 746701d1a6677e8200092894c35c942383123fd8e22ab172f3ef6b2222b8eaef + sha256: 80a602090d995f6e3214772786b13a34354601c1b4387cfef0aabe9a6323cdbd build: - number: 2 + number: 0 skip: true # [py == 312] run_exports: - {{ pin_subpackage('cgat-apps', max_pin="x.x") }} From e8176cf92be507dfdb702f9a642a7b0f09268aee Mon Sep 17 00:00:00 2001 From: mencian Date: Mon, 28 Oct 2024 01:50:08 -0500 Subject: [PATCH 2/6] clean up recipe --- recipes/cgat-apps/build.sh | 30 ++--- recipes/cgat-apps/build_failure.linux-64.yaml | 105 ------------------ recipes/cgat-apps/build_failure.osx-64.yaml | 105 ------------------ recipes/cgat-apps/meta.yaml | 13 +-- 4 files changed, 15 insertions(+), 238 deletions(-) delete mode 100644 recipes/cgat-apps/build_failure.linux-64.yaml delete mode 100644 recipes/cgat-apps/build_failure.osx-64.yaml diff --git a/recipes/cgat-apps/build.sh b/recipes/cgat-apps/build.sh index 404e4cfe860ef..c2405bcd10101 100644 --- a/recipes/cgat-apps/build.sh +++ b/recipes/cgat-apps/build.sh @@ -1,28 +1,16 @@ #!/bin/bash # export compiler flags -#export CFLAGS=${CFLAGS}" -I${PREFIX}/include -L${PREFIX}/lib" -#export CPPFLAGS=${CPPFLAGS}" -I${PREFIX}/include -L${PREFIX}/lib" -export LDFLAGS=${LDFLAGS}" -I${PREFIX}/include -L${PREFIX}/lib" -export CPATH=${CPATH}" -I${PREFIX}/include -L${PREFIX}/lib" -export C_INCLUDE_PATH=${C_INCLUDE_PATH}:${PREFIX}/include -export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${PREFIX}/include -export LIBRARY_PATH=${LIBRARY_PATH}:${PREFIX}/lib -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib:${PREFIX}/lib/R/lib - -# linking htslib, see: -# http://pysam.readthedocs.org/en/latest/installation.html#external -# https://github.com/pysam-developers/pysam/blob/v0.9.0/setup.py#L79 -#export CFLAGS="-I$PREFIX/include -DHAVE_LIBDEFLATE" -#export CPPFLAGS="-I$PREFIX/include -DHAVE_LIBDEFLATE" -#export LDFLAGS="-L$PREFIX/lib" - -#export HTSLIB_LIBRARY_DIR=$PREFIX/lib -#export HTSLIB_INCLUDE_DIR=$PREFIX/include +export INCLUDE_PATH="${PREFIX}/include" +export LIBRARY_PATH="${PREFIX}/lib" +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" +export CFLAGS="${CFLAGS} -O3 -L${PREFIX}/lib" +export CPPFLAGS="${CPPFLAGS} -O3 -I${PREFIX}/include" # remove install_requires (no longer required with conda package) -sed -i'' -e '/REPO_REQUIREMENT/,/pass/d' setup.py -sed -i'' -e '/# dependencies/,/dependency_links=dependency_links,/d' setup.py +sed -i.bak'' -e '/REPO_REQUIREMENT/,/pass/d' setup.py +sed -i.bak'' -e '/# dependencies/,/dependency_links=dependency_links,/d' setup.py +rm -rf *.bak # https://bioconda.github.io/linting.html#setup-py-install-args -$PYTHON setup.py install --single-version-externally-managed --record=record.txt +$PYTHON -m pip install . --no-deps --no-build-isolation --no-cache-dir -vvv diff --git a/recipes/cgat-apps/build_failure.linux-64.yaml b/recipes/cgat-apps/build_failure.linux-64.yaml deleted file mode 100644 index e3ce08b25b4e4..0000000000000 --- a/recipes/cgat-apps/build_failure.linux-64.yaml +++ /dev/null @@ -1,105 +0,0 @@ -recipe_sha: cd4db28503c1e8d834aba9be11a1d56ca31801f1fcbbef8169312e7476bc9123 # The hash of the recipe's meta.yaml at which this recipe failed to build. -skiplist: true # Set to true to skiplist this recipe so that it will be ignored as long as its latest commit is the one given above. -category: dependency issue -log: |2- - File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 712, in _maybe_raise_for_problems - self._maybe_raise_for_conda_build( - File "/opt/conda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 805, in _maybe_raise_for_conda_build - raise exc - conda_libmamba_solver.conda_build_exceptions.ExplainedDependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {MatchSpec("python[version='>=3.7,<3.8.0a0']"), MatchSpec("alignlib-lite==0.3=py37h3f2a3d2_2")} - Encountered problems while solving: - - package alignlib-lite-0.3-py37h3f2a3d2_2 requires python >=3.7,<3.8.0a0, but none of the providers can be installed - - Could not solve for environment specs - The following packages are incompatible - [32malignlib-lite[0m is installable with the potential options - [32malignlib-lite 0.3[0m would require - [32mpython >=3.7,<3.8.0a0 [0m with the potential options - [32mpython [2.7.15|3.5.5|3.6.6|3.7.0][0m would require - [32mopenssl >=1.0.2o,<1.0.3a [0m, which can be installed; - [32mpython [2.7.15|3.6.6|3.6.7|3.7.0|3.7.1][0m would require - [32mopenssl >=1.0.2p,<1.0.3a [0m, which can be installed; - [32mpython [2.7.15|3.6.7|...|3.7.6][0m would require - [32mopenssl >=1.1.1a,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.0.* [0m with the potential options - [32mpypy3.6 7.3.0[0m would require - [32mopenssl >=1.1.1a,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.0[0m would require - [32mopenssl >=1.1.1d,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.0[0m would require - [32mopenssl >=1.1.1e,<1.1.2a [0m, which can be installed; - [32mpython 3.7.10[0m would require - [32mpypy3.7 [7.3.4.* |7.3.5.* ][0m with the potential options - [32mpypy3.7 [7.3.4|7.3.5][0m would require - [32mopenssl >=1.1.1k,<1.1.2a [0m, which can be installed; - [32mpypy3.7 7.3.5[0m would require - [32mopenssl >=1.1.1l,<1.1.2a [0m, which can be installed; - [32mpython [3.6.13|3.6.15|3.7.10|3.7.12][0m would require - [32mopenssl >=1.1.1l,<1.1.2a [0m, which can be installed; - [32mpython [3.7.10|3.7.12][0m, which can be installed; - [32mpython [3.6.13|3.7.10][0m would require - [32mopenssl >=1.1.1j,<1.1.2a [0m, which can be installed; - [32mpython [3.6.12|3.7.5|3.7.9][0m would require - [32mopenssl >=1.1.1i,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.3.* [0m, which requires - [32mopenssl >=1.1.1i,<1.1.2a [0m, which can be installed; - [32mpypy3.7 7.3.3.* [0m, which requires - [32mopenssl >=1.1.1i,<1.1.2a [0m, which can be installed; - [32mpython [3.6.10|3.6.11|3.7.6|3.7.8][0m would require - [32mopenssl >=1.1.1g,<1.1.2a [0m, which can be installed; - [32mpython 3.7.6[0m would require - [32mopenssl >=1.1.1e,<1.1.2a [0m, which can be installed; - [32mpython [3.6.11|3.6.12|3.6.9|3.7.8|3.7.9][0m would require - [32mopenssl >=1.1.1h,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.2.* [0m, which requires - [32mopenssl >=1.1.1h,<1.1.2a [0m, which can be installed; - [32malignlib-lite [0.2.3|0.3][0m would require - [32mpython [2.7* |3.6* |>=2.7,<2.8.0a0 |>=3.6,<3.7.0a0 ][0m with the potential options - [32mpython [2.7.15|3.5.5|3.6.6|3.7.0][0m, which can be installed (as previously explained); - [32mpython [2.7.15|3.6.6|3.6.7|3.7.0|3.7.1][0m, which can be installed (as previously explained); - [32mpython [2.7.15|3.6.7|...|3.7.6][0m, which can be installed (as previously explained); - [32mpython [3.6.13|3.6.15|3.7.10|3.7.12][0m, which can be installed (as previously explained); - [32mpython [3.6.13|3.7.10][0m, which can be installed (as previously explained); - [32mpython [3.6.12|3.7.5|3.7.9][0m, which can be installed (as previously explained); - [32mpython [3.6.10|3.6.11|3.7.6|3.7.8][0m, which can be installed (as previously explained); - [32mpython [3.6.11|3.6.12|3.6.9|3.7.8|3.7.9][0m, which can be installed (as previously explained); - [32mpython [2.7.12|2.7.13|...|3.6.5][0m would require - [32mopenssl [1.0* |1.0.* ][0m, which can be installed; - [32mpython [3.6.10|3.6.9][0m would require - [32mopenssl >=1.1.1f,<1.1.2a [0m, which can be installed; - [32mpypy3.6 7.3.1.* [0m, which requires - [32mopenssl >=1.1.1f,<1.1.2a [0m, which can be installed; - [32mpython [3.6.10|3.6.9][0m would require - [32mopenssl >=1.1.1d,<1.1.2a [0m, which can be installed; - [32malignlib-lite [0.2.3|0.3][0m would require - [32mpython [3.4* |3.5* |>=3.5,<3.6.0a0 ][0m, which can be installed (as previously explained); - [32malignlib-lite 0.3[0m would require - [32mpython_abi 3.10.* *_cp310[0m, which can be installed; - [32malignlib-lite 0.3[0m would require - [32mpython_abi 3.7.* *_cp37m[0m, which can be installed; - [32malignlib-lite 0.3[0m would require - [32mpython_abi 3.8.* *_cp38[0m, which can be installed; - [32malignlib-lite 0.3[0m would require - [32mpython_abi 3.9.* *_cp39[0m, which can be installed; - [32mpysam >=0.22.1,<0.23.0a0 [0m is installable with the potential options - [32mpysam 0.22.1[0m would require - [32mpython_abi 3.8.* *_cp38[0m, which can be installed; - [32mpysam 0.22.1[0m would require - [32mpython_abi 3.10.* *_cp310[0m, which can be installed; - [31mpysam 0.22.1[0m would require - [31mopenssl >=3.3.1,<4.0a0 [0m, which conflicts with any installable versions previously reported; - [32mpysam 0.22.1[0m would require - [32mpython_abi 3.12.* *_cp312[0m, which can be installed; - [32mpysam 0.22.1[0m would require - [32mpython_abi 3.9.* *_cp39[0m, which can be installed; - [31mpython >=3.11,<3.12.0a0 [0m is not installable because there are no viable options - [31mpython [3.11.0|3.11.1|...|3.11.9][0m would require - [31mpython_abi 3.11.* *_cp311[0m, which conflicts with any installable versions previously reported; - [31mpython 3.11.0[0m would require - [32mopenssl >=1.1.1q,<1.1.2a [0m, which can be installed; - [31mpython_abi 3.11.* *_cp311[0m, which conflicts with any installable versions previously reported; - [31mpython 3.11.0[0m would require - [32mopenssl >=1.1.1s,<1.1.2a [0m, which can be installed; - [31mpython_abi 3.11.* *_cp311[0m, which conflicts with any installable versions previously reported; - [31mpython_abi 3.11.* *_cp311[0m is not installable because it conflicts with any installable versions previously reported. -# Last 100 lines of the build log. diff --git a/recipes/cgat-apps/build_failure.osx-64.yaml b/recipes/cgat-apps/build_failure.osx-64.yaml deleted file mode 100644 index 63feff1b5e2d5..0000000000000 --- a/recipes/cgat-apps/build_failure.osx-64.yaml +++ /dev/null @@ -1,105 +0,0 @@ -recipe_sha: cd4db28503c1e8d834aba9be11a1d56ca31801f1fcbbef8169312e7476bc9123 # The hash of the recipe's meta.yaml at which this recipe failed to build. -skiplist: true # Set to true to skiplist this recipe so that it will be ignored as long as its latest commit is the one given above. -category: dependency issue -log: |2- - alignlib-lite 0.3 would require - python_abi 3.7.* *_cp37m, which can be installed; - alignlib-lite 0.3 would require - python >=3.7,<3.8.0a0 , which can be installed; - alignlib-lite 0.3 would require - python_abi 3.8.* *_cp38, which can be installed; - alignlib-lite 0.3 would require - python_abi 3.9.* *_cp39, which can be installed; - pysam >=0.22.1,<0.23.0a0 is installable with the potential options - pysam 0.22.1 would require - xz >=5.2.6,<6.0a0 , which conflicts with any installable versions previously reported; - pysam 0.22.1 would require - python_abi 3.12.* *_cp312, which can be installed; - python >=3.11,<3.12.0a0 is not installable because it requires - python_abi 3.11.* *_cp311, which conflicts with any installable versions previously reported; - python_abi 3.11.* *_cp311 is not installable because it conflicts with any installable versions previously reported. - - During handling of the above exception, another exception occurred: - - Traceback (most recent call last): - File "/opt/mambaforge/envs/bioconda/bin/conda-build", line 11, in - sys.exit(execute()) - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 590, in execute - api.build( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/api.py", line 250, in build - return build_tree( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/build.py", line 3638, in build_tree - packages_from_this = build( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/build.py", line 2409, in build - create_build_envs(top_level_pkg, notest) - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/build.py", line 2247, in create_build_envs - raise e - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/build.py", line 2220, in create_build_envs - environ.get_package_records( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/environ.py", line 937, in get_install_actions - precs = get_package_records( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/environ.py", line 937, in get_install_actions - precs = get_package_records( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/environ.py", line 937, in get_install_actions - precs = get_package_records( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/environ.py", line 891, in get_install_actions - precs = _install_actions(prefix, index, specs)["LINK"] - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_build/environ.py", line 1301, in install_actions - txn = solver.solve_for_transaction(prune=False, ignore_pinned=False) - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda/core/solve.py", line 153, in solve_for_transaction - unlink_precs, link_precs = self.solve_for_diff( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda/core/solve.py", line 222, in solve_for_diff - final_precs = self.solve_final_state( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 223, in solve_final_state - out_state = self._solving_loop(in_state, out_state, index) - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 303, in _solving_loop - solved = self._solve_attempt(in_state, out_state, index, attempt=attempt) - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 414, in _solve_attempt - new_conflicts = self._maybe_raise_for_problems( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 712, in _maybe_raise_for_problems - self._maybe_raise_for_conda_build( - File "/opt/mambaforge/envs/bioconda/lib/python3.10/site-packages/conda_libmamba_solver/solver.py", line 805, in _maybe_raise_for_conda_build - raise exc - conda_libmamba_solver.conda_build_exceptions.ExplainedDependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: {MatchSpec("alignlib-lite==0.2.3=py27_1"), MatchSpec("python=2.7")} - Encountered problems while solving: - - package alignlib-lite-0.2.3-py27_1 requires python 2.7*, but none of the providers can be installed - - Could not solve for environment specs - The following packages are incompatible - alignlib-lite is installable with the potential options - alignlib-lite [0.2.3|0.3] would require - python [2.7* |>=2.7,<2.8.0a0 ], which can be installed; - alignlib-lite [0.2.3|0.3] would require - python 3.4* , which can be installed; - alignlib-lite [0.2.3|0.3] would require - python [3.5* |>=3.5,<3.6.0a0 ] with the potential options - python [3.5.1|3.5.2] would require - xz 5.0.* , which can be installed; - python [3.5.2|3.5.3|3.5.4|3.5.5], which can be installed; - alignlib-lite 0.3 would require - python_abi 2.7.* *_cp27m, which can be installed; - alignlib-lite 0.3 would require - python_abi 3.10.* *_cp310, which can be installed; - alignlib-lite 0.3 would require - python 3.6* , which can be installed; - alignlib-lite 0.3 would require - python >=3.6,<3.7.0a0 , which can be installed; - alignlib-lite 0.3 would require - python_abi 3.6.* *_cp36m, which can be installed; - alignlib-lite 0.3 would require - python_abi 3.7.* *_cp37m, which can be installed; - alignlib-lite 0.3 would require - python >=3.7,<3.8.0a0 , which can be installed; - alignlib-lite 0.3 would require - python_abi 3.8.* *_cp38, which can be installed; - alignlib-lite 0.3 would require - python_abi 3.9.* *_cp39, which can be installed; - pysam >=0.22.1,<0.23.0a0 is installable with the potential options - pysam 0.22.1 would require - xz >=5.2.6,<6.0a0 , which conflicts with any installable versions previously reported; - pysam 0.22.1 would require - python_abi 3.12.* *_cp312, which can be installed; - python >=3.11,<3.12.0a0 is not installable because it requires - python_abi 3.11.* *_cp311, which conflicts with any installable versions previously reported; - python_abi 3.11.* *_cp311 is not installable because it conflicts with any installable versions previously reported. -# Last 100 lines of the build log. diff --git a/recipes/cgat-apps/meta.yaml b/recipes/cgat-apps/meta.yaml index fec337e0216ee..80ff4a6c70084 100644 --- a/recipes/cgat-apps/meta.yaml +++ b/recipes/cgat-apps/meta.yaml @@ -8,11 +8,9 @@ package: source: url: https://pypi.io/packages/source/c/cgat/cgat-{{ version }}.tar.gz sha256: 80a602090d995f6e3214772786b13a34354601c1b4387cfef0aabe9a6323cdbd - build: number: 0 - skip: true # [py == 312] run_exports: - {{ pin_subpackage('cgat-apps', max_pin="x.x") }} entry_points: @@ -24,11 +22,10 @@ requirements: - {{ compiler('cxx') }} host: - python - - cython + - pip + - cython >=0.29.35 - numpy - pysam - - htslib - - setuptools run: - python - cgatcore @@ -52,7 +49,6 @@ requirements: - ucsc-wigtobigwig - coreutils - grep - - zlib test: imports: @@ -65,7 +61,10 @@ test: - cgat bam2bed -h about: - home: https://cgat-apps.readthedocs.io/en/latest/ + home: "https://github.com/cgat-developers/cgat-apps" license: MIT + license_family: MIT license_file: LICENSE summary: "Computational Genomics Analysis Toolkit" + dev_url: "https://github.com/cgat-developers/cgat-apps" + doc_url: "https://cgat-apps.readthedocs.io/en/latest" From 00af705c878b1d3d21d46044aaadcd64b9544d1b Mon Sep 17 00:00:00 2001 From: mencian Date: Mon, 28 Oct 2024 02:27:03 -0500 Subject: [PATCH 3/6] add cplus_include_path --- recipes/cgat-apps/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/cgat-apps/build.sh b/recipes/cgat-apps/build.sh index c2405bcd10101..eea7d10366527 100644 --- a/recipes/cgat-apps/build.sh +++ b/recipes/cgat-apps/build.sh @@ -6,6 +6,7 @@ export LIBRARY_PATH="${PREFIX}/lib" export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" export CFLAGS="${CFLAGS} -O3 -L${PREFIX}/lib" export CPPFLAGS="${CPPFLAGS} -O3 -I${PREFIX}/include" +export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${SRC_DIR}/cgat/Components" # remove install_requires (no longer required with conda package) sed -i.bak'' -e '/REPO_REQUIREMENT/,/pass/d' setup.py From 2ac1e17ae6906da0e043250d021050ae7d29f6be Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Mon, 28 Oct 2024 02:54:44 -0500 Subject: [PATCH 4/6] Update build.sh --- recipes/cgat-apps/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/cgat-apps/build.sh b/recipes/cgat-apps/build.sh index eea7d10366527..c2405bcd10101 100644 --- a/recipes/cgat-apps/build.sh +++ b/recipes/cgat-apps/build.sh @@ -6,7 +6,6 @@ export LIBRARY_PATH="${PREFIX}/lib" export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" export CFLAGS="${CFLAGS} -O3 -L${PREFIX}/lib" export CPPFLAGS="${CPPFLAGS} -O3 -I${PREFIX}/include" -export CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:${SRC_DIR}/cgat/Components" # remove install_requires (no longer required with conda package) sed -i.bak'' -e '/REPO_REQUIREMENT/,/pass/d' setup.py From 7121c1a0c0078b79ac8acf349326e3d203107286 Mon Sep 17 00:00:00 2001 From: mencian Date: Tue, 12 Nov 2024 22:42:02 -0600 Subject: [PATCH 5/6] clean up recipe --- recipes/cgat-apps/0001-setup.py.patch | 327 ++++++++++++++++++++++++++ recipes/cgat-apps/meta.yaml | 8 +- 2 files changed, 332 insertions(+), 3 deletions(-) create mode 100644 recipes/cgat-apps/0001-setup.py.patch diff --git a/recipes/cgat-apps/0001-setup.py.patch b/recipes/cgat-apps/0001-setup.py.patch new file mode 100644 index 0000000000000..7dc8f129e99f4 --- /dev/null +++ b/recipes/cgat-apps/0001-setup.py.patch @@ -0,0 +1,327 @@ +diff --git a/requires.txt b/requires.txt +deleted file mode 100644 +index e69de29b..00000000 +diff --git a/setup.py b/setup.py +index 1cc415ea..56d2ccd8 100644 +--- a/setup.py ++++ b/setup.py +@@ -4,239 +4,73 @@ import os + import subprocess + import re + +-######################################################################## +-####################################################################### +-# Check for dependencies +-# +-# Is there a way to do this more elegantly? +-# 1. Run "pip install numpy" +-# 2. Wrap inside functions (works for numpy/pysam, but not cython) +-try: +- import numpy +-except ImportError: +- raise ImportError( +- "the CGAT code collection requires numpy to be installed " +- "before running setup.py (pip install numpy)") ++# Import setuptools at the beginning ++import setuptools ++from setuptools import setup, find_packages, Extension ++from distutils.version import LooseVersion ++from Cython.Distutils import build_ext + ++# Ensure dependencies are installed before setup + try: ++ import numpy + import Cython +-except ImportError: +- raise ImportError( +- "the CGAT code collection requires cython to " +- "be installed before running setup.py (pip install cython)") +- +-try: + import pysam +-except ImportError: +- raise ImportError( +- "the CGAT code collection requires pysam to " +- "be installed before running setup.py (pip install pysam)") ++except ImportError as e: ++ missing_package = str(e).split("'")[1] ++ raise ImportError(f"{missing_package} must be installed before running setup.py") + +-######################################################################## +-######################################################################## +-# Import setuptools +-# Use existing setuptools, otherwise try ez_setup. +-try: +- import setuptools +-except ImportError: +- # try to get via ez_setup +- # ez_setup did not work on all machines tested as +- # it uses curl with https protocol, which is not +- # enabled in ScientificLinux +- import ez_setup +- ez_setup.use_setuptools() ++# Enforce Python 3 requirement ++if sys.version_info < (3, 6): ++ raise SystemExit("Python 3.6 or later is required to install this package.") + +-from setuptools import setup, find_packages, Extension +- +-from distutils.version import LooseVersion ++# Minimum setuptools version requirement + if LooseVersion(setuptools.__version__) < LooseVersion('1.1'): +- print("Version detected:", LooseVersion(setuptools.__version__)) +- raise ImportError( +- "the CGAT code collection requires setuptools 1.1 higher") ++ raise ImportError("Setuptools version >=1.1 is required") + +-from Cython.Distutils import build_ext +- +-######################################################################## +-######################################################################## +-IS_OSX = sys.platform == 'darwin' +- +-######################################################################## +-######################################################################## +-# collect CGAT version ++# Define version and other package information + sys.path.insert(0, "cgat") + import version +- + version = version.__version__ + +-############################################################### +-############################################################### +-# Check for external dependencies +-# +-# Not exhaustive, simply execute a representative tool from a toolkit. +-external_dependencies = ( +- ("wigToBigWig", "UCSC tools", 255), +- ("bedtools", "bedtools", 0), +- ) ++IS_OSX = sys.platform == 'darwin' + ++# External dependency check ++external_dependencies = [("wigToBigWig", "UCSC tools", 255), ("bedtools", "bedtools", 0)] + for tool, toolkit, expected in external_dependencies: +- try: +- # py3k +- from subprocess import DEVNULL +- except ImportError: +- DEVNULL = open(os.devnull, 'wb') +- +- try: +- retcode = subprocess.call(tool, shell=True, +- stdout=DEVNULL, stderr=DEVNULL) +- except OSError as msg: +- print(("WARNING: depency check for %s failed: %s" % (toolkit, msg))) +- +- # UCSC tools return 255 when called without arguments ++ retcode = subprocess.call(tool, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + if retcode != expected: +- print(("WARNING: depency check for %s(%s) failed, error %i" % +- (toolkit, tool, retcode))) +- +-############################################################### +-############################################################### +-# Define dependencies +-# +-major, minor1, minor2, s, tmp = sys.version_info +- +-if (major == 2 and minor1 < 7) or major < 2: +- raise SystemExit("""CGAT requires Python 2.7 or later.""") +- +- +-##################################################################### +-##################################################################### +-# Code to install dependencies from a repository +-##################################################################### +-# Modified from http://stackoverflow.com/a/9125399 +-##################################################################### +-def which(program): +- """ +- Detect whether or not a program is installed. +- Thanks to http://stackoverflow.com/a/377028/70191 +- """ +- def is_exe(fpath): +- return os.path.exists(fpath) and os.access(fpath, os.X_OK) +- +- fpath, _ = os.path.split(program) +- if fpath: +- if is_exe(program): +- return program +- else: +- for path in os.environ['PATH'].split(os.pathsep): +- exe_file = os.path.join(path, program) +- if is_exe(exe_file): +- return exe_file +- +- return None +- +-REPO_REQUIREMENT = re.compile( +- r'^-e (?P(?Pgit|svn|hg|bzr).+#egg=(?P.+)-(?P\d(?:\.\d)*))$') +-HTTPS_REQUIREMENT = re.compile( +- r'^-e (?P.*).+#(?P.+)-(?P\d(?:\.\d)*)$') +-install_requires = [] +-dependency_links = [] +- +-for requirement in ( +- l.strip() for l in open('requires.txt') if not l.startswith("#")): +- match = REPO_REQUIREMENT.match(requirement) +- if match: +- assert which(match.group('vcs')) is not None, \ +- ("VCS '%(vcs)s' must be installed in order to " +- "install %(link)s" % match.groupdict()) +- install_requires.append("%(package)s==%(version)s" % match.groupdict()) +- dependency_links.append(match.group('link')) +- continue ++ print(f"WARNING: Dependency check for {toolkit} ({tool}) failed with error code {retcode}") + +- if requirement.startswith("https"): +- install_requires.append(requirement) +- continue + +- match = HTTPS_REQUIREMENT.match(requirement) +- if match: +- install_requires.append("%(package)s>=%(version)s" % match.groupdict()) +- dependency_links.append(match.group('link')) +- continue +- +- install_requires.append(requirement) +- +-if major == 2: +- install_requires.extend(['web.py>=0.37', +- 'xlwt>=0.7.4', +- 'matplotlib-venn>=0.5']) +-elif major == 3: +- pass +- +-cgat_packages = find_packages(exclude=['tests']) ++# Adjust packages and directories ++cgat_packages = find_packages(include=["cgat", "cgat.*"], exclude=['tests']) + cgat_package_dirs = {'cgat': 'cgat'} + +-########################################################## +-########################################################## +-# classifiers +-classifiers = """ +-Development Status :: 3 - Alpha +-Intended Audience :: Science/Research +-Intended Audience :: Developers +-License :: OSI Approved +-Programming Language :: Python +-Topic :: Software Development +-Topic :: Scientific/Engineering +-Operating System :: POSIX +-Operating System :: Unix +-Operating System :: MacOS +-""" +- +-########################################################## +-# Cython Extensions ++# Cython extensions and paths + conda_includes = [os.path.dirname(sysconfig.get_paths()["include"])] + conda_libdirs = [os.path.dirname(sysconfig.get_paths()["stdlib"])] +- +-# Connected components cython extension + pysam_libraries = pysam.get_libraries() +-pysam_libdirs = list(set(os.path.dirname(x) for x in +- pysam_libraries)) + conda_libdirs +- +-# remove lib and .so and add htslib +-pysam_libs = ["hts"] + list([os.path.basename(x)[3:-3] for x in +- pysam_libraries]) +- ++pysam_libdirs = list(set(os.path.dirname(x) for x in pysam_libraries)) + conda_libdirs ++pysam_libs = ["hts"] + [os.path.basename(x)[3:-3] for x in pysam_libraries] + pysam_dirname = os.path.dirname(pysam.__file__) +-if IS_OSX: +- # linking against bundles does no work (and apparently is not needed) +- # within OS X +- extra_link_args = [] +-else: +- extra_link_args = [os.path.join(pysam_dirname, x) for x in +- pysam.get_libraries()] +- +-extra_link_args_pysam = ['-Wl,-rpath,{}'.format(x) for x in pysam_libdirs] +\ +- ['-Wl,-rpath,{}'.format(x) for x in conda_libdirs] ++extra_link_args_pysam = [f'-Wl,-rpath,{x}' for x in pysam_libdirs + conda_libdirs] + + extensions = [ + Extension( + 'cgat.Components', +- ['cgat/Components/Components.pyx', +- 'cgat/Components/connected_components.cpp', ], +- library_dirs=[], +- libraries=[], ++ ['cgat/Components/Components.pyx', 'cgat/Components/connected_components.cpp'], ++ include_dirs=[os.path.join('cgat', 'Components')] + conda_includes, + language="c++", + ), + Extension( + "cgat.NCL.cnestedlist", +- ["cgat/NCL/cnestedlist.pyx", +- "cgat/NCL/intervaldb.c"], +- library_dirs=[], +- libraries=[], ++ ["cgat/NCL/cnestedlist.pyx", "cgat/NCL/intervaldb.c"], + language="c", + ), + Extension( + "cgat.GeneModelAnalysis", + ["cgat/GeneModelAnalysis.pyx"], + include_dirs=conda_includes + pysam.get_include() + [numpy.get_include()], +- library_dirs=[], +- libraries=[], + define_macros=pysam.get_defines(), + language="c", + ), +@@ -292,11 +126,8 @@ extensions = [ + ), + ] + +-for e in extensions: +- e.cython_directives = {'language_level': "3str"} #all are Python-3 +- ++# Build setup configuration + setup( +- # package information + name='cgat', + version=version, + description='cgat : the Computational Genomics Analysis Toolkit', +@@ -306,22 +137,26 @@ setup( + platforms=["any"], + keywords="computational genomics", + long_description='cgat : the Computational Genomics Analysis Toolkit', +- classifiers=[_f for _f in classifiers.split("\n") if _f], ++ classifiers=[_f for _f in """ ++ Development Status :: 3 - Alpha ++ Intended Audience :: Science/Research ++ Intended Audience :: Developers ++ License :: OSI Approved ++ Programming Language :: Python ++ Topic :: Software Development ++ Topic :: Scientific/Engineering ++ Operating System :: POSIX ++ Operating System :: Unix ++ Operating System :: MacOS ++ """.splitlines() if _f], + url="http://www.cgat.org/cgat/Tools/", +- # package contents ++ python_requires=">=3.6", + packages=cgat_packages, + package_dir=cgat_package_dirs, + include_package_data=True, +- entry_points={ +- 'console_scripts': ['cgat = cgat.cgat:main'] +- }, +- # dependencies +- install_requires=install_requires, +- dependency_links=dependency_links, +- # extension modules ++ entry_points={'console_scripts': ['cgat = cgat.cgat:main']}, + ext_modules=extensions, + cmdclass={'build_ext': build_ext}, +- # other options + zip_safe=False, + test_suite="tests", + ) diff --git a/recipes/cgat-apps/meta.yaml b/recipes/cgat-apps/meta.yaml index 80ff4a6c70084..e9bef061c735b 100644 --- a/recipes/cgat-apps/meta.yaml +++ b/recipes/cgat-apps/meta.yaml @@ -6,8 +6,10 @@ package: version: {{ version }} source: - url: https://pypi.io/packages/source/c/cgat/cgat-{{ version }}.tar.gz - sha256: 80a602090d995f6e3214772786b13a34354601c1b4387cfef0aabe9a6323cdbd + url: https://github.com/cgat-developers/cgat-apps/archive/refs/tags/v{{ version }}.tar.gz + sha256: 3e161597c6e4cf59fc121a8527aeddefd1526f7d13c370d5eaf15b4d3a1894e6 + patches: + - 0001-setup.py.patch build: number: 0 @@ -65,6 +67,6 @@ about: license: MIT license_family: MIT license_file: LICENSE - summary: "Computational Genomics Analysis Toolkit" + summary: "Computational Genomics Analysis Toolkit." dev_url: "https://github.com/cgat-developers/cgat-apps" doc_url: "https://cgat-apps.readthedocs.io/en/latest" From 4faeabedec810168d0986683a1e4f46da5ad6710 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:56:29 -0600 Subject: [PATCH 6/6] Update meta.yaml --- recipes/cgat-apps/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/cgat-apps/meta.yaml b/recipes/cgat-apps/meta.yaml index e9bef061c735b..cc4106af5f493 100644 --- a/recipes/cgat-apps/meta.yaml +++ b/recipes/cgat-apps/meta.yaml @@ -28,6 +28,7 @@ requirements: - cython >=0.29.35 - numpy - pysam + - htslib run: - python - cgatcore