Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #231 from enthought/use-setuptools-feature-class
Browse files Browse the repository at this point in the history
Use distribute feature class
  • Loading branch information
sccolbert committed Jan 7, 2013
2 parents b6426b7 + 96d57f8 commit 4eebd59
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion docs/source/instructional/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ Alternatively you can work in developing mode::
python setup.py develop

Enaml ships with optional high performance C++ extensions. To build them,
an enviroment variable must be set before running ``setup.py``
a ``--with`` option needs to be provided::

python setup.py --with-enaml-extensions install

Or an enviroment variable must be set before running ``setup.py``.

On Windows::

Expand Down
17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# All rights reserved.
#------------------------------------------------------------------------------
import os
from setuptools import setup, find_packages, Extension
from setuptools import setup, find_packages, Extension, Feature


if os.environ.get('BUILD_ENAML_EXTENSIONS'):
ext_modules = [
enaml_extensions = Feature(
description='optional optimized c++ extensions',
standard=bool(os.environ.get('BUILD_ENAML_EXTENSIONS')),
ext_modules=[
Extension(
'enaml.extensions.weakmethod',
['enaml/extensions/weakmethod.cpp'],
Expand All @@ -27,10 +29,9 @@
'enaml.extensions.funchelper',
['enaml/extensions/funchelper.cpp'],
language='c++',
),
]
else:
ext_modules = []
)
],
)


setup(
Expand All @@ -51,7 +52,7 @@
'enaml-run = enaml.runner:main',
],
),
ext_modules=ext_modules,
test_suite='enaml.test_collector',
features={'enaml-extensions': enaml_extensions}
)

0 comments on commit 4eebd59

Please sign in to comment.