tonysimpson / nanomsg-python

nanomsg wrapper for python with multiple backends (CPython and ctypes) should support 2/3 and Pypy
MIT License
382 stars 85 forks source link

Package cannot be installed #4

Closed nikolay closed 10 years ago

nikolay commented 10 years ago
$ python setup.py install
running install
running bdist_egg
running egg_info
writing nanomsg.egg-info/PKG-INFO
writing top-level names to nanomsg.egg-info/top_level.txt
writing dependency_links to nanomsg.egg-info/dependency_links.txt
reading manifest file 'nanomsg.egg-info/SOURCES.txt'
writing manifest file 'nanomsg.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
Traceback (most recent call last):
  File "setup.py", line 70, in <module>
    test_suite="tests",
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/install.py", line 93, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 185, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 171, in call_command
    self.run_command(cmdname)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/install_lib.py", line 20, in run
    self.build()
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install_lib.py", line 109, in build
    self.run_command('build_py')
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/build_py.py", line 89, in run
    self.build_packages()
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_py.py", line 372, in build_packages
    self.build_module(module, module_file, package)
  File "/Users/nikolaykolev/.virtualenv/nanomsg/lib/python2.7/site-packages/setuptools/command/build_py.py", line 106, in build_module
    outfile, copied = _build_py.build_module(self, module, module_file, package)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_py.py", line 333, in build_module
    "'package' must be a string (dot-separated), list, or tuple")
TypeError: 'package' must be a string (dot-separated), list, or tuple
tonysimpson commented 10 years ago

Hi I've pushed a fix which I think will help.

I think the issue was caused by http://bugs.python.org/issue13943 sadly none of the versions of distutils I tested with had his bug so thanks for finding it.

I will investigate a better fix when I get time - playing uncode/binary string whack-a-mole to try and get python 2/3 compatible is not a fun game.

nikolay commented 10 years ago

Thanks! Works now. Any plans to upload it to PyPI?

tonysimpson commented 10 years ago

Thanks that's encouraging. Yes, I was waiting until I'd had a chance to try it out on some real projects at work and improved the build process but I should probably put it up there even in its current state.

nikolay commented 10 years ago

Yes, it will ease adoption and help collect more feedback, I think.