Permalink
Browse files

Updating setup.py to build properly on FreeBSD

  • Loading branch information...
1 parent 1920cf7 commit 44ea3f0b039cadd11f17f672f8ca593b82ac6472 @rtyler committed Mar 22, 2010
Showing with 17 additions and 6 deletions.
  1. +17 −6 setup.py
View
@@ -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)

0 comments on commit 44ea3f0

Please sign in to comment.