diff --git a/pyOpt/0001-Customize-place-of-swig-files.patch b/python/pyOpt/0001-Customize-place-of-swig-files.patch similarity index 100% rename from pyOpt/0001-Customize-place-of-swig-files.patch rename to python/pyOpt/0001-Customize-place-of-swig-files.patch diff --git a/python/pyOpt/add_pyOpt_to_path_while_importing.patch b/python/pyOpt/add_pyOpt_to_path_while_importing.patch deleted file mode 100644 index 767ec5a86..000000000 --- a/python/pyOpt/add_pyOpt_to_path_while_importing.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git pyOpt/__init__.py pyOpt/__init__.py -index 7177ca8..a4c02f9 100644 ---- pyOpt/__init__.py -+++ pyOpt/__init__.py -@@ -14,6 +14,8 @@ from pyOpt_optimizer import Optimizer - __all__ = ['History','Parameter','Variable','Gradient','Constraint','Objective','Optimization','Optimizer'] - - dir = os.path.dirname(os.path.realpath(__file__)) -+if sys.platform == 'win32': -+ os.environ["PATH"] = os.environ["PATH"] + os.pathsep + dir - for f in os.listdir(dir): - if f.startswith('py') and os.path.isdir(os.path.join(dir,f)): - try: -@@ -24,3 +26,5 @@ for f in os.listdir(dir): - #end - #end - #end -+if sys.platform == 'win32': -+ os.environ["PATH"] = os.environ["PATH"].replace(os.pathsep + dir, '') -\ No newline at end of file diff --git a/python/pyOpt/bld.bat b/python/pyOpt/bld.bat index 57db9a59b..02bfc4833 100644 --- a/python/pyOpt/bld.bat +++ b/python/pyOpt/bld.bat @@ -1,20 +1,2 @@ -swig.exe 2> NUL -if %ERRORLEVEL%==9009 GOTO Swig_missing - -REM Copy any licenced source files the optimizers -REM SET SNOPT_DIR="z:\snopt7" -REM IF EXIST %SNOPT_DIR% ( xcopy %SNOPT_DIR%\src\* "%SRC_DIR%"\pyOpt\pySNOPT\source\* /S/Y/I/Q ) - -%SYS_PYTHON% setup.py install --compiler=mingw32 --prefix=%PREFIX% - -for %%x in (libgfortran-3.dll libquadmath-0.dll) do ( - copy %SYS_PREFIX%\Scripts\%%x %SP_DIR%\pyopt\ - if errorlevel 1 exit 1 -) - -GOTO End - -:Swig_missing -Echo "Swig.exe is missing in PATH" - -:End \ No newline at end of file +%PYTHON% setup.py install --compiler=mingw32 +if errorlevel 1 exit 1 diff --git a/pyOpt/build.sh b/python/pyOpt/build.sh old mode 100755 new mode 100644 similarity index 100% rename from pyOpt/build.sh rename to python/pyOpt/build.sh diff --git a/python/pyOpt/run_test.py b/python/pyOpt/run_test.py new file mode 100644 index 000000000..8d8f4eb77 --- /dev/null +++ b/python/pyOpt/run_test.py @@ -0,0 +1,2 @@ +from pyOpt import Optimization +from pyOpt import SLSQP