Transfer errors module to Cython

This commit is contained in:
Roman Mogilatov 2016-11-04 10:49:08 +02:00
parent 78cb4296cc
commit 74aea6f1dc
6 changed files with 20 additions and 4 deletions

View File

@ -10,6 +10,7 @@ follows `Semantic versioning`_
Development version
-------------------
- Add ``dependency_injector.injections`` module (C extension).
- Transfer ``dependency_injector.errors`` module to Cython (C extension).
- Remove ``@inject`` decorator.
- Add makefile (``clean``, ``test``, ``build``, ``install``, ``uninstall``
& ``publish`` commands).

View File

@ -50,6 +50,10 @@ setup(name='dependency-injector',
['src/dependency_injector/injections.c'],
define_macros=defined_macros,
extra_compile_args=['-O2']),
Extension('dependency_injector.errors',
['src/dependency_injector/errors.c'],
define_macros=defined_macros,
extra_compile_args=['-O2']),
],
package_data={
'dependency_injector': ['*.pxd'],

View File

@ -0,0 +1,8 @@
"""Dependency injector errors.
Powered by Cython.
"""
cdef class Error(Exception):
pass

View File

@ -1,7 +1,10 @@
"""Dependency injector errors module."""
"""Dependency injector errors.
Powered by Cython.
"""
class Error(Exception):
cdef class Error(Exception):
"""Base error.
All dependency injector errors extend this error class.

View File

@ -1,6 +1,6 @@
"""Dependency injector injections.
Cython optimized code.
Powered by Cython.
"""
cimport cython

View File

@ -1,6 +1,6 @@
"""Dependency injector injections.
Cython optimized code.
Powered by Cython.
"""
cimport cython