Skip to content

Commit

Permalink
biology/py-python-libsbml: Parallelize build
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Jul 26, 2023
1 parent 5ad8fdc commit 8221f16
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions biology/py-python-libsbml/Makefile
Expand Up @@ -16,6 +16,7 @@ BUILD_DEPENDS= cmake:devel/cmake-core \

USES= python:3.8-3.9
USE_PYTHON= autoplist distutils # autoplist produces incomplete plist, missing files are in pkg-plist. Reported to the upstream author fbergman@caltech.edu on 2021-08-17
MAKE_ENV= FREEBSD_MAKE_JOBS=${_MAKE_JOBS}

post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/libsbml/_libsbml*.so
Expand Down
22 changes: 22 additions & 0 deletions biology/py-python-libsbml/files/patch-setup.py
@@ -0,0 +1,22 @@
- workaround for https://github.com/sbmlteam/python-libsbml/issues/36

--- setup.py.orig 2023-05-25 10:49:17 UTC
+++ setup.py
@@ -248,7 +248,7 @@ class CMakeBuild(build_ext):
'-DWITH_LIBXML=OFF',
]
)
- self.spawn(['cmake', '--build', '.', '--target', 'install'] + build_args)
+ self.spawn(['cmake', '--build', '.', '-j', os.getenv('FREEBSD_MAKE_JOBS'), '--target', 'install'] + build_args)
os.chdir(cwd)
DEP_DIR = dep_inst_dir

@@ -297,7 +297,7 @@ class CMakeBuild(build_ext):
os.chdir(build_temp)
self.spawn(['cmake', SRC_DIR] + cmake_args)
if not self.dry_run:
- self.spawn(['cmake', '--build', '.', '--target', 'binding_python_lib'] + build_args)
+ self.spawn(['cmake', '--build', '.', '-j', os.getenv('FREEBSD_MAKE_JOBS'), '--target', 'binding_python_lib'] + build_args)

# at this point the build should be complete, and we have all the files
# neeed in the temp build_folder

0 comments on commit 8221f16

Please sign in to comment.