Skip to content

Commit

Permalink
Changes from Andy Dustman to make setup.py work with rpms
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@2400 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
  • Loading branch information
radix committed Aug 15, 2002
1 parent cf81eb0 commit fc65417
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Twisted - Distutils distribution files
#
# $Id: MANIFEST.in,v 1.7 2002/04/26 05:08:41 carmstro Exp $
# $Id: MANIFEST.in,v 1.8 2002/08/15 07:15:53 radix Exp $

include CREDITS LICENSE README
include MANIFEST.in
Expand All @@ -27,5 +27,6 @@ recursive-include doc *.html
recursive-include doc/img *
recursive-include pyunit *.py
recursive-include static *
recursive-include twisted *.h

global-exclude */CVS/*
25 changes: 16 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Copyright (C) 2001 Matthew W. Lefkowitz
All rights reserved, see LICENSE for details.
$Id: setup.py,v 1.46 2002/08/15 01:24:44 radix Exp $
$Id: setup.py,v 1.47 2002/08/15 07:15:53 radix Exp $
"""

import distutils, os, sys, string
Expand Down Expand Up @@ -207,7 +207,11 @@ def _detect_modules(self):
define_macros = []

# Extension modules to build.
exts = []
exts = [
Extension("twisted.spread.cBanana",
["twisted/spread/cBanana.c"],
define_macros=define_macros),
]

# The C reactor
# TODO: possibly test for other headers that it uses (autoconf style).
Expand Down Expand Up @@ -314,14 +318,17 @@ def _detect_modules(self):
else:
define_macros = []

# We need to include at least one extension module or the build_ext command
# will not run and our custom command will not execute. We'll use C banana
# because it should build anywhere.
# Include all extension modules here, whether they are built or not.
# The custom built_ext command will wipe out this list anyway, but it
# is required for sdist to work.
setup_args['ext_modules'] = [
Extension("twisted.spread.cBanana",
["twisted/spread/cBanana.c"],
define_macros=define_macros)
]
Extension("twisted.spread.cBanana",
["twisted/spread/cBanana.c"],
define_macros=define_macros),
Extension("twisted.internet.cReactor",
glob('twisted/internet/cReactor/*.c'),
define_macros=define_macros),
]

apply(setup, (), setup_args)

0 comments on commit fc65417

Please sign in to comment.