google-code-export / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
2 stars 0 forks source link

Install Problem on Ubuntu 11.10 #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Setup:
On a fresh install of Ubuntu 11.10, with apt-get cython and pygame installed. 
Python is 2.7.2
Cython is 0.14.1-6

What is the expected output? What do you see instead?
On build command ('python setup.py build_ext -i' from poly2tri directory), 
expect a flawless install, instead get the error: 

Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    install_requires = ["cython==0.14.1"],
  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 225, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 258, in finalize_options
    ep.load()(self, ep.name, value)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1955, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/.../poly2tri-0.3.3/setuptools_cython-0.2.1-py2.7.egg/setuptools_cython.py", line 21, in <module>
    class build_cython(Cython.Distutils.build_ext, object):
AttributeError: 'module' object has no attribute 'Distutils'

What version of the product are you using?
Problem is the same with the poly2tri and latest code. 

Please provide any additional information below.
Any ideas? Looks like dependency issue. 

Original issue reported on code.google.com by capaul...@gmail.com on 12 Dec 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Will look into this *relatively soon*, but it probably has to do with an 
updated version of Cython. You could probably easily fix this yourself if you 
commit a few minutes to working out the dependencies.

Original comment by mason.gr...@gmail.com on 14 Dec 2011 at 2:59

GoogleCodeExporter commented 9 years ago
I'm doubting this is a dependency issue now. It looks more like an issue on how 
Cython is called somewhere. I was just testing in a python terminal and noticed 
the following:

>>> import Cython
>>> Cython.Distutils.build_ext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Distutils'
>>> 
>>> 
>>> import Cython.Distutils
>>> Cython.Distutils.build_ext
<class Cython.Distutils.build_ext.build_ext at 0x7f2219418e20>

I just can't find the offending code that causes this. Any thoughts? 

Original comment by capaul...@gmail.com on 14 Dec 2011 at 5:41

GoogleCodeExporter commented 9 years ago
So, this problem goes away (but gcc problems) when the following lines are 
commented out: 

in poly2tri.python/setuptools_cython-0.2.1-py2.7.egg/setuptools_cython.py

if 'Cython' in sys.modules:
    del sys.modules['Cython']

With the lines enabled, I get the same error: AttributeError: 'module' object 
has no attribute 'Distutils'

But the install crashes at GCC. Have you had any time to look at this? 

Original comment by capaul...@gmail.com on 24 Jan 2012 at 2:47

GoogleCodeExporter commented 9 years ago
Fixed. The gcc issue was covered in issue 47. fix is to comment out "if 
'Cython' in sys.modules:
    del sys.modules['Cython']"

Original comment by capaul...@gmail.com on 16 Mar 2012 at 10:46

GoogleCodeExporter commented 9 years ago
thanks. I will fix this soon.

Original comment by mason.gr...@gmail.com on 4 Apr 2012 at 1:24

GoogleCodeExporter commented 9 years ago
Anyone is welcome to submit a patch. C++ and Java are now the officially 
supported languages.

Original comment by mason.gr...@gmail.com on 7 Apr 2012 at 5:14