Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pywr/pywr
Browse files Browse the repository at this point in the history
  • Loading branch information
jetuk committed Mar 24, 2016
2 parents 64f4950 + e51261a commit c7f33b0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 0 additions & 8 deletions appveyor.yml
Expand Up @@ -2,18 +2,10 @@ build: false

environment:
matrix:
- PYTHON_VERSION: 2.7
PYTHON_ARCH: 32
MINICONDA: C:\Miniconda

- PYTHON_VERSION: 2.7
PYTHON_ARCH: 64
MINICONDA: C:\Miniconda-x64

- PYTHON_VERSION: 3.4
PYTHON_ARCH: 32
MINICONDA: C:\Miniconda3

- PYTHON_VERSION: 3.4
PYTHON_ARCH: 64
MINICONDA: C:\Miniconda3-x64
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/bld.bat
Expand Up @@ -2,5 +2,5 @@ set LIB=%LIBRARY_LIB%;.\lib;%LIB%
set LIBPATH=%LIBRARY_LIB%;.\lib;%LIBPATH%
set INCLUDE=%LIBRARY_INC%;%INCLUDE%

"%PYTHON%" setup.py build_ext -I"%LIBRARY_INC%" -L"%LIBRARY_LIB%" install --with-glpk
"%PYTHON%" setup.py build_ext -I"%LIBRARY_INC%" -L"%LIBRARY_LIB%" install --with-glpk --with-lpsolve
if errorlevel 1 exit 1
2 changes: 2 additions & 0 deletions conda-recipe/meta.yaml
Expand Up @@ -15,12 +15,14 @@ requirements:
- numpy x.x
- cython
- glpk
- lpsolve
run:
- python
- numpy x.x
- pandas
- networkx
- glpk
- lpsolve
- pytables
- xlrd

Expand Down
9 changes: 5 additions & 4 deletions conda-recipe/run_test.py
Expand Up @@ -3,8 +3,9 @@
import pytest

tests_folder = os.path.join(os.environ['SRC_DIR'], 'tests')
result = pytest.main(['-x', tests_folder])

if result != 0:
# test(s) failed, raise error
sys.exit(result)
for solver in ('glpk', 'lpsolve'):
result = pytest.main(['-x', tests_folder, '--solver={}'.format(solver)])
if result != 0:
# test(s) failed, raise error
sys.exit(result)
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -14,6 +14,7 @@
from Cython.Build import cythonize
import numpy as np
import sys
import os

setup_kwargs = {
'name': 'pywr',
Expand Down Expand Up @@ -63,10 +64,14 @@
libraries=['glpk'],),
)
if 'lpsolve' in optional:
define_macros = []
if os.name == 'nt':
define_macros.append(('WIN32', 1))
extensions_optional.append(
Extension('pywr.solvers.cython_lpsolve', ['pywr/solvers/cython_lpsolve.pyx'],
include_dirs=[np.get_include()],
libraries=['lpsolve55'],),
libraries=['lpsolve55'],
define_macros=define_macros),
)

# build the core extension(s)
Expand Down

0 comments on commit c7f33b0

Please sign in to comment.