octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building PyTave on windows - cygwin


From: Tatsuro MATSUOKA
Subject: Re: Building PyTave on windows - cygwin
Date: Wed, 22 Jun 2016 13:01:00 +0900 (JST)

----- Original Message -----

> From: Tatsuro MATSUOKA 
> To: tmacchant Abhinav Tripathi 
> Cc: "Octave-maintainers "mtmiller> Date: 2016/6/21, Tue 19:27
> Subject: Re: Building PyTave on windows - cygwin
> 
> configure:5654: gcc -std=gnu11 -o conftest.exe -g -O2 -I/c/Python27/include 
> -I/d/usr/Tatsu/program/Pytave\/PytaveBuild/boost/boost_1_16_inst/include 
> -Ic:\Python27\include -L/c/Python27/libs 
> -L/d/usr/Tatsu/program/Pytave/PytaveBuild/boost/boost_1_16_inst/libs  
> conftest.c 
> -Lc:/Python27/libs -Lc:\Python27\Lib\config -lpython27 None None 
>> &5
> gcc.exe: error: None: No such file or directory
> gcc.exe: error: None: No such file or directory
> 
> 
> What is None None?
> 
> Tatsuro


Mike

Two "None"s come from configure detection does not go well python windiws
(see the last.)

To go further I hacked configure as


--- configure.orig      2016-06-19 13:34:38 +0900
+++ configure   2016-06-22 12:45:18 +0900
@@ -5629,7 +5629,7 @@
        ac_save_LIBS="$LIBS"
        ac_save_LDFLAGS="$LDFLAGS"
        ac_save_CPPFLAGS="$CPPFLAGS"
-       LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
+       LIBS="-lpython27"
        LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
        CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
        ac_ext=c

I have met 

************************************************
checking python extra libraries... Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

checking python extra linking flags... None
checking consistency of all components of python development environment... yes
checking for python... /c/Python27/python
checking for numpy includedir...
configure: WARNING:
========================================================================
Can not link with Numpy.

Make sure the Numpy development package is installed.
========================================================================
configure: error: in `/d/usr/Tatsu/program/Pytave/PytaveBuild/Pytave/build':
configure: error: unable to find NumPy development files
************************************************


I will install Numpy. 
However indtall.md in Pytave source.

Linked and tested with:

  * Python 2.7
  * Boost::Python 1.58
  * Octave 4.1 (development version)

Does Python 2.7 mean including extra modules?
What python extra modules required?
Do I have to also install SciPy?

Tatsuro



Workaround on python 2.7 prompt


Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.sysconfig
>>> e = distutils.sysconfig.get_config_var('LIBDIR')
>>> print e
None
>>> e = get_config_var('VERSION')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'get_config_var' is not defined
>>> from distutils.sysconfig import
  File "<stdin>", line 1
    from distutils.sysconfig import
                                  ^
SyntaxError: invalid syntax
>>> e = get_config_var('VERSION')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'get_config_var' is not defined
>>> e = distutils.sysconfig.get_config_var('LIBDIR')
>>> print e
None
>>> e = distutils.sysconfig.get_config_var('LIBDIR')
>>> print e
None
>>> c = distutils.sysconfig.get_config_vars()
>>> print c
{'EXE': '.exe', 'exec_prefix': 'C:\\Python27', 'LIBDEST': 'C:\\Python27\\Lib', 
'prefix': 'C:\\Python27', 'VERSION': '27', 'SO': '.pyd', 'BINLIBDEST': 
'C:\\Python27\\Lib', 'INCLUDEPY': 'C:\\Python27\\include', 'BINDIR': 
'C:\\Python27'}
>>> conf = distutils.sysconfig.get_config_var
>>> print conf
<function get_config_var at 0x00000000029AF438>
>>> conf = distutils.sysconfig.get_config_vars
>>> print conf
<function get_config_vars at 0x00000000029AF3C8>
>>> conf = distutils.sysconfig.get_config_vars()
>>> print conf
{'EXE': '.exe', 'exec_prefix': 'C:\\Python27', 'LIBDEST': 'C:\\Python27\\Lib', 
'prefix': 'C:\\Python27', 'VERSION': '27', 'SO': '.pyd', 'BINLIBDEST': 
'C:\\Python27\\Lib', 'INCLUDEPY': 'C:\\Python27\\include', 'BINDIR': 
'C:\\Python27'}
>>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]