diff --git a/pysdd/compiler_c.pxd b/pysdd/compiler_c.pxd index a05c790..b43f122 100644 --- a/pysdd/compiler_c.pxd +++ b/pysdd/compiler_c.pxd @@ -6,7 +6,7 @@ __license__ = "APL" """ -cimport sddapi_c +from . cimport sddapi_c cdef extern from "compiler.h": ctypedef struct SddCompilerOptions: diff --git a/pysdd/fnf_c.pxd b/pysdd/fnf_c.pxd index 5681d8e..a1c4775 100644 --- a/pysdd/fnf_c.pxd +++ b/pysdd/fnf_c.pxd @@ -7,8 +7,8 @@ pysdd.fnf_c :copyright: Copyright 2017-2018 KU Leuven and Regents of the University of California. :license: Apache License, Version 2.0, see LICENSE for details. """ -cimport sddapi_c -cimport compiler_c +from . cimport sddapi_c +from . cimport compiler_c cdef extern from "fnf.h": void free_fnf(compiler_c.Fnf* fnf) diff --git a/pysdd/io_c.pxd b/pysdd/io_c.pxd index d7e1342..d2f96ba 100644 --- a/pysdd/io_c.pxd +++ b/pysdd/io_c.pxd @@ -7,8 +7,8 @@ pysdd.io_c :copyright: Copyright 2017-2018 KU Leuven and Regents of the University of California. :license: Apache License, Version 2.0, see LICENSE for details. """ -cimport sddapi_c -cimport compiler_c +from . cimport sddapi_c +from . cimport compiler_c cdef extern from "io.h": compiler_c.Fnf* read_fnf(const char* filename); diff --git a/pysdd/sdd.pyx b/pysdd/sdd.pyx index d2bd0cb..6f2df10 100644 --- a/pysdd/sdd.pyx +++ b/pysdd/sdd.pyx @@ -11,11 +11,11 @@ SDD Python interface. """ cimport cython -cimport sddapi_c -cimport compiler_c -cimport io_c -cimport fnf_c -cimport weight_optimization_c +from . cimport sddapi_c +from . cimport compiler_c +from . cimport io_c +from . cimport fnf_c +from . cimport weight_optimization_c from cpython cimport array from cpython.mem cimport PyMem_Malloc, PyMem_Free @@ -1665,7 +1665,7 @@ cdef class WmcManager: """ if len(weights) > 2 * self.node._manager.var_count(): raise Exception("Array of weights is longer than the number of variables in the manager.") - cdef long nb_lits = len(weights) / 2 # The array can be shorter than the number of variables + cdef long nb_lits = len(weights) // 2 # The array can be shorter than the number of variables cdef sddapi_c.SddLiteral lit cdef long i for i in range(nb_lits): diff --git a/pysdd/weight_optimization_c.pxd b/pysdd/weight_optimization_c.pxd index 3b0a4ea..b18a4a5 100644 --- a/pysdd/weight_optimization_c.pxd +++ b/pysdd/weight_optimization_c.pxd @@ -7,7 +7,7 @@ pysdd.weight_optimization_c :copyright: Copyright 2017-2018 KU Leuven and Regents of the University of California. :license: Apache License, Version 2.0, see LICENSE for details. """ -cimport sddapi_c +from . cimport sddapi_c cdef extern from "weight_optimizer.h": @@ -15,4 +15,4 @@ cdef extern from "weight_optimizer.h": int n_optimize, int* ind_optimize, double* weights_optimize, int* counts_optimize, int n_fix, int* ind_fix, double* weights_fix, long double prior_sigma, long double l1_const, int max_iter, long double delta, - long double epsilon) \ No newline at end of file + long double epsilon) diff --git a/setup.py b/setup.py index 629e89c..d706058 100644 --- a/setup.py +++ b/setup.py @@ -209,10 +209,10 @@ def build_extensions(self): raise ImportError('Cython not available') # install_requires = ['numpy', 'cython'] -install_requires = ['cython>=0.29.6'] +install_requires = ['cython>=3.0.0'] setup_requires = ['setuptools>=18.0', 'cython>=0.29.6'] tests_require = ['pytest'] -dev_require = tests_require + ['cython>=0.29.6'] +dev_require = tests_require + ['cython>=3.0.0'] with (here / 'README.rst').open('r', encoding='utf-8') as f: long_description = f.read()