From e5e17f0bb4ac68366098e4d0d95c8c916ddff2ce Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald.stufft@gmail.com> Date: Fri, 22 Feb 2013 01:22:33 -0500 Subject: [PATCH] Add packaging --- nacl/__about__.py | 20 ++++++++++++++++++++ setup.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 nacl/__about__.py create mode 100644 setup.py diff --git a/nacl/__about__.py b/nacl/__about__.py new file mode 100644 index 00000000..f7ca2ee9 --- /dev/null +++ b/nacl/__about__.py @@ -0,0 +1,20 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import unicode_literals + +__all__ = [ + "__title__", "__summary__", "__uri__", "__version__", "__author__", + "__email__", "__license__", "__copyright__", +] + +__title__ = "pynacl" +__summary__ = "Python binding to the Networking and Cryptography (NaCl) library" # nopep8 +__uri__ = "https://github.com/dstufft/pynacl/" + +__version__ = "0.1dev1" + +__author__ = "Donald Stufft" +__email__ = "donald@stufft.io" + +__license__ = "Simplified BSD" +__copyright__ = "Copyright 2012 Donald Stufft" diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..37ae4e33 --- /dev/null +++ b/setup.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python +from setuptools import setup + +__about__ = {} + +with open("nacl/__about__.py") as fp: + exec(fp, None, __about__) + + +try: + import nacl.nacl +except ImportError: + # installing - there is no cffi yet + ext_modules = [] +else: + # building bdist - cffi is here! + ext_modules = [nacl.nacl.ffi.verifier.get_extension()] + + +setup( + name=__about__["__title__"], + version=__about__["__version__"], + + description=__about__["__summary__"], + long_description=open("README.rst").read(), + url=__about__["__uri__"], + license=__about__["__license__"], + + author=__about__["__author__"], + author_email=__about__["__email__"], + + install_requires=[ + "cffi", + ], + + packages=[ + "nacl", + ], + + ext_package="nacl", + ext_modules=ext_modules, + + zip_safe=False, +) -- GitLab