joe-jordan / pyvoro

2D and 3D Voronoi tessellations: a python entry point for the voro++ library
Other
100 stars 26 forks source link

Build error: TypeError: Extension constructor got multiple values for keyword argument 'sources' #5

Closed diehlpk closed 10 years ago

diehlpk commented 10 years ago

Following steps reproduce this error:

1) git clone git clone https://github.com/joe-jordan/pyvoro.git 2) cd pyvoro 3) python setup.py build

running build running build_py ('missing cimport', 'pyvoro/voroplusplus.pyx') libcpp.vector cython.operator /usr/lib/pymodules/python2.7/Cython/Includes/libcpp/vector.pxd Traceback (most recent call last): File "setup.py", line 44, in packages=["pyvoro"] File "/home/diehl/git/pyvoro/cb.py", line 282, in wrapped build(_args, *_kwargs) File "/home/diehl/git/pyvoro/cb.py", line 257, in build _seperate_build(e, global_macros, global_includes, global_lib_dirs) File "/home/diehl/git/pyvoro/cb.py", line 107, in _seperate_build _custom_cythonise(extension['sources']) File "/home/diehl/git/pyvoro/cb.py", line 29, in _custom_cythonise e = cythonize(f)[0] File "/usr/lib/pymodules/python2.7/Cython/Build/Dependencies.py", line 468, in cythonize aliases=aliases) File "/usr/lib/pymodules/python2.7/Cython/Build/Dependencies.py", line 452, in create_extension_list **kwds)) TypeError: Extension constructor got multiple values for keyword argument 'sources'

joe-jordan commented 10 years ago

Please let me know which version of Cython you have installed. I recommend the latest stable version from https://github.com/cython/cython/ (something like 0.20.1) as some/many older versions, like the ones in Linux distro packages, don't work with my build system.

joe-jordan commented 10 years ago

(this issue is a possible duplicate of #2 - waiting for Cython version to confirm.)

diehlpk commented 10 years ago

$ cython --version Cython version 0.15.1

joe-jordan commented 10 years ago

yep, only tested versions so far were 0.14 and 0.17 - clearly 0.15 is broken too.

Please install a newer version of Cython from their github page (linked above). Remember to remove 0.15.1 if it was installed with a package manager.

joe-jordan commented 10 years ago

(note, I have now modified the setup.py to give a clearer error message when this happens - apologies that it was a bit cryptic!)

diehlpk commented 10 years ago

Thanks, it will be very helpful for the users of my project.

diehlpk commented 10 years ago

I updated cython to a newer version but now i get another error:

python setup.py build Traceback (most recent call last): File "setup.py", line 28, in cython_minor_version = int(Cython.version.split('.')[1]) ValueError: invalid literal for int() with base 10: '21dev'

I think the problem is that i use Cython version 0.21dev

I use the cython from https://github.com/cython/cython

diehlpk commented 10 years ago

Usinf this release https://github.com/cython/cython/releases/tag/0.20 works.

joe-jordan commented 10 years ago

Thanks, I was assuming you were using a stable release (i.e. one without dev in the name). It's fairly tricky to write a setup.py that can anticipate all possible version strings!

diehlpk commented 10 years ago

No problem. My idea was to use the actual version from git and install cython. Then clone your repo and install pyvoro.