From 0d40627995f40367a47ea6772ee9dc98ceb135d7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 12 Jun 2013 09:17:34 -0400 Subject: [PATCH] Don't use: from pycomedi cimport module as _module Stick with: from pycomedi.module import Class as _Class to avoid things like: pycomedi/subdevice.pxd:24:5: '_subdevice_holder.pxd' not found which is probably a bug in my Cython 0.16. --- pycomedi/device.pxd | 4 ++-- pycomedi/device.pyx | 4 ++-- pycomedi/range.pxd | 4 ++-- pycomedi/range.pyx | 4 ++-- pycomedi/subdevice.pxd | 4 ++-- pycomedi/subdevice.pyx | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pycomedi/device.pxd b/pycomedi/device.pxd index e6745c9..96f63d5 100644 --- a/pycomedi/device.pxd +++ b/pycomedi/device.pxd @@ -17,11 +17,11 @@ "Expose `Device` internals at the C level for other Cython modules" from pycomedi cimport _comedilib_h -from pycomedi cimport device_holder as _device_holder +from pycomedi.device_holder cimport DeviceHolder as _DeviceHolder from pycomedi cimport instruction as _instruction -cdef class Device (_device_holder.DeviceHolder): +cdef class Device (_DeviceHolder): cdef public object file cdef public object filename diff --git a/pycomedi/device.pyx b/pycomedi/device.pyx index 18b44be..6b13157 100644 --- a/pycomedi/device.pyx +++ b/pycomedi/device.pyx @@ -27,14 +27,14 @@ from pycomedi cimport _comedi_h from pycomedi cimport _comedilib_h from . import _error from . import calibration as _calibration -from pycomedi cimport device_holder as _device_holder +from pycomedi.device_holder cimport DeviceHolder as _DeviceHolder from . import device_holder as _device_holder from pycomedi cimport instruction as _instruction from . import instruction as _instruction from . import subdevice as _subdevice -cdef class Device (_device_holder.DeviceHolder): +cdef class Device (_DeviceHolder): """A Comedi device >>> from . import constant diff --git a/pycomedi/range.pxd b/pycomedi/range.pxd index 0888ec1..9f112ca 100644 --- a/pycomedi/range.pxd +++ b/pycomedi/range.pxd @@ -17,10 +17,10 @@ "Expose `Range` internals at the C level for other Cython modules" from pycomedi cimport _comedilib_h -from . import constant as _constant +from pycomedi.constant cimport BitwiseOperator as _BitwiseOperator -cdef class Range (_constant.BitwiseOperator): +cdef class Range (_BitwiseOperator): cdef _comedilib_h.comedi_range range cdef set_comedi_range(self, _comedilib_h.comedi_range range) diff --git a/pycomedi/range.pyx b/pycomedi/range.pyx index 6171a83..bcba039 100644 --- a/pycomedi/range.pyx +++ b/pycomedi/range.pyx @@ -16,11 +16,11 @@ "Wrap `comedi_range` in a Python class" -from pycomedi import constant as _constant +from pycomedi.constant cimport BitwiseOperator as _BitwiseOperator from . import constant as _constant -cdef class Range (_constant.BitwiseOperator): +cdef class Range (_BitwiseOperator): """Stucture displaying a possible channel range Warning: You probably want to use `channel.Channel.get_range()` or diff --git a/pycomedi/subdevice.pxd b/pycomedi/subdevice.pxd index 31bfcf6..07d6d01 100644 --- a/pycomedi/subdevice.pxd +++ b/pycomedi/subdevice.pxd @@ -18,10 +18,10 @@ from pycomedi cimport _comedilib_h from pycomedi cimport command as _command -from pycomedi cimport subdevice_holder as _subdevice_holder +from pycomedi.subdevice_holder cimport SubdeviceHolder as _SubdeviceHolder -cdef class Subdevice (_subdevice_holder.SubdeviceHolder): +cdef class Subdevice (_SubdeviceHolder): cpdef dio_bitfield(self, unsigned int bits=*, write_mask=*, base_channel=*) diff --git a/pycomedi/subdevice.pyx b/pycomedi/subdevice.pyx index a04def2..582835e 100644 --- a/pycomedi/subdevice.pyx +++ b/pycomedi/subdevice.pyx @@ -24,12 +24,12 @@ from . import _error as _error from . import channel as _channel from . import constant as _constant from . import command as _command -from pycomedi cimport subdevice_holder as _subdevice_holder -from . import subdevice_holder as _subdevice_holder +from pycomedi.subdevice_holder cimport SubdeviceHolder as _SubdeviceHolder +from .subdevice_holder import SubdeviceHolder as _SubdeviceHolder from .utility import _subdevice_dtype, _subdevice_typecode -cdef class Subdevice (_subdevice_holder.SubdeviceHolder): +cdef class Subdevice (_SubdeviceHolder): """Class bundling subdevice-related functions >>> from .device import Device -- 2.26.2