Ignore:
Timestamp:
Sep 26, 2005 6:55:39 PM (17 years ago)
Author:
dkearney
Message:

fixed the python rpunits setup script so now it really finds PyRpUnits?.cc

added more conversions to RpUnitsStd?.[h,cc]

added static convert function to RpUnits.[h,cc] so now users can ask for a
conversion as without having to make an RpUnits Object. instead, the
user specifies the value to be converted (value with attached units) as well
as the units we should convert to and if they want units in the returned
string. if the units exist, the conversion is done, if not, the original
string should be returned.

also added the ability to load preset units into the dictionary.
use the static function RpUnits::addPresets(...) in c++ this is done
automatically in python (although, maybe it shouldn't be).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/python/PyRpUnits_setup.py

    r21 r68  
    11from distutils.core import setup, Extension
    22
     3# need to write an if statement to check to see if the libRpUnits exists
     4# if lib exists, then use the lib to compile against.
     5# else compile everything from source.
     6#
     7#module = Extension('RpUnits',
     8#                   include_dirs = [ '/usr/local/include',
     9#                                    '../../include/cee',
     10#                                    '../../include/core'],
     11#                   libraries = ['RpUnits'],
     12#                   library_dirs = ['../lib'],
     13#                   sources = [  'PyRpUnits.cc' ])
     14
    315module = Extension('RpUnits',
    4                    include_dirs = [ '/usr/local/include',
    5                                     '../../include/cee',
     16                   include_dirs = [ '../../include/cee',
    617                                    '../../include/core'],
    7                    libraries = ['RpUnits'],
    8                    library_dirs = ['../lib'],
    9                    sources = ['src/PyRpUnits.cc'])
     18                   sources = [  '../core/RpUnitsStd.cc',
     19                                '../core/RpUnits.cc',
     20                                'PyRpUnits.cc' ])
    1021
    1122setup(name="RpUnits",
    1223      version="0.1",
    1324      description="module for converting Rappture Units",
    14       ext_modules=[module])
     25      ext_modules=[module]
     26      )
    1527
Note: See TracChangeset for help on using the changeset viewer.