-
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 odgi to 0.9.0 #51405
Update odgi to 0.9.0 #51405
Changes from 2 commits
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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
#!/bin/bash | ||
export LIBRARY_PATH=${PREFIX}/lib | ||
export LD_LIBRARY_PATH=${PREFIX}/lib | ||
export CPATH=${PREFIX}/include | ||
export C_INCLUDE_PATH=${PREFIX}/include | ||
export CPLUS_INCLUDE_PATH=${PREFIX}/include | ||
export CPP_INCLUDE_PATH=${PREFIX}/include | ||
export CXX_INCLUDE_PATH=${PREFIX}/include | ||
#cmake -H. -Bbuild -DPYTHON_EXECUTABLE:FILEPATH=$PYTHON -DCMAKE_BUILD_TYPE=Generic -DEXTRA_FLAGS='-march=sandybridge -Ofast -Og' | ||
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Generic -DEXTRA_FLAGS='-march=sandybridge -Ofast' | ||
cmake --build build | ||
|
||
mkdir -p $PREFIX/bin | ||
mv bin/* $PREFIX/bin | ||
|
||
export INCLUDES="-I${PREFIX}/include" | ||
export LIBPATH="-L${PREFIX}/lib" | ||
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" | ||
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include" | ||
|
||
if [[ `uname` == "Darwin" ]]; then | ||
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER" | ||
else | ||
export CONFIG_ARGS="" | ||
fi | ||
|
||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Generic \ | ||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_CXX_COMPILER="${CXX}" \ | ||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DEXTRA_FLAGS='-march=sandybridge -Ofast' \ | ||
"${CONFIG_ARGS}" | ||
cmake --build build --target install -j "${CPU_COUNT}" -v | ||
|
||
#mv bin/* ${PREFIX}/bin | ||
PYVER=`python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))'` | ||
mkdir -p $PREFIX/lib/python$PYVER/site-packages | ||
cp lib/*cpython* $PREFIX/lib/python$PYVER/site-packages | ||
cp lib/* $PREFIX/lib | ||
#set -x | ||
#python -c "import sys; sys.path.append('./lib'); import odgi_ffi" | ||
#python -c "import sys; sys.path.append('./lib'); import odgi" | ||
mkdir -p "${PREFIX}/lib/python${PYVER}/site-packages" | ||
cp -rf lib/*cpython* "${PREFIX}/lib/python${PYVER}/site-packages" | ||
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. Avoid hardcoding Python implementation-specific patterns The use of Consider using a more general pattern or querying Python for the correct paths. For example: -PYVER=`python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))'`
+PYTHON_SITE_PACKAGES=`python -c 'import site; print(site.getsitepackages()[0])'` Then adjust the copy command accordingly: -mkdir -p "${PREFIX}/lib/python${PYVER}/site-packages"
-cp -rf lib/*cpython* "${PREFIX}/lib/python${PYVER}/site-packages"
+mkdir -p "${PYTHON_SITE_PACKAGES}"
+cp -rf lib/* "${PYTHON_SITE_PACKAGES}" This approach ensures that the modules are placed in the correct directory regardless of the Python implementation.
|
||
cp -rf lib/* "${PREFIX}/lib" | ||
Comment on lines
+24
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. 🛠️ Refactor suggestion Use standard installation methods for Python packages Copying files directly with Consider modifying the build process to install the Python modules using a setup script or ensure that CMake handles the installation correctly. For example:
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,59 @@ | ||
{% set name = "odgi" %} | ||
{% set version = "0.8.6" %} | ||
{% set version = "0.9.0" %} | ||
|
||
package: | ||
name: "{{ name }}" | ||
version: "{{ version }}" | ||
|
||
source: | ||
url: https://github.com/pangenome/{{ name }}/releases/download/v{{ version }}/{{ name }}-v{{ version }}.tar.gz | ||
sha256: a6db190b782608082b14b42c660389aa18010791de1e2d07e29f7f61d8787754 | ||
patches: | ||
- patch | ||
sha256: 73b181c371e619b5e3e5ee87649cb8de82b054e492dcd128d93cec42be062f2f | ||
|
||
build: | ||
skip: True # [osx or py27] | ||
number: 2 | ||
#skip: True # [osx] | ||
number: 0 | ||
run_exports: | ||
- {{ pin_subpackage(name, max_pin="x.x") }} | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
- cmake | ||
- make | ||
host: | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
- zlib | ||
- python | ||
- jemalloc | ||
- pybind11 | ||
run: | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
- python | ||
- jemalloc | ||
- pybind11 | ||
|
||
test: | ||
commands: | ||
- odgi test | ||
|
||
about: | ||
home: https://github.com/pangenome/odgi | ||
home: "https://github.com/pangenome/odgi" | ||
license: MIT | ||
license_family: MIT | ||
license_file: LICENSE | ||
summary: An optimized dynamic genome/graph implementation | ||
summary: "An optimized dynamic genome/graph implementation." | ||
dev_url: "https://github.com/pangenome/odgi" | ||
doc_url: "https://github.com/pangenome/odgi/blob/v{{ version }}/README.md" | ||
|
||
extra: | ||
recipe-maintainers: | ||
- AndreaGuarracino | ||
identifiers: | ||
- doi:10.1093/bioinformatics/btac308 | ||
- biotools:odgi | ||
- usegalaxy-eu:odgi_viz | ||
- usegalaxy-eu:odgi_build | ||
additional-platforms: | ||
- linux-aarch64 | ||
- osx-arm64 |
This file was deleted.
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.
Reconsider the use of architecture-specific and aggressive optimization flags
The flag
-march=sandybridge
targets a specific CPU architecture, which might not be compatible with all users' systems. This could result in binaries that fail to run on older or different CPUs. For broader compatibility, consider using a more generic architecture flag like-march=core2
or omitting the-march
flag altogether.Additionally, the
-Ofast
optimization level enables aggressive optimizations that may disregard strict compliance with standards, potentially leading to unexpected behavior or instability. It might be safer to use-O2
or-O3
for optimization to balance performance and reliability.Apply the following changes to address the concerns:
📝 Committable suggestion