[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Yves Renard |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Sat, 1 Jul 2017 08:11:31 -0400 (EDT) |
branch: master
commit 78c7d21d2ce3db67eb13350d6069ea064df0ed15
Author: Yves Renard <address@hidden>
Date: Sat Jul 1 14:10:53 2017 +0200
minor fix for the compilation of python interface on windows
---
.gitignore | 1 +
bin/extract_doc | 12 ++++++--
doc/sphinx/source/install/install_windows.rst | 41 +++++++++------------------
interface/src/python/setup.py.in | 2 +-
4 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/.gitignore b/.gitignore
index dafc016..ddb7d83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
*.tar.gz
.deps
.libs
+.DS_Store
*.trs
Makefile.in
Makefile
diff --git a/bin/extract_doc b/bin/extract_doc
index b6648b8..12cf717 100755
--- a/bin/extract_doc
+++ b/bin/extract_doc
@@ -483,9 +483,15 @@ option = sys.argv[2]
# List the filenames and extract object and command names.
#
-fl = os.popen('(cd ' + directory + ' ; ls gf_*.cc)');
+fl = os.popen('(cd ' + directory + '; ls gf_*.cc)');
lines = fl.readlines();
-fl.close()
+a = fl.close()
+if (a) : # Windows
+ fl = os.popen('((cd ' + directory + ') & (ls gf_*.cc))');
+ lines = fl.readlines();
+ a = fl.close()
+
+
objects = set()
objects.add('eltm');
commands = set()
@@ -1573,7 +1579,7 @@ elif (option == 'python-com' or option ==
'python-com-par'):
#
# Python GetFEM++ interface
#
-# Copyright (C) 2004-2017 Yves Renard, Julien Pommier.
+# Copyright (C) 2004-2016 Yves Renard, Julien Pommier.
#
# This file is a part of GetFEM++
#
diff --git a/doc/sphinx/source/install/install_windows.rst
b/doc/sphinx/source/install/install_windows.rst
index a84540b..830719e 100644
--- a/doc/sphinx/source/install/install_windows.rst
+++ b/doc/sphinx/source/install/install_windows.rst
@@ -133,46 +133,33 @@ possible with `Cygwin <https://www.cygwin.com/>`_.
Build with the Python interface
*******************************
-Additionnaly to build the Python interface, you will have first to install a
64bits version of Python 2 on your system together with Numpy and Scipy
packages. This is not completely simple, but you can follow the following steps
+Additionnaly to build the Python interface, you will have first to install a
64bits version of Python 2 or 3 on your system together with Numpy and Scipy
packages. The simpler way is to install Anaconda2 or 3 (it already contains
Numpy and Scipy packages which are necessary). For instance with Anaconda2
- - Install a 64 bits Python 2 or 3 version
- (see `Python website <https://www.python.org/downloads/windows/>`_).
- Then, if it is not done by the installer you used, add ``C:\Pythonxx``
- to your Windows path (where ``xx`` is the version number).
- Close you Msys and Windows shell and re-open them to take into
- account the changes.
+ - Install Anaconda2 and add to windows path ``C:\install_dir\Anaconda2``
+ and ``C:\install_dir\Anaconda2\Scripts`` where ``install_dir`` is the
+ installation directory of Anaconda2 (``ProgramData`` by default for
+ a system installation)
- - Install Pip (see `Pip <https://pip.pypa.io/en/latest/installing/>`_)
+ - close an re-open a windows command shell and msys
- - Downloads the precompiled packages of numpy and scipy for 64 bits
- and Python `here <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_
- (i.e. for isntance wheel packages
- ``numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl``
- and ``scipy-0.19.0-cp27-cp27m-win_amd64.whl`` for python 2).
-
- - Enter into the directory where you downloaded the two
- wheel Python packages and install them with::
-
- $ python -m pip install numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl
- $ python -m pip install scipy-0.19.0-cp27-cp27m-win_amd64.whl
-
- - Go to the Getfem source directory and perform again::
+ - run again::
$ ./configure --with-blas="-lblas -lgfortran" --disable-superlu
- if all is ok, the configure script should detect the Python installation
- and the presence of Numpy and Scipy packages and allow the compilation
- of the Python interface. Then just perform a::
+ Python should be detected and the Python interface prepared to be built.
+
+ - Then just run::
$ make
- You just remain to add as a Windows system variable ``PYTHONPATH`` with the
+ It normally build the interface correctly. Then just add as a Windows
+ system variable ``PYTHONPATH`` with the
value ``c:\msys\home\login\getfem-5.?\interface\src\python`` where
``login`` and ``5.?`` have tobe adapted. You can either copy the
directory ``interface\src\python`` where the interface has been built
- in a Python 2 directory.
+ in a Python 2 directory. You can then run the test programs in
+ ``interface/tests/python`` using python.
-Still some problems ... to be completed soon
Build with the Matlab interface
*******************************
diff --git a/interface/src/python/setup.py.in b/interface/src/python/setup.py.in
index f9e7ad7..7e79e13 100644
--- a/interface/src/python/setup.py.in
+++ b/interface/src/python/setup.py.in
@@ -68,7 +68,7 @@ getfemmod = Extension('_getfem',
setup (name = 'getfem-interface',
license='LGPL',
- version = '4.0',
+ version = '5.2',
maintainer="Yves Renard",
maintainer_email="address@hidden",
description = "This is the getfem-python-interface module",