From db444c4a08469337e7328b27fa689a947142275f Mon Sep 17 00:00:00 2001 From: phunterlau Date: Thu, 20 Aug 2015 10:10:34 -0700 Subject: [PATCH] update with comments on PR #450, fixed styles and updated CHANGES and CONTRIBUTORS --- CHANGES.md | 3 ++- CONTRIBUTORS.md | 4 +++- python-package/setup.py | 20 +++++++++++--------- python-package/xgboost/core.py | 3 ++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4484a321b..a8ddcd7ea 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -43,4 +43,5 @@ on going at master * Python module now has importance plot and tree plot functions. * Java api is ready for use * Added more test cases and continuous integration to make each build more robust -* Improvements in sklearn compatible module \ No newline at end of file +* Improvements in sklearn compatible module +* Added pip installation functionality for python module diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ad6c01f2f..6ae79f795 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -45,4 +45,6 @@ List of Contributors - Jamie is the initial creator of xgboost sklearn modue. * [Yen-Ying Lee](https://github.com/white1033) * [Masaaki Horikoshi](https://github.com/sinhrks) - - Masaaki is the initial creator of xgboost python plotting module. \ No newline at end of file + - Masaaki is the initial creator of xgboost python plotting module. +* [Hongliang Liu](https://github.com/phunterlau) + - Hongliang is the maintainer of xgboost python PyPI package for pip installation. diff --git a/python-package/setup.py b/python-package/setup.py index e33e28fdc..a446983be 100644 --- a/python-package/setup.py +++ b/python-package/setup.py @@ -2,12 +2,12 @@ """Setup xgboost package.""" from __future__ import absolute_import import sys -from setuptools import setup,find_packages +from setuptools import setup, find_packages import subprocess sys.path.insert(0, '.') #build on the fly -build_sh = subprocess.Popen(['sh','xgboost/build-python.sh']) +build_sh = subprocess.Popen(['sh', 'xgboost/build-python.sh']) build_sh.wait() output = build_sh.communicate() print output @@ -29,14 +29,16 @@ setup(name='xgboost', 'numpy', 'scipy', ], - maintainer = 'Hongliang Liu', - maintainer_email = 'phunter.lau@gmail.com', + maintainer='Hongliang Liu', + maintainer_email='phunter.lau@gmail.com', zip_safe=False, - packages = find_packages(), - #package_dir = {'':'xgboost'}, #don't need this and don't use this, give everything to MANIFEST.in + packages=find_packages(), + #don't need this and don't use this, give everything to MANIFEST.in + #package_dir = {'':'xgboost'}, #package_data = {'': ['*.txt','*.md','*.sh'], # } - include_package_data=True, #this will use MANIFEST.in during install where we specify additional files, this is the golden line - data_files=[('xgboost',LIB_PATH), - ], + #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)], url='https://github.com/dmlc/xgboost') diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index ff95b33fb..85b6a1818 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -40,7 +40,8 @@ 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, '../../wrapper/'),os.path.join(curr_path, './wrapper/')] + dll_path = [curr_path, os.path.join(curr_path, '../../wrapper/') + , os.path.join(curr_path, './wrapper/')] if os.name == 'nt': if platform.architecture()[0] == '64bit': dll_path.append(os.path.join(curr_path, '../../windows/x64/Release/'))