source: web/old/remctl-2.14/python/setup.py.in @ f6f3e91

web
Last change on this file since f6f3e91 was f6f3e91, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Preserve directory hierarchy (not sure what happened to it)

  • Property mode set to 100644
File size: 3.8 KB
Line 
1# Python remctl extension build rules.
2#
3# Original implementation by Thomas L. Kula <kula@tproa.net>
4# Copyright 2008 Thomas L. Kula <kula@tproa.net>
5# Copyright 2008 Board of Trustees, Leland Stanford Jr. University
6#
7# Permission to use, copy, modify, and distribute this software and its
8# documentation for any purpose and without fee is hereby granted, provided
9# that the above copyright notice appear in all copies and that both that
10# copyright notice and this permission notice appear in supporting
11# documentation, and that the name of Thomas L. Kula not be used in
12# advertising or publicity pertaining to distribution of the software without
13# specific, written prior permission. Thomas L. Kula makes no representations
14# about the suitability of this software for any purpose.  It is provided "as
15# is" without express or implied warranty.
16#
17# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
18# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20
21# Keep the wrapping of the description to 65 columns and make sure there is no
22# trailing newline so that PKG-INFO looks right.
23"""Python bindings for remctl remote command execution
24
25remctl is a client/server application that supports remote
26execution of specific commands, using Kerberos v5 GSS-API for
27authentication.  Authorization is controlled by a configuration
28file and ACL files and can be set separately for each command,
29unlike with rsh.  remctl is like a Kerberos-authenticated simple
30CGI server, or a combination of Kerberos rsh and sudo without
31most of the features and complexity of either.
32
33This module provides Python bindings to the remctl client
34library."""
35
36from distutils.core import setup, Extension
37
38VERSION = '@PACKAGE_VERSION@'
39
40doclines = __doc__.split("\n")
41classifiers = """\
42Development Status :: 4 - Beta
43Intended Audience :: Developers
44License :: OSI Approved :: MIT License
45Operating System :: OS Independent
46Programming Language :: C
47Programming Language :: Python
48Topic :: Security
49Topic :: Software Development :: Libraries :: Python Modules
50"""
51
52# Helper function to parse a string of compiler flags for ones of interest and
53# strip the flag off, returning the string that the distutils Extension
54# interface expects.
55def parse_flags(prefix, flags):
56    result = []
57    filtered = [ opt for opt in flags.split() if opt.startswith(prefix) ]
58    for opt in filtered:
59        result.append(opt[len(prefix):])
60    return result
61
62# Build the list of include directories, libraries to link with, and
63# directories to add to the search paths based on the Autoconf results.
64ldflags = '@GSSAPI_LDFLAGS@' + ' ' + '@GSSAPI_LIBS@' + ' ' + '@LDFLAGS@'
65include = parse_flags('-I', '@GSSAPI_CPPFLAGS@' + ' ' + '@CPPFLAGS@')
66libs    = parse_flags('-l', '@GSSAPI_LIBS@' + ' ' + '@LIBS@')
67dirs    = parse_flags('-L', ldflags)
68libs = ['remctl'] + libs
69dirs.append('@abs_top_builddir@/client/.libs')
70include.append('@abs_top_srcdir@/client')
71
72extension = Extension('_remctl',
73                      sources       = [ '_remctlmodule.c' ],
74                      define_macros = [ ('VERSION', '"' + VERSION + '"') ],
75                      include_dirs  = include,
76                      libraries     = libs,
77                      library_dirs  = dirs)
78
79setup(name             = 'pyremctl',
80      version          = VERSION,
81      author           = 'Thomas L. Kula',
82      author_email     = 'kula@tproa.net',
83      url              = 'http://www.eyrie.org/~eagle/software/remctl/',
84      description      = doclines[0],
85      long_description = "\n".join(doclines[2:]),
86      license          = 'MIT',
87      classifiers      = filter(None, classifiers.split("\n")),
88      platforms        = 'any',
89      keywords         = [ 'remctl', 'kerberos', 'remote', 'command' ],
90
91      ext_modules      = [ extension ],
92      py_modules       = ['remctl'])
Note: See TracBrowser for help on using the repository browser.