On Thu, Apr 02, 2015 at 05:22:55PM -0500, Sean Vig wrote:
> I had that same problem, and Tycho is right, uninstalling should allow you
> to upgrade.
>
> Is there a way we can fix this so it imports the local version of the
> compiled module?
Ok, I tried,
diff --git a/setup.py b/setup.py
index 1293f5a..ce9f430 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,9 @@ class cffi_build(build):
print("please run 'make xcffib' or 'make check'.")
sys.exit(1)
- import xcffib
+ sys.path.insert(0, ".")
+ xcffib = __import__("xcffib")
+
self.distribution.ext_modules = [xcffib.ffi.verifier.get_extension()]
build.finalize_options(self)
But it still crashes inside of cffi. Looking a little closer at the
stack trace, it looks like it goes to load the system version. I
didn't see a nice way of controlling that, but I pushed a more
sensible error at least:
https://github.com/tych0/xcffib/commit/b8dd5e726c0e58cb47b3eaf12c98fa072161c18c
Tycho
> On Thu, Apr 2, 2015 at 5:20 PM, Martin <[email protected]> wrote:
>
> > I can't, since I am unable to reinstall Qtile from source. I get
> >
> > pip install xcffib
> > Requirement already satisfied (use --upgrade to upgrade): xcffib in
> > /usr/local/lib/python2.7/dist-packages/xcffib-0.2.1-py2.7-linux-x86_64.egg
> > Requirement already satisfied (use --upgrade to upgrade): six in
> > /usr/local/lib/python2.7/dist-packages (from xcffib)
> > Requirement already satisfied (use --upgrade to upgrade): cffi>=0.8.2 in
> > /usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg
> > (from xcffib)
> > Requirement already satisfied (use --upgrade to upgrade): pycparser in
> > /usr/local/lib/python2.7/dist-packages/pycparser-2.10-py2.7.egg (from
> > cffi>=0.8.2->xcffib)
> >
> > Then
> > pip install xcffib --upgrade
> > ......................
> > ton of exceptions
> > ......................
> > """, libraries=['xcb'], modulename='_xcffib')
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/api.py",
> > line 367, in verify
> >
> > lib = self.verifier.load_library()
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/verifier.py",
> > line 97, in load_library
> >
> > return self._load_library()
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/verifier.py",
> > line 207, in _load_library
> >
> > return self._vengine.load_library()
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 160, in load_library
> >
> > self._load(module, 'loading')
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 218, in _load
> >
> > method(tp, realname, module, **kwds)
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 440, in _loading_cpy_struct
> >
> > self._loading_struct_or_union(tp, 'struct', name, module)
> >
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 517, in _loading_struct_or_union
> >
> > function = getattr(module, layoutfuncname)
> >
> > AttributeError: struct xcb_screen_iterator_t: 'module' object has no
> > attribute '_cffi_layout_struct_xcb_screen_iterator_t'
> >
> > ----------------------------------------
> > Command "python setup.py egg_info" failed with error code 1 in
> > /tmp/pip-build-bCf7LB/xcffib
> >
> > Also
> >
> > sudo python setup.py install
> > ....................................
> > ton of exceptions
> > .................................
> > self.run_setup(setup_script, setup_base, args)
> > File
> > "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line
> > 1025, in run_setup
> > run_setup(setup_script, args)
> > File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 50,
> > in run_setup
> > lambda: execfile(
> > File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 100,
> > in run
> > return func()
> > File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 52,
> > in <lambda>
> > {'__file__':setup_script, '__name__':'__main__'}
> > File "setup.py", line 56, in <module>
> > if sys.version_info >= (3, 4):
> > File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
> > dist.run_commands()
> > File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
> > self.run_command(cmd)
> > File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command
> > cmd_obj.ensure_finalized()
> > File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
> > self.finalize_options()
> > File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py",
> > line 108, in finalize_options
> > bdist_base = self.get_finalized_command('bdist').bdist_base
> > File "/usr/lib/python2.7/distutils/cmd.py", line 312, in
> > get_finalized_command
> > cmd_obj.ensure_finalized()
> > File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
> > self.finalize_options()
> > File "/usr/lib/python2.7/distutils/command/bdist.py", line 99, in
> > finalize_options
> > self.plat_name = self.get_finalized_command('build').plat_name
> > File "/usr/lib/python2.7/distutils/cmd.py", line 312, in
> > get_finalized_command
> > cmd_obj.ensure_finalized()
> > File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
> > self.finalize_options()
> > File "setup.py", line 36, in finalize_options
> >
> > File "/tmp/easy_install-PwyeM9/xcffib-0.2.2/xcffib/__init__.py", line
> > 24, in <module>
> > File "/tmp/easy_install-PwyeM9/xcffib-0.2.2/xcffib/ffi.py", line 256, in
> > <module>
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/api.py",
> > line 367, in verify
> > lib = self.verifier.load_library()
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/verifier.py",
> > line 97, in load_library
> > return self._load_library()
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/verifier.py",
> > line 207, in _load_library
> > return self._vengine.load_library()
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 160, in load_library
> > self._load(module, 'loading')
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 218, in _load
> > method(tp, realname, module, **kwds)
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 440, in _loading_cpy_struct
> > self._loading_struct_or_union(tp, 'struct', name, module)
> > File
> > "/usr/local/lib/python2.7/dist-packages/cffi-0.9.2-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py",
> > line 517, in _loading_struct_or_union
> > function = getattr(module, layoutfuncname)
> > AttributeError: struct xcb_screen_iterator_t: 'module' object has no
> > attribute '_cffi_layout_struct_xcb_screen_iterator_t'
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "qtile-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.