-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update khmer #49276
update khmer #49276
Changes from all commits
d235628
3c89534
500a02a
2df58db
78168e0
fe89993
7c2dcb4
3a77668
1225f0e
f90f96f
5eb074e
9101adf
d668c95
6396c5a
d26c86e
bb054f3
7378ed0
b5c5aab
c61e228
a710fc5
f006f5e
3f132a4
5ad90fc
aa58b72
57cc445
4905cab
faf097f
7b35d1a
bfa0bf2
d292d9e
997edb6
cf41d92
4a6ede9
46c4be0
a4b06cc
b91403e
f2ab584
0e490a2
9e81815
23a16fd
c95958f
6deaf33
6d6e998
31748a9
b0dfca9
c258382
0307736
c82c09e
7a896ea
a0d808b
ce5620d
b97ec2d
485df9f
e9a955f
e696b4c
0840ed6
3af0eec
fdb31cc
730f476
4864b18
b596c92
bdffee9
97fa387
43de852
8019cf3
bfd9477
0cc6dd8
31ceb83
8205a3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- khmer-2.1.1/setup.py 2017-05-25 20:10:21.000000000 -0400 | ||
+++ khmer-2.1.1/setup.py 2024-08-07 21:54:04.775775473 -0400 | ||
@@ -123,8 +123,8 @@ | ||
# change setup.cfg or use the `--libraries z,bz2` parameter which will make our | ||
# custom build_ext command strip out the bundled versions. | ||
|
||
-ZLIBDIR = 'third-party/zlib' | ||
-BZIP2DIR = 'third-party/bzip2' | ||
+# ZLIBDIR = 'third-party/zlib' | ||
+# BZIP2DIR = 'third-party/bzip2' | ||
|
||
BUILD_DEPENDS = [] | ||
BUILD_DEPENDS.extend(path_join("lib", bn + ".hh") for bn in [ | ||
@@ -259,7 +259,7 @@ | ||
if sys.platform == 'darwin' and 'gcov' in self.libraries: | ||
self.libraries.remove('gcov') | ||
|
||
- if "z" not in self.libraries: | ||
+ if False: | ||
zcmd = ['bash', '-c', 'cd ' + ZLIBDIR + ' && ( test Makefile -nt' | ||
' configure || bash ./configure --static ) && make -f ' | ||
'Makefile.pic PIC'] | ||
@@ -269,7 +269,7 @@ | ||
"adler32", "compress", "crc32", "deflate", "gzclose", | ||
"gzlib", "gzread", "gzwrite", "infback", "inffast", | ||
"inflate", "inftrees", "trees", "uncompr", "zutil"]) | ||
- if "bz2" not in self.libraries: | ||
+ if False: | ||
bz2cmd = ['bash', '-c', 'cd ' + BZIP2DIR + ' && make -f ' | ||
'Makefile-libbz2_so all'] | ||
spawn(cmd=bz2cmd, dry_run=self.dry_run) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- khmer-2.1.1/setup.cfg 2017-05-25 20:10:21.000000000 -0400 | ||
+++ khmer-2.1.1/setup.cfg 2024-08-07 22:04:20.100887810 -0400 | ||
@@ -3,8 +3,8 @@ | ||
undef = NO_UNIQUE_RC | ||
# libraries = z,bz2 | ||
## if using system libraries | ||
-include-dirs = lib:third-party/zlib:third-party/bzip2:third-party/seqan/core/include:third-party/smhasher | ||
-# include-dirs = lib | ||
+# include-dirs = lib:third-party/zlib:third-party/bzip2:third-party/seqan/core/include:third-party/smhasher | ||
+include_dirs = lib:include:include/seqan:third-party/smhasher | ||
## if using system libraries (broken) | ||
|
||
# define = NDEBUG |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- khmer-2.1.1/MANIFEST.in | ||
+++ khmer-2.1.1/MANIFEST.in | ||
@@ -3,12 +3,12 @@ | ||
include LICENSE TODO .ycm_extra_conf.py authors.csv | ||
recursive-include lib *.hh *.cc [Mm]akefile* get_version.py | ||
recursive-include khmer *.hh | ||
-recursive-include third-party *.cc *.1 *.xsl README* sample* words* *.sh *.c | ||
-recursive-include third-party manual* [Mm]akefile* *.pl *.dsp CHANGES *.txt *.h | ||
-recursive-include third-party ChangeLog FAQ INDEX configure *.xsl | ||
-recursive-include third-party/bzip2 bzip.css entities.xml libbz2.def LICENSE | ||
-include third-party/zlib/zconf.h.in third-party/zlib/zlib.pc.in | ||
-exclude third-party/zlib/Makefile third-party/zlib/zconf.h | ||
+#recursive-include third-party *.cc *.1 *.xsl README* sample* words* *.sh *.c | ||
+#recursive-include third-party manual* [Mm]akefile* *.pl *.dsp CHANGES *.txt *.h | ||
+#recursive-include third-party ChangeLog FAQ INDEX configure *.xsl | ||
+#recursive-include third-party/bzip2 bzip.css entities.xml libbz2.def LICENSE | ||
+#include third-party/zlib/zconf.h.in third-party/zlib/zlib.pc.in | ||
+#exclude third-party/zlib/Makefile third-party/zlib/zconf.h | ||
recursive-include scripts README.txt | ||
graft tests | ||
include scripts/oxli |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -x -e | ||
|
||
# export variables for compiling | ||
export INCLUDE_PATH="${BUILD_PREFIX}/include:${PWD}/third-party/seqan/core/include" | ||
export LIBRARY_PATH="${BUILD_PREFIX}/lib" | ||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PWD}/lib" | ||
|
||
export LDFLAGS="-L${BUILD_PREFIX}/lib -L${PWD}/third-party/seqan/core/include" | ||
export CCPFLAGS="-I${BUILD_PREFIX}/include -I${PWD}/third-party/seqan/core/include" | ||
|
||
# create directories for compiling | ||
mkdir -p $PREFIX/bin | ||
mkdir -p $PREFIX/include | ||
mkdir -p $PREFIX/lib | ||
mkdir -p $PREFIX/scripts | ||
Comment on lines
+13
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add safety check for $PREFIX environment variable The script assumes $PREFIX is set but doesn't verify it. This could lead to unexpected behavior if the variable is unset. Add this check at the beginning of the script: set -x -e
+# Verify required environment variables
+if [ -z "${PREFIX}" ]; then
+ echo "Error: PREFIX environment variable is not set"
+ exit 1
+fi
|
||
|
||
# populate compiling directories | ||
cp -v lib/* $PREFIX/include | ||
cp -v scripts/* $PREFIX/bin | ||
|
||
# copies over third-party/seqan/core/include/seqan | ||
mkdir -pv $PREFIX/include/seqan | ||
cp -vr third-party/seqan/core/include/seqan/* $PREFIX/include/seqan/ | ||
Comment on lines
+19
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix incorrect file copying operations and add error handling There are several issues with the file copying operations:
Consider this improved implementation: -cp -v lib/* $PREFIX/include
-cp -v scripts/* $PREFIX/bin
+# Verify source directories exist
+for dir in lib scripts third-party/seqan/core/include/seqan; do
+ if [ ! -d "$dir" ]; then
+ echo "Error: Required directory $dir not found"
+ exit 1
+ fi
+done
+
+# Copy files to correct locations
+cp -v lib/* $PREFIX/lib || { echo "Error copying library files"; exit 1; }
+cp -v scripts/* $PREFIX/bin || { echo "Error copying scripts"; exit 1; }
|
||
|
||
# install khmer | ||
$PYTHON -m pip install . --no-deps --no-build-isolation --no-cache-dir --use-pep517 -vvv | ||
|
||
# debugging line to find where khmer was installed | ||
echo "here i am! ⊂◉‿◉つ " | ||
ls -lhR |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,49 @@ | ||
{% set version = "3.0.0a3" %} | ||
{% set sha256 = "9850baec8b905c0896f00d0e427d4564f4c87dd7f1abae64734ad0361678e620" %} | ||
{% set version = "2.1.1" %} | ||
{% set sha256 = "39981730c2e08ee183c5ce6ce80cfe2bd6d813cfa37b9ae1f7be0dd1a01dae85" %} | ||
{% set name = "khmer" %} | ||
|
||
package: | ||
name: khmer | ||
name: {{ name }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/dib-lab/khmer/archive/v{{ version }}.tar.gz | ||
sha256: {{ sha256 }} | ||
patches: | ||
- 0001-Inject-compiler-and-flags-for-third-party-compilation.patch | ||
- 0002-do-not-install-dependencies-on-our-own.patch | ||
- 0003-remove-dependencies-from-config.patch | ||
- 0004-remove-dependencies-from-manifest.patch | ||
|
||
build: | ||
number: 4 | ||
skip: True # [py<30 or py>=312 or osx] | ||
script: {{ PYTHON }} -m pip install . --no-deps -vv | ||
number: 0 | ||
skip: True # [py >= 312] | ||
run_exports: | ||
- {{ pin_subpackage('khmer', max_pin="x.x") }} | ||
- {{ pin_subpackage(name|lower, max_pin="x.x") }} | ||
|
||
Comment on lines
+18
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistency with PR objectives regarding Python 3.12 compatibility. The PR objectives mention addressing Python 3.12 compatibility issues, but the recipe explicitly skips Python >= 3.12. This seems contradictory. Please clarify:
|
||
requirements: | ||
build: | ||
- {{ compiler("c") }} | ||
- {{ compiler("cxx") }} | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
- bzip2 | ||
- make | ||
- python | ||
- zlib | ||
host: | ||
- python >=3.6,<3.12 | ||
- python | ||
- pip | ||
- setuptools >=18.0 | ||
- Cython >=0.25.2 | ||
- cython >=0.25.2 | ||
- pytest-runner | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
- bzip2 | ||
- zlib | ||
run: | ||
- python >=3.6,<3.12 | ||
- screed >=1.0 | ||
- bz2file | ||
- bzip2 | ||
- bz2file | ||
- python | ||
- screed >=1.0 | ||
- zlib | ||
- smhasher | ||
|
||
test: | ||
imports: | ||
|
@@ -46,11 +52,12 @@ test: | |
- oxli | ||
|
||
about: | ||
home: https://khmer.readthedocs.io/ | ||
license: BSD License | ||
home: "https://github.com/dib-lab/khmer" | ||
license: "BSD-3-Clause" | ||
license_family: BSD | ||
summary: khmer k-mer counting library | ||
dev_url: https://github.com/dib-lab/khmer | ||
dev_url: "https://github.com/dib-lab/khmer" | ||
doc_url: "https://khmer.readthedocs.io" | ||
|
||
extra: | ||
identifiers: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Review environment variable handling
The environment variable setup has several potential issues:
INCLUDE_PATH
andLIBRARY_PATH
completely override system paths instead of appendingthird-party/seqan
could break if the directory structure changesLD_LIBRARY_PATH
might affect runtime behavior unexpectedlyConsider these improvements:
📝 Committable suggestion