diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | python_no_libs.patch | 63 |
3 files changed, 23 insertions, 52 deletions
@@ -1,5 +1,5 @@ pkgbase = xgboost-git - pkgver = r3854.97007765 + pkgver = r4049.911a90283 pkgrel = 1 url = https://github.com/dmlc/xgboost arch = x86_64 @@ -14,7 +14,7 @@ pkgbase = xgboost-git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP - sha256sums = c717e84c937ce3c6bb710f39ddcf0588e61deb0e356836abd0257158703b225e + sha256sums = 4940b84afffe9c2be646d0f77bcfb0d8d36aadcabc4a83b40113e1d97ae917b5 pkgname = xgboost-git pkgdesc = An optimized distributed gradient boosting library designed to be highly efficient, flexible and portable @@ -4,7 +4,7 @@ _name=xgboost pkgbase=xgboost-git pkgname=('xgboost-git' 'python-xgboost-git') -pkgver=r3854.97007765 +pkgver=r4049.911a90283 pkgrel=1 url='https://github.com/dmlc/xgboost' license=('APACHE') @@ -19,7 +19,7 @@ sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' - 'c717e84c937ce3c6bb710f39ddcf0588e61deb0e356836abd0257158703b225e') + '4940b84afffe9c2be646d0f77bcfb0d8d36aadcabc4a83b40113e1d97ae917b5') pkgver() { cd "${_name}" @@ -38,6 +38,9 @@ prepare() { build() { cd "${_name}" + mkdir build + cd build + cmake .. # -DUSE_CUDA=ON make } @@ -60,7 +63,6 @@ package_xgboost-git() { # Install shared libraries mkdir -p "${pkgdir}/usr/lib" - install -Dm644 lib/*.a "${pkgdir}/usr/lib" install -Dm644 lib/*.so "${pkgdir}/usr/lib" # Install includes diff --git a/python_no_libs.patch b/python_no_libs.patch index 15a95ac7ad1c..a4978b2aec4a 100644 --- a/python_no_libs.patch +++ b/python_no_libs.patch @@ -1,55 +1,24 @@ diff --git a/python-package/setup.py b/python-package/setup.py -index a2146f6b..7f13a07b 100644 +index e1433af05..3fa20467d 100644 --- a/python-package/setup.py +++ b/python-package/setup.py -@@ -7,28 +7,9 @@ import os - from setuptools import setup, find_packages - - # import subprocess --sys.path.insert(0, '.') - - CURRENT_DIR = os.path.dirname(__file__) - --# We can not import `xgboost.libpath` in setup.py directly since xgboost/__init__.py --# import `xgboost.core` and finally will import `numpy` and `scipy` which are setup --# `install_requires`. That's why we're using `exec` here. --libpath_py = os.path.join(CURRENT_DIR, 'xgboost/libpath.py') --libpath = {'__file__': libpath_py} --exec(compile(open(libpath_py, "rb").read(), libpath_py, 'exec'), libpath, libpath) -- --LIB_PATH = [] --for libfile in libpath['find_lib_path'](): -- try: -- relpath = os.path.relpath(libfile, CURRENT_DIR) -- LIB_PATH.append(relpath) -- break # need only one -- except ValueError: -- continue -- --print("Install libxgboost from: %s" % LIB_PATH) -- - # Please use setup_pip.py for generating and deploying pip installation - # detailed instruction in setup_pip.py - setup(name='xgboost', -@@ -53,7 +34,6 @@ setup(name='xgboost', - # this will use MANIFEST.in during install where we specify additional files, - # this is the golden line - include_package_data=True, -- data_files=[('xgboost', LIB_PATH)], - license='Apache-2.0', - classifiers=['License :: OSI Approved :: Apache Software License', - 'Development Status :: 5 - Production/Stable', +@@ -283,7 +283,6 @@ if __name__ == '__main__': + cmdclass={ + 'build_ext': BuildExt, + 'sdist': Sdist, +- 'install_lib': InstallLib, + 'install': Install + }, + extras_require={ diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py -index a313a1b8..f161d50a 100644 +index 65f7403e6..67390a6bd 100644 --- a/python-package/xgboost/libpath.py +++ b/python-package/xgboost/libpath.py -@@ -20,7 +20,8 @@ def find_lib_path(): +@@ -20,6 +20,7 @@ def find_lib_path(): """ curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) - # make pythonpack hack: copy this directory one level upper for setup.py -- dll_path = [curr_path, os.path.join(curr_path, '../../lib/'), -+ dll_path = ["/usr/lib", curr_path, -+ os.path.join(curr_path, '../../lib/'), - os.path.join(curr_path, './lib/'), - os.path.join(sys.prefix, 'xgboost')] - if sys.platform == 'win32': + dll_path = [ ++ '/usr/lib', + # normal, after installation `lib` is copied into Python package tree. + os.path.join(curr_path, 'lib'), + # editable installation, no copying is performed. |