diff --git a/setup.py b/setup.py index 7aa269b87ed76e1f9dc51f17515271e217ec95c2..d211d35038ded12bbaf66295c333cba1ef912933 100644 --- a/setup.py +++ b/setup.py @@ -210,6 +210,7 @@ setup( package_dir={"": "src"}, packages=[ "nacl", + "nacl.c", ], ext_package="nacl", diff --git a/src/nacl/c/__init__.py b/src/nacl/c/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e19b2509ee6bdcfe1b93054892a9404217d3ccf9 --- /dev/null +++ b/src/nacl/c/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2013 Donald Stufft and individual contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import absolute_import, division, print_function diff --git a/src/nacl/nacl.py b/src/nacl/c/_lib.py similarity index 99% rename from src/nacl/nacl.py rename to src/nacl/c/_lib.py index 35ee3010c095b2669e3b59fbbb4d2bccbe1b9518..a82ed815116433bb40a8309a25eb05a5f2544209 100644 --- a/src/nacl/nacl.py +++ b/src/nacl/c/_lib.py @@ -11,9 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""" -CFFI interface to NaCl and libsodium library -""" from __future__ import absolute_import from __future__ import division diff --git a/src/nacl/hash.py b/src/nacl/hash.py index a6f7638111d10dd39eb9b90e696de56925f1103d..eb0fdc0dd16438e02f11f9269e3cc487ba1c8eba 100644 --- a/src/nacl/hash.py +++ b/src/nacl/hash.py @@ -14,7 +14,8 @@ from __future__ import absolute_import from __future__ import division -from . import nacl, encoding +from . import encoding +from .c import _lib as nacl from .exceptions import CryptoError diff --git a/src/nacl/public.py b/src/nacl/public.py index b9604b1088673e76f141c2752c9b396ba3d88a2a..33d88d8e88f9515e20b7e1d695393e5f128140c5 100644 --- a/src/nacl/public.py +++ b/src/nacl/public.py @@ -14,7 +14,8 @@ from __future__ import absolute_import from __future__ import division -from . import nacl, encoding +from . import encoding +from .c import _lib as nacl from .exceptions import CryptoError from .utils import EncryptedMessage, StringFixer, random diff --git a/src/nacl/secret.py b/src/nacl/secret.py index e0b4e113aaff24835a1e131b559bf0809b0302d8..c21f082b59d3b770517861131bc1e10ce18c6739 100644 --- a/src/nacl/secret.py +++ b/src/nacl/secret.py @@ -14,7 +14,8 @@ from __future__ import absolute_import from __future__ import division -from . import nacl, encoding +from . import encoding +from .c import _lib as nacl from .exceptions import CryptoError from .utils import EncryptedMessage, StringFixer diff --git a/src/nacl/signing.py b/src/nacl/signing.py index 8ee774160f41588a073534349ede6ec0fe2f238b..5791fdd2256aa7d8a7bc16815a8e9ce8842c7497 100644 --- a/src/nacl/signing.py +++ b/src/nacl/signing.py @@ -16,7 +16,8 @@ from __future__ import division import six -from . import nacl, encoding +from . import encoding +from .c import _lib as nacl from .exceptions import CryptoError from .utils import StringFixer, random diff --git a/src/nacl/utils.py b/src/nacl/utils.py index 98c41891364e46744f977b95697b8c512b03fae4..963b7d6cc46c1469f5bb5a9e5ab28cd7322c9f8c 100644 --- a/src/nacl/utils.py +++ b/src/nacl/utils.py @@ -16,7 +16,7 @@ from __future__ import division import six -from . import nacl +from .c import _lib as nacl class EncryptedMessage(six.binary_type):