diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-01-07 20:36:32 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-01-07 20:36:32 +0000 |
commit | 798409f49b06a27ef47386828d13ceed7ad1781d (patch) | |
tree | 78c3f5ce1b9a9710effe271fe593528ec72f7cad /dev-python/lp_solve | |
parent | Added sys-kernel/rsbac-sources to the list of providers (diff) | |
download | gentoo-2-798409f49b06a27ef47386828d13ceed7ad1781d.tar.gz gentoo-2-798409f49b06a27ef47386828d13ceed7ad1781d.tar.bz2 gentoo-2-798409f49b06a27ef47386828d13ceed7ad1781d.zip |
Initial import to the main tree
(Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/lp_solve')
-rw-r--r-- | dev-python/lp_solve/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/lp_solve/Manifest | 5 | ||||
-rw-r--r-- | dev-python/lp_solve/files/lp_solve-5.5.2.0-setup.patch | 50 | ||||
-rw-r--r-- | dev-python/lp_solve/lp_solve-5.5.2.0.ebuild | 46 | ||||
-rw-r--r-- | dev-python/lp_solve/metadata.xml | 8 |
5 files changed, 119 insertions, 0 deletions
diff --git a/dev-python/lp_solve/ChangeLog b/dev-python/lp_solve/ChangeLog new file mode 100644 index 000000000000..8e0326f83217 --- /dev/null +++ b/dev-python/lp_solve/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-python/lp_solve +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/lp_solve/ChangeLog,v 1.1 2012/01/07 20:36:32 bicatali Exp $ + +*lp_solve-5.5.2.0 (07 Jan 2012) + + 07 Jan 2012; Sébastien Fabbro <bicatali@gentoo.org> + +lp_solve-5.5.2.0.ebuild, +files/lp_solve-5.5.2.0-setup.patch, +metadata.xml: + Initial import to the main tree + diff --git a/dev-python/lp_solve/Manifest b/dev-python/lp_solve/Manifest new file mode 100644 index 000000000000..1b19c1de1793 --- /dev/null +++ b/dev-python/lp_solve/Manifest @@ -0,0 +1,5 @@ +AUX lp_solve-5.5.2.0-setup.patch 1637 RMD160 7b84663c24feee88d5a798dd16da557850076431 SHA1 e86f72793bd896e5651da3de80df91ac49614053 SHA256 d2e0e070a2e0adc2703870f677c9177a6db8f7c3d749e43d47526377480b9a44 +DIST lp_solve_5.5.2.0_Python_source.tar.gz 58017 RMD160 c3d5b387ed85a222b17f33f1987d25da80182afd SHA1 058cced6b6a27cc160c9c5054c6b94b0eae6d989 SHA256 79683bc262e9da5b2fa7338ba190a9cd10559b9f2dbcb8f3bf07e2a81083ac51 +EBUILD lp_solve-5.5.2.0.ebuild 940 RMD160 1d5f9f56499bfa7f986c8c703c10c286b91a47af SHA1 a9050dd4c74501493651dce8014695e951dbaacf SHA256 065db88cc0c0c36fbcf0ff57339f5009168ad38bb0a820fd5dca16cc583045a1 +MISC ChangeLog 323 RMD160 79e0cfc1e373f5bb444c8ba502329fd50caba9f7 SHA1 47607cf807dcbc790c3052026da6f1c1df3a2771 SHA256 a2389dc7747e43e06870a82a79a3f5d8ee1b907277563efc060e173b1605e38e +MISC metadata.xml 284 RMD160 dd92877d4154d75095e0deb691e80a524cfaba44 SHA1 c96d31d1e40aba23462d587eb4570ed25693f949 SHA256 855182f93d92424de2d13c07d48f0f7f369c84c86b1bc36142764d2761d9f45a diff --git a/dev-python/lp_solve/files/lp_solve-5.5.2.0-setup.patch b/dev-python/lp_solve/files/lp_solve-5.5.2.0-setup.patch new file mode 100644 index 000000000000..a28b8179d261 --- /dev/null +++ b/dev-python/lp_solve/files/lp_solve-5.5.2.0-setup.patch @@ -0,0 +1,50 @@ +--- setup.py.orig 2012-01-07 20:27:45.072840503 +0000 ++++ setup.py 2012-01-07 20:24:22.127570128 +0000 +@@ -1,26 +1,25 @@ + from distutils.core import setup, Extension + from os import getenv + import sys +-import os +-p = sys.prefix +-NUMPYPATH = '.' +-if os.path.isdir(p + '/include/numpy'): +- NUMPY = 'NUMPY' +-elif os.path.isdir(p + '/Lib/site-packages/numpy/core/include/numpy'): +- NUMPY = 'NUMPY' +- NUMPYPATH = p + '/Lib/site-packages/numpy/core/include' +-else: ++import os, os.path ++ ++try: ++ import numpy ++ NUMPY = 'NUMPY' ++ NUMPYPATH = numpy.get_include() ++except: + NUMPY = 'NONUMPY' +-print 'numpy: ' + NUMPY ++ NUMPYPATH = '.' ++ + windir = getenv('windir') + if windir == None: + WIN32 = 'NOWIN32' +- LPSOLVE55 = '../../lpsolve55/bin/ux32' ++ LPSOLVEINC = os.path.join(sys.prefix,'include','lpsolve') + else: + WIN32 = 'WIN32' + LPSOLVE55 = '../../lpsolve55/bin/win32' + setup (name = "lpsolve55", +- version = "5.5.0.9", ++ version = "5.5.2.0", + description = "Linear Program Solver, Interface to lpsolve", + author = "Peter Notebaert", + author_email = "lpsolve@peno.be", +@@ -29,8 +28,7 @@ + ext_modules = [Extension("lpsolve55", + ["lpsolve.c", "hash.c", "pythonmod.c"], + define_macros=[('PYTHON', '1'), (WIN32, '1'), ('NODEBUG', '1'), ('DINLINE', 'static'), (NUMPY, '1'), ('_CRT_SECURE_NO_WARNINGS', '1')], +- include_dirs=['../..', NUMPYPATH], +- library_dirs=[LPSOLVE55], ++ include_dirs=[LPSOLVEINC, NUMPYPATH], + libraries = ["lpsolve55"]) + ] + ) diff --git a/dev-python/lp_solve/lp_solve-5.5.2.0.ebuild b/dev-python/lp_solve/lp_solve-5.5.2.0.ebuild new file mode 100644 index 000000000000..895aad7aac03 --- /dev/null +++ b/dev-python/lp_solve/lp_solve-5.5.2.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/lp_solve/lp_solve-5.5.2.0.ebuild,v 1.1 2012/01/07 20:36:32 bicatali Exp $ + +EAPI=4 + +SUPPORT_PYTHON_ABIS=1 +RESTRICT_PYTHON_ABIS="2.4 3*" + +inherit distutils eutils + +DESCRIPTION="Python wrappers for lpsolve" +HOMEPAGE="http://lpsolve.sourceforge.net/5.5/Python.htm" +SRC_URI="mirror://sourceforge/lpsolve/${PN}_${PV}_Python_source.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples" + +RDEPEND="dev-python/numpy + sci-mathematics/lpsolve" +DEPEND="${RDEPEND} + dev-python/setuptools" + +S="${WORKDIR}/${PN}_5.5/extra/Python/" + +src_prepare(){ + epatch "${FILESDIR}"/${P}-setup.patch +} + +src_test() { + testing() { + PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" \ + "$(PYTHON)" lpdemo.py + } + python_execute_function testing +} + +src_install() { + distutils_src_install + dodoc changes + use doc && dohtml Python.htm + insinto /usr/share/doc/${PF}/examples + use examples && doins ex*py +} diff --git a/dev-python/lp_solve/metadata.xml b/dev-python/lp_solve/metadata.xml new file mode 100644 index 000000000000..e8988df3202d --- /dev/null +++ b/dev-python/lp_solve/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci-mathematics</herd> +<longdescription lang='en'> + Python wrapper modules for the linear programming library lpsolve. +</longdescription> +</pkgmetadata> |