From 44ea3f0b039cadd11f17f672f8ca593b82ac6472 Mon Sep 17 00:00:00 2001 From: "R. Tyler Ballance" Date: Mon, 22 Mar 2010 05:03:40 -0700 Subject: [PATCH] Updating setup.py to build properly on FreeBSD --- setup.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 498abea..1498bf0 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,14 @@ +#!/usr/bin/env python + import os -from distutils.core import setup, Extension + +SETUPTOOLS = False + +try: + from setuptools import setup, Extension + SETUPTOOLS = False +except ImportError: + from distutils.core import setup, Extension base_modules = [ Extension('_pyecc', [ @@ -14,7 +23,9 @@ 'py_objects.c', ], libraries=['gcrypt'], - extra_compile_args=['-Wall', '-Werror']) + include_dirs=['/usr/include', '/usr/local/include',], + library_dirs=['/usr/local/lib', '/usr/local/lib64',], + extra_compile_args=['-Wall', '-Werror',]), ] packages = ['pyecc'] @@ -25,13 +36,13 @@ if missing_modules: print 'WARNING: Some Python modules are missing dependencies: %s' % ', '.join(map(lambda x: x.name, missing_modules)) -setup( +kwargs = dict( name = 'PyECC', description = '''A CPython module to enable Elliptical Curve Cryptography in Python''', version = '1.0', author = 'R. Tyler Ballance', - author_email = 'tyler@slide.com', - ext_modules=modules, + author_email = 'tyler@monkeypox.org', + ext_modules=modules, py_modules=['pyecc']) - +setup(**kwargs)