pygccxml-commit Mailing List for C++ Python language bindings (Page 69)
Brought to you by:
mbaas,
roman_yakovenko
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(190) |
Apr
(166) |
May
(170) |
Jun
(75) |
Jul
(105) |
Aug
(131) |
Sep
(99) |
Oct
(84) |
Nov
(67) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(49) |
Mar
(25) |
Apr
(62) |
May
(21) |
Jun
(34) |
Jul
(9) |
Aug
(21) |
Sep
(5) |
Oct
|
Nov
(63) |
Dec
(34) |
2008 |
Jan
(10) |
Feb
(42) |
Mar
(26) |
Apr
(25) |
May
(6) |
Jun
(40) |
Jul
(18) |
Aug
(29) |
Sep
(6) |
Oct
(32) |
Nov
(14) |
Dec
(56) |
2009 |
Jan
(127) |
Feb
(52) |
Mar
(2) |
Apr
(10) |
May
(29) |
Jun
(3) |
Jul
|
Aug
(16) |
Sep
(4) |
Oct
(11) |
Nov
(8) |
Dec
(14) |
2010 |
Jan
(31) |
Feb
(1) |
Mar
(7) |
Apr
(9) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rom...@us...> - 2006-05-18 15:12:10
|
Revision: 141 Author: roman_yakovenko Date: 2006-05-18 08:11:59 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=141&view=rev Log Message: ----------- setting log level to INFO Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py Modified: pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-05-18 15:11:06 UTC (rev 140) +++ pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-05-18 15:11:59 UTC (rev 141) @@ -9,6 +9,7 @@ import sys import time import shutil +import logging import crc_settings from pygccxml import parser from pygccxml import declarations @@ -22,6 +23,7 @@ class code_generator_t(object): def __init__(self): + module_builder.set_logger_level( logging.INFO ) self.__file = os.path.join( crc_settings.working_dir, 'crc_export.hpp' ) self.__mb = module_builder.module_builder_t( Modified: pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py 2006-05-18 15:11:06 UTC (rev 140) +++ pyplusplus_dev/examples/pyboost_dev/dev/rational/generate_code.py 2006-05-18 15:11:59 UTC (rev 141) @@ -9,10 +9,10 @@ import sys import time import shutil +import logging import rational_settings from pygccxml import parser from pygccxml import declarations -from pyplusplus import code_creators from pyplusplus import module_builder from pyplusplus.module_builder import call_policies @@ -24,6 +24,8 @@ class code_generator_t(object): def __init__(self): + module_builder.set_logger_level( logging.INFO ) + self.__file = os.path.join( rational_settings.working_dir, 'rational_export.hpp' ) self.__mb = module_builder.module_builder_t( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 15:11:15
|
Revision: 140 Author: roman_yakovenko Date: 2006-05-18 08:11:06 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=140&view=rev Log Message: ----------- cleaning date_time directory Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.sln pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.suo pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.vcproj pyplusplus_dev/examples/pyboost_dev/dev/date_time/generated/ Deleted: pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.sln =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.sln 2006-05-18 15:09:38 UTC (rev 139) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.sln 2006-05-18 15:11:06 UTC (rev 140) @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_date_time_", "_date_time_.vcproj", "{57952129-F475-465F-81E7-E45DD1BDD676}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {57952129-F475-465F-81E7-E45DD1BDD676}.Debug.ActiveCfg = Debug|Win32 - {57952129-F475-465F-81E7-E45DD1BDD676}.Debug.Build.0 = Debug|Win32 - {57952129-F475-465F-81E7-E45DD1BDD676}.Release.ActiveCfg = Release|Win32 - {57952129-F475-465F-81E7-E45DD1BDD676}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal Deleted: pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.suo =================================================================== (Binary files differ) Deleted: pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.vcproj =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.vcproj 2006-05-18 15:09:38 UTC (rev 139) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/_date_time_.vcproj 2006-05-18 15:11:06 UTC (rev 140) @@ -1,739 +0,0 @@ -<?xml version="1.0" encoding="windows-1255"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="_date_time_" - ProjectGUID="{57952129-F475-465F-81E7-E45DD1BDD676}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="2" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/U __MINGW32__" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DATE_TIME__EXPORTS" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="3" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - OutputFile="$(OutDir)/_date_time_.dll" - LinkIncremental="2" - GenerateDebugInformation="TRUE" - ProgramDatabaseFile="$(OutDir)/_date_time_.pdb" - SubSystem="2" - ImportLibrary="$(OutDir)/_date_time_.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="2" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/U __MINGW32__" - AdditionalIncludeDirectories="D:\pygccxml_sources\source\pyplusplus\examples\py_date_time\generated;C:\python\include;D:\boost_cvs" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BOOST_DATE_TIME_DYN_LINK" - RuntimeLibrary="2" - TreatWChar_tAsBuiltInType="TRUE" - ForceConformanceInForLoopScope="TRUE" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="0" - DisableSpecificWarnings="4244;4267"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="python24.lib boost_python.lib" - ShowProgress="0" - OutputFile="$(OutDir)/_date_time_.dll" - LinkIncremental="1" - SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="C:\python\libs;D:\boost_cvs\bin" - GenerateDebugInformation="FALSE" - SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="1" - ImportLibrary="$(OutDir)/_date_time_.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\generated\__impl_details_33.pypp.cpp"> - </File> - <File - RelativePath=".\generated\_date_time_.main.cpp"> - </File> - <File - RelativePath=".\generated\_date_time__enumerations.pypp.cpp"> - </File> - <File - RelativePath=".\generated\_date_time__free_functions.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ambiguous_result.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_adjustment.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_day_of_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_day_of_year.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_field_count.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_offset.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_weekday.pypp.cpp"> - </File> - <File - RelativePath=".\generated\bad_year.pypp.cpp"> - </File> - <File - RelativePath=".\generated\base_time_pyplusplus.pypp.cpp"> - </File> - <File - RelativePath=".\generated\counted_time_system_pyplusplus.pypp.cpp"> - </File> - <File - RelativePath=".\generated\custom_time_zone.pypp.cpp"> - </File> - <File - RelativePath=".\generated\data_not_accessible.pypp.cpp"> - </File> - <File - RelativePath=".\generated\date.pypp.cpp"> - </File> - <File - RelativePath=".\generated\date_duration.pypp.cpp"> - </File> - <File - RelativePath=".\generated\date_period.pypp.cpp"> - </File> - <File - RelativePath=".\generated\date_pyplusplus.pypp.cpp"> - </File> - <File - RelativePath=".\generated\day_clock.pypp.cpp"> - </File> - <File - RelativePath=".\generated\day_of_year_type.pypp.cpp"> - </File> - <File - RelativePath=".\generated\dst_adjustment_offsets.pypp.cpp"> - </File> - <File - RelativePath=".\generated\dst_calc_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\dst_calculator.pypp.cpp"> - </File> - <File - RelativePath=".\generated\dst_not_valid.pypp.cpp"> - </File> - <File - RelativePath=".\generated\first_kday_after.pypp.cpp"> - </File> - <File - RelativePath=".\generated\first_kday_before.pypp.cpp"> - </File> - <File - RelativePath=".\generated\first_kday_of_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\first_last_dst_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\first_last_rule_spec.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_day.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_day_rep.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_month_rep.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_weekday.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_weekday_rep.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_year.pypp.cpp"> - </File> - <File - RelativePath=".\generated\greg_year_rep.pypp.cpp"> - </File> - <File - RelativePath=".\generated\gregorian_calendar.pypp.cpp"> - </File> - <File - RelativePath=".\generated\gregorian_calendar_base_pyplusplus.pypp.cpp"> - </File> - <File - RelativePath=".\generated\gregorian_year_based_generator.pypp.cpp"> - </File> - <File - RelativePath=".\generated\hours.pypp.cpp"> - </File> - <File - RelativePath=".\generated\int_adapter_int.pypp.cpp"> - </File> - <File - RelativePath=".\generated\int_adapter_long.pypp.cpp"> - </File> - <File - RelativePath=".\generated\int_adapter_long_long_int.pypp.cpp"> - </File> - <File - RelativePath=".\generated\int_adapter_ulong.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_extended_format.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_extended_wformat.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_format.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_format_base.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_wformat.pypp.cpp"> - </File> - <File - RelativePath=".\generated\iso_wformat_base.pypp.cpp"> - </File> - <File - RelativePath=".\generated\last_kday_of_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\last_last_dst_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\last_last_rule_spec.pypp.cpp"> - </File> - <File - RelativePath=".\generated\local_date_time.pypp.cpp"> - </File> - <File - RelativePath=".\generated\local_microsec_clock.pypp.cpp"> - </File> - <File - RelativePath=".\generated\local_sec_clock.pypp.cpp"> - </File> - <File - RelativePath=".\generated\local_time_period.pypp.cpp"> - </File> - <File - RelativePath=".\generated\microsec_clock.pypp.cpp"> - </File> - <File - RelativePath=".\generated\microseconds.pypp.cpp"> - </File> - <File - RelativePath=".\generated\milliseconds.pypp.cpp"> - </File> - <File - RelativePath=".\generated\minutes.pypp.cpp"> - </File> - <File - RelativePath=".\generated\month_functor_pyplusplus.pypp.cpp"> - </File> - <File - RelativePath=".\generated\months.pypp.cpp"> - </File> - <File - RelativePath=".\generated\no_dst.pypp.cpp"> - </File> - <File - RelativePath=".\generated\nth_kday_dst_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\nth_kday_of_month.pypp.cpp"> - </File> - <File - RelativePath=".\generated\nth_kday_rule_spec.pypp.cpp"> - </File> - <File - RelativePath=".\generated\nth_last_dst_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\nth_last_rule_spec.pypp.cpp"> - </File> - <File - RelativePath=".\generated\partial_date.pypp.cpp"> - </File> - <File - RelativePath=".\generated\partial_date_dst_rule.pypp.cpp"> - </File> - <File - RelativePath=".\generated\partial_date_rule_spec.pypp.cpp"> - </File> - <File - RelativePath=".\generated\posix_time_zone.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ptime.pypp.cpp"> - </File> - <File - RelativePath=".\generated\second_clock.pypp.cpp"> - </File> - <File - RelativePath=".\generated\seconds.pypp.cpp"> - </File> - <File - RelativePath=".\generated\simple_format.pypp.cpp"> - </File> - <File - RelativePath=".\generated\simple_wformat.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_duration.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_duration_impl.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_label_invalid.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_period.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_zone_base.pypp.cpp"> - </File> - <File - RelativePath=".\generated\time_zone_names.pypp.cpp"> - </File> - <File - RelativePath=".\generated\tz_database.pypp.cpp"> - </File> - <File - RelativePath=".\generated\us_dst.pypp.cpp"> - </File> - <File - RelativePath=".\generated\weeks.pypp.cpp"> - </File> - <File - RelativePath=".\generated\year_month_day.pypp.cpp"> - </File> - <File - RelativePath=".\generated\years.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_extended_formatter.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_extended_wformatter.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_formatter.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_wformatter.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_simple_formatter.pypp.cpp"> - </File> - <File - RelativePath=".\generated\ymd_simple_wformatter.pypp.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\generated\__array_1.pypp.hpp"> - </File> - <File - RelativePath=".\generated\__impl_details_33.pypp.hpp"> - </File> - <File - RelativePath=".\generated\_date_time__enumerations.pypp.hpp"> - </File> - <File - RelativePath=".\generated\_date_time__free_functions.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ambiguous_result.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_adjustment.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_day_of_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_day_of_year.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_field_count.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_offset.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_weekday.pypp.hpp"> - </File> - <File - RelativePath=".\generated\bad_year.pypp.hpp"> - </File> - <File - RelativePath=".\generated\base_time_pyplusplus.pypp.hpp"> - </File> - <File - RelativePath=".\generated\counted_time_system_pyplusplus.pypp.hpp"> - </File> - <File - RelativePath=".\generated\custom_time_zone.pypp.hpp"> - </File> - <File - RelativePath=".\generated\data_not_accessible.pypp.hpp"> - </File> - <File - RelativePath=".\generated\date.pypp.hpp"> - </File> - <File - RelativePath=".\generated\date_duration.pypp.hpp"> - </File> - <File - RelativePath=".\generated\date_period.pypp.hpp"> - </File> - <File - RelativePath=".\generated\date_pyplusplus.pypp.hpp"> - </File> - <File - RelativePath=".\generated\date_time_wrapper.hpp"> - </File> - <File - RelativePath=".\generated\day_clock.pypp.hpp"> - </File> - <File - RelativePath=".\generated\day_of_year_type.pypp.hpp"> - </File> - <File - RelativePath=".\generated\dst_adjustment_offsets.pypp.hpp"> - </File> - <File - RelativePath=".\generated\dst_calc_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\dst_calculator.pypp.hpp"> - </File> - <File - RelativePath=".\generated\dst_not_valid.pypp.hpp"> - </File> - <File - RelativePath=".\generated\first_kday_after.pypp.hpp"> - </File> - <File - RelativePath=".\generated\first_kday_before.pypp.hpp"> - </File> - <File - RelativePath=".\generated\first_kday_of_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\first_last_dst_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\first_last_rule_spec.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_day.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_day_rep.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_month_rep.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_weekday.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_weekday_rep.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_year.pypp.hpp"> - </File> - <File - RelativePath=".\generated\greg_year_rep.pypp.hpp"> - </File> - <File - RelativePath=".\generated\gregorian_calendar.pypp.hpp"> - </File> - <File - RelativePath=".\generated\gregorian_calendar_base_pyplusplus.pypp.hpp"> - </File> - <File - RelativePath=".\generated\gregorian_year_based_generator.pypp.hpp"> - </File> - <File - RelativePath=".\generated\hours.pypp.hpp"> - </File> - <File - RelativePath=".\generated\int_adapter_int.pypp.hpp"> - </File> - <File - RelativePath=".\generated\int_adapter_long.pypp.hpp"> - </File> - <File - RelativePath=".\generated\int_adapter_long_long_int.pypp.hpp"> - </File> - <File - RelativePath=".\generated\int_adapter_ulong.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_extended_format.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_extended_wformat.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_format.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_format_base.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_wformat.pypp.hpp"> - </File> - <File - RelativePath=".\generated\iso_wformat_base.pypp.hpp"> - </File> - <File - RelativePath=".\generated\last_kday_of_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\last_last_dst_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\last_last_rule_spec.pypp.hpp"> - </File> - <File - RelativePath=".\generated\local_date_time.pypp.hpp"> - </File> - <File - RelativePath=".\generated\local_microsec_clock.pypp.hpp"> - </File> - <File - RelativePath=".\generated\local_sec_clock.pypp.hpp"> - </File> - <File - RelativePath=".\generated\local_time_period.pypp.hpp"> - </File> - <File - RelativePath=".\generated\microsec_clock.pypp.hpp"> - </File> - <File - RelativePath=".\generated\microseconds.pypp.hpp"> - </File> - <File - RelativePath=".\generated\milliseconds.pypp.hpp"> - </File> - <File - RelativePath=".\generated\minutes.pypp.hpp"> - </File> - <File - RelativePath=".\generated\month_functor_pyplusplus.pypp.hpp"> - </File> - <File - RelativePath=".\generated\months.pypp.hpp"> - </File> - <File - RelativePath=".\generated\no_dst.pypp.hpp"> - </File> - <File - RelativePath=".\generated\nth_kday_dst_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\nth_kday_of_month.pypp.hpp"> - </File> - <File - RelativePath=".\generated\nth_kday_rule_spec.pypp.hpp"> - </File> - <File - RelativePath=".\generated\nth_last_dst_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\nth_last_rule_spec.pypp.hpp"> - </File> - <File - RelativePath=".\generated\partial_date.pypp.hpp"> - </File> - <File - RelativePath=".\generated\partial_date_dst_rule.pypp.hpp"> - </File> - <File - RelativePath=".\generated\partial_date_rule_spec.pypp.hpp"> - </File> - <File - RelativePath=".\generated\posix_time_zone.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ptime.pypp.hpp"> - </File> - <File - RelativePath=".\generated\second_clock.pypp.hpp"> - </File> - <File - RelativePath=".\generated\seconds.pypp.hpp"> - </File> - <File - RelativePath=".\generated\simple_format.pypp.hpp"> - </File> - <File - RelativePath=".\generated\simple_wformat.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_duration.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_duration_impl.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_label_invalid.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_period.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_zone_base.pypp.hpp"> - </File> - <File - RelativePath=".\generated\time_zone_names.pypp.hpp"> - </File> - <File - RelativePath=".\generated\tz_database.pypp.hpp"> - </File> - <File - RelativePath=".\generated\us_dst.pypp.hpp"> - </File> - <File - RelativePath=".\generated\weeks.pypp.hpp"> - </File> - <File - RelativePath=".\generated\year_month_day.pypp.hpp"> - </File> - <File - RelativePath=".\generated\years.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_extended_formatter.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_extended_wformatter.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_formatter.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_iso_wformatter.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_simple_formatter.pypp.hpp"> - </File> - <File - RelativePath=".\generated\ymd_simple_wformatter.pypp.hpp"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 15:09:38 UTC (rev 139) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 15:11:06 UTC (rev 140) @@ -9,6 +9,7 @@ import sys import time import shutil +import logging import date_time_settings import customization_data from pygccxml import parser @@ -17,6 +18,7 @@ class code_generator_t(object): def __init__(self): + module_builder.set_logger_level( logging.INFO ) self.__file = os.path.join( date_time_settings.date_time_pypp_include, 'date_time.pypp.hpp' ) def _create_xml_file( self ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 15:09:46
|
Revision: 139 Author: roman_yakovenko Date: 2006-05-18 08:09:38 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=139&view=rev Log Message: ----------- applying "is_noncopyable" Allen patch Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/type_traits.py Modified: pygccxml_dev/pygccxml/declarations/type_traits.py =================================================================== --- pygccxml_dev/pygccxml/declarations/type_traits.py 2006-05-18 14:07:18 UTC (rev 138) +++ pygccxml_dev/pygccxml/declarations/type_traits.py 2006-05-18 15:09:38 UTC (rev 139) @@ -671,7 +671,11 @@ if base_desc.related_class.decl_string in ('::boost::noncopyable', '::boost::noncopyable_::noncopyable' ): return True if not has_trivial_copy( base_desc.related_class ): - return True + protected_ctrs = filter( lambda x: isinstance( x, calldef.constructor_t ) \ + and x.is_copy_constructor + , base_desc.related_class.protected_members ) + if not protected_ctrs: + return True if not has_trivial_copy( class_ ) \ or not has_public_constructor( class_ )\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 14:07:41
|
Revision: 138 Author: roman_yakovenko Date: 2006-05-18 07:07:18 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=138&view=rev Log Message: ----------- fixing bug in date time Modified Paths: -------------- pyplusplus_dev/environment.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript pyplusplus_dev/examples/pyboost_dev/sconstruct pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py Modified: pyplusplus_dev/environment.py =================================================================== --- pyplusplus_dev/environment.py 2006-05-18 10:45:18 UTC (rev 137) +++ pyplusplus_dev/environment.py 2006-05-18 14:07:18 UTC (rev 138) @@ -5,7 +5,6 @@ class boost: libs = '' include = '' - include_linux = '' class python: libs = '' @@ -30,7 +29,6 @@ scons.ccflags = ['/MD', '/EHsc', '/GR', '/Zc:wchar_t', '/Zc:forScope' ] boost.libs = 'd:/boost_cvs/bin' boost.include = 'd:/boost_cvs' - boost.include_linux = '/home/roman/boost_cvs' python.libs = 'c:/python/libs' python.include = 'c:/python/include' gccxml.executable = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 10:45:18 UTC (rev 137) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 14:07:18 UTC (rev 138) @@ -147,11 +147,13 @@ extmodule = mb.code_creator #beautifying include code generation extmodule.license = customization_data.license - extmodule.user_defined_directories.append( date_time_settings.boost.include ) + extmodule.user_defined_directories.append( date_time_settings.boost.include ) extmodule.user_defined_directories.append( date_time_settings.working_dir ) extmodule.user_defined_directories.append( date_time_settings.generated_files_dir ) extmodule.license = customization_data.license extmodule.precompiled_header = 'boost/python.hpp' + extmodule.replace_included_headers( customization_data.includes ) + self.beautify_code( mb ) def write_files( self, mb ): Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-05-18 10:45:18 UTC (rev 137) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-05-18 14:07:18 UTC (rev 138) @@ -21,6 +21,7 @@ source_files = filter( lambda s: s.endswith( '.cpp' ), os.listdir(date_time_settings.generated_files_dir) ) return map( lambda fname: os.path.join( date_time_settings.generated_files_dir, fname ), source_files ) + def get_libs(): libs = [] if sys.platform == 'linux2': @@ -39,4 +40,10 @@ _date_time_ = local_env.SharedLibrary( target=date_time_settings.module_name , source=get_source_files() ) -local_env.Install( '#pyboost/date_time', _date_time_ ) \ No newline at end of file +if sys.platform == 'win32': + boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'boost_date_time-vc71-mt-1_34.dll' ) +else: + boost_date_time_so_dll = os.path.join( date_time_settings.boost.libs, 'libboost_date_time-gcc-1_34.so' ) + + +local_env.Install( '#pyboost/date_time', [_date_time_, boost_date_time_so_dll ] ) \ No newline at end of file Modified: pyplusplus_dev/examples/pyboost_dev/sconstruct =================================================================== --- pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-18 10:45:18 UTC (rev 137) +++ pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-18 14:07:18 UTC (rev 138) @@ -13,9 +13,13 @@ , LIBPATH=[ environment.boost.libs, environment.python.libs ] , CPPPATH=[ environment.boost.include, environment.python.include ] , SHLIBPREFIX='' - , SHLIBSUFFIX=environment.scons.suffix - , no_import_lib=1 + , SHLIBSUFFIX=environment.scons.suffix ) + +if sys.platform == 'win32': + env.Replace( no_import_lib=1 ) +else: + env.Append( CCFLAGS=' -ggdb3 -DNDEBUG -O3' ) Export( 'env' ) env.SConscript( ['dev/date_time/sconscript'] ) Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py 2006-05-18 10:45:18 UTC (rev 137) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py 2006-05-18 14:07:18 UTC (rev 138) @@ -38,8 +38,7 @@ def instantiate_dist( self, urng, dist ): if not boost_random.variate_generator_exists( urng, dist ): - return - + return gen1 = boost_random.variate_generator( urng, dist) gen2 = boost_random.variate_generator( urng, dist) self.randomness_tester( gen1 ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 10:45:33
|
Revision: 137 Author: roman_yakovenko Date: 2006-05-18 03:45:18 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=137&view=rev Log Message: ----------- porting recent changes to windows Modified Paths: -------------- pyplusplus_dev/environment.py pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/__init__.py pyplusplus_dev/examples/pyboost_dev/pyboost/crc/__init__.py pyplusplus_dev/examples/pyboost_dev/sconstruct Modified: pyplusplus_dev/environment.py =================================================================== --- pyplusplus_dev/environment.py 2006-05-18 07:40:05 UTC (rev 136) +++ pyplusplus_dev/environment.py 2006-05-18 10:45:18 UTC (rev 137) @@ -5,7 +5,8 @@ class boost: libs = '' include = '' - + include_linux = '' + class python: libs = '' include = '' @@ -28,7 +29,8 @@ scons.suffix = '.dll' scons.ccflags = ['/MD', '/EHsc', '/GR', '/Zc:wchar_t', '/Zc:forScope' ] boost.libs = 'd:/boost_cvs/bin' - boost.include = 'd:/boost_cvs' + boost.include = 'd:/boost_cvs' + boost.include_linux = '/home/roman/boost_cvs' python.libs = 'c:/python/libs' python.include = 'c:/python/include' gccxml.executable = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' Modified: pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-05-18 07:40:05 UTC (rev 136) +++ pyplusplus_dev/examples/pyboost_dev/dev/crc/generate_code.py 2006-05-18 10:45:18 UTC (rev 137) @@ -39,7 +39,8 @@ boost_ns.classes( lambda decl: decl.name.startswith( 'crc_basic' ) ).include() boost_ns.classes( lambda decl: decl.name.startswith( 'crc_optimal' ) ).include() boost_ns.member_functions( 'process_bytes' ).exclude() - boost_ns.member_functions( 'process_block' ).exclude() + boost_ns.member_functions( 'process_block' ).exclude() + boost_ns.member_operators( symbol='()' ).exclude() def prepare_declarations( self ): boost_ns = self.__mb.namespace( 'boost' ) Modified: pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/__init__.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/__init__.py 2006-05-18 07:40:05 UTC (rev 136) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/__init__.py 2006-05-18 10:45:18 UTC (rev 137) @@ -3,7 +3,8 @@ # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) - + +import sys import _random_ #TODO: @@ -19,8 +20,9 @@ from _random_ import lagged_fibonacci2281 from _random_ import lagged_fibonacci23209 from _random_ import lagged_fibonacci3217 -from _random_ import lagged_fibonacci4423 -from _random_ import lagged_fibonacci44497 +from _random_ import lagged_fibonacci4423 +if sys.platform != 'win32': + from _random_ import lagged_fibonacci44497 from _random_ import lagged_fibonacci607 from _random_ import lagged_fibonacci9689 from _random_ import minstd_rand @@ -44,8 +46,7 @@ , lagged_fibonacci2281 , lagged_fibonacci23209 , lagged_fibonacci3217 - , lagged_fibonacci4423 - , lagged_fibonacci44497 + , lagged_fibonacci4423 , lagged_fibonacci607 , lagged_fibonacci9689 , minstd_rand @@ -60,7 +61,9 @@ , ranlux64_4_01 , taus88 ] - + +if sys.platform != 'win32': + generators.append( lagged_fibonacci44497 ) #distribution from _random_ import bernoulli_distribution bernoulli_distribution.__call__ = _random_.py_bernoulli_distribution.call @@ -264,22 +267,22 @@ #__vg[ ][ uniform_int ] = _random_.does not exist #__vg[ ][ uniform_smallint ] = _random_.does not exist +if sys.platform != 'win32': + __vg[ lagged_fibonacci44497 ][ bernoulli_distribution ] = _random_.variate_generator_lagged_fibonacci44497__bernoulli_distribution + __vg[ lagged_fibonacci44497 ][ binomial_distribution ] = _random_.variate_generator_lagged_fibonacci44497__binomial_distribution + __vg[ lagged_fibonacci44497 ][ cauchy_distribution ] = _random_.variate_generator_lagged_fibonacci44497__cauchy_distribution + __vg[ lagged_fibonacci44497 ][ exponential_distribution ] = _random_.variate_generator_lagged_fibonacci44497__exponential_distribution + __vg[ lagged_fibonacci44497 ][ gamma_distribution ] = _random_.variate_generator_lagged_fibonacci44497__gamma_distribution + __vg[ lagged_fibonacci44497 ][ geometric_distribution ] = _random_.variate_generator_lagged_fibonacci44497__geometric_distribution + __vg[ lagged_fibonacci44497 ][ lognormal_distribution ] = _random_.variate_generator_lagged_fibonacci44497__lognormal_distribution + __vg[ lagged_fibonacci44497 ][ normal_distribution ] = _random_.variate_generator_lagged_fibonacci44497__normal_distribution + __vg[ lagged_fibonacci44497 ][ poisson_distribution ] = _random_.variate_generator_lagged_fibonacci44497__poisson_distribution + __vg[ lagged_fibonacci44497 ][ triangle_distribution ] = _random_.variate_generator_lagged_fibonacci44497__triangle_distribution + __vg[ lagged_fibonacci44497 ][ uniform_on_sphere ] = _random_.variate_generator_lagged_fibonacci44497__uniform_on_sphere + __vg[ lagged_fibonacci44497 ][ uniform_real ] = _random_.variate_generator_lagged_fibonacci44497__uniform_real + #__vg[ ][ uniform_int ] = _random_.does not exist + #__vg[ ][ uniform_smallint ] = _random_.does not exist -__vg[ lagged_fibonacci44497 ][ bernoulli_distribution ] = _random_.variate_generator_lagged_fibonacci44497__bernoulli_distribution -__vg[ lagged_fibonacci44497 ][ binomial_distribution ] = _random_.variate_generator_lagged_fibonacci44497__binomial_distribution -__vg[ lagged_fibonacci44497 ][ cauchy_distribution ] = _random_.variate_generator_lagged_fibonacci44497__cauchy_distribution -__vg[ lagged_fibonacci44497 ][ exponential_distribution ] = _random_.variate_generator_lagged_fibonacci44497__exponential_distribution -__vg[ lagged_fibonacci44497 ][ gamma_distribution ] = _random_.variate_generator_lagged_fibonacci44497__gamma_distribution -__vg[ lagged_fibonacci44497 ][ geometric_distribution ] = _random_.variate_generator_lagged_fibonacci44497__geometric_distribution -__vg[ lagged_fibonacci44497 ][ lognormal_distribution ] = _random_.variate_generator_lagged_fibonacci44497__lognormal_distribution -__vg[ lagged_fibonacci44497 ][ normal_distribution ] = _random_.variate_generator_lagged_fibonacci44497__normal_distribution -__vg[ lagged_fibonacci44497 ][ poisson_distribution ] = _random_.variate_generator_lagged_fibonacci44497__poisson_distribution -__vg[ lagged_fibonacci44497 ][ triangle_distribution ] = _random_.variate_generator_lagged_fibonacci44497__triangle_distribution -__vg[ lagged_fibonacci44497 ][ uniform_on_sphere ] = _random_.variate_generator_lagged_fibonacci44497__uniform_on_sphere -__vg[ lagged_fibonacci44497 ][ uniform_real ] = _random_.variate_generator_lagged_fibonacci44497__uniform_real -#__vg[ ][ uniform_int ] = _random_.does not exist -#__vg[ ][ uniform_smallint ] = _random_.does not exist - __vg[ lagged_fibonacci607 ][ bernoulli_distribution ] = _random_.variate_generator_lagged_fibonacci607__bernoulli_distribution __vg[ lagged_fibonacci607 ][ binomial_distribution ] = _random_.variate_generator_lagged_fibonacci607__binomial_distribution __vg[ lagged_fibonacci607 ][ cauchy_distribution ] = _random_.variate_generator_lagged_fibonacci607__cauchy_distribution Modified: pyplusplus_dev/examples/pyboost_dev/pyboost/crc/__init__.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/crc/__init__.py 2006-05-18 07:40:05 UTC (rev 136) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/crc/__init__.py 2006-05-18 10:45:18 UTC (rev 137) @@ -30,7 +30,10 @@ __basic__ = basic.values() -__all__ = __optimal__ + __basic__ +__all__ = __optimal__ + __basic__ + +for cls in __all__: + cls.__call__ = cls.process_byte def process_bytes( self, data ): if isinstance( data, str ): Modified: pyplusplus_dev/examples/pyboost_dev/sconstruct =================================================================== --- pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-18 07:40:05 UTC (rev 136) +++ pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-18 10:45:18 UTC (rev 137) @@ -13,7 +13,8 @@ , LIBPATH=[ environment.boost.libs, environment.python.libs ] , CPPPATH=[ environment.boost.include, environment.python.include ] , SHLIBPREFIX='' - , SHLIBSUFFIX=environment.scons.suffix + , SHLIBSUFFIX=environment.scons.suffix + , no_import_lib=1 ) Export( 'env' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 07:40:29
|
Revision: 136 Author: roman_yakovenko Date: 2006-05-18 00:40:05 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=136&view=rev Log Message: ----------- preparing to next release: version updated history updated Modified Paths: -------------- pygccxml_dev/docs/history/history.rest pygccxml_dev/setup.py pyplusplus_dev/docs/history/history.rest pyplusplus_dev/setup.py Modified: pygccxml_dev/docs/history/history.rest =================================================================== --- pygccxml_dev/docs/history/history.rest 2006-05-18 06:38:14 UTC (rev 135) +++ pygccxml_dev/docs/history/history.rest 2006-05-18 07:40:05 UTC (rev 136) @@ -15,6 +15,33 @@ * John Pallister <jo...@sy...> * Matthias Baas * Allen Bierbaum + +----------- +Version 0.8 +----------- + +1. `pygccxml`_ now has power "select" interface. Read more about this cool feature + in tutorials. + +2. Improved support for template instantiations. `pygccxml`_ now take into + account demangled name of declarations. Please refer to documentation for + more explanantion. + +3. ``dummy_type_t`` - new type in types hierarchy. This is a very useful class + for code generation projects. + +4. New function - ``get_global_namespace``. As you can guess, it will find and + return reference to global namespace. + +5. New functionality in ``type_traits`` - ``has_public_assign``. This function + will return True, if class has public assign operator. + +6. ``declarations.class_t`` has new property - ``aliases``. This is a list of + all class aliases. + +7. Bug fixes. + +8. Documentation. ------------- Version 0.7.1 Modified: pygccxml_dev/setup.py =================================================================== --- pygccxml_dev/setup.py 2006-05-18 06:38:14 UTC (rev 135) +++ pygccxml_dev/setup.py 2006-05-18 07:40:05 UTC (rev 136) @@ -51,7 +51,7 @@ setup( name = "pygccxml", - version = "0.7.2", + version = "0.8.0", description = "GCC-XML generated file reader", author = "Roman Yakovenko", author_email = "rom...@gm...", Modified: pyplusplus_dev/docs/history/history.rest =================================================================== --- pyplusplus_dev/docs/history/history.rest 2006-05-18 06:38:14 UTC (rev 135) +++ pyplusplus_dev/docs/history/history.rest 2006-05-18 07:40:05 UTC (rev 136) @@ -4,6 +4,27 @@ .. contents:: Table of contents +------------- +Version 0.8.0 +------------- + +1. `pyplusplus`_ "user guide" functionality has been improved. Now `pyplusplus`_ + can answer few questions: + + * why this declaration could not be exported + + * why this function could not be overriden from Python + +2. `pyplusplus`_ can suggest an alias for exported classes. + +3. Small redesign has been done - now it is much easier to understand and + maintain code creators, that creates code for C++ functions. + +4. Exception specification is taken into account, when `pyplusplus`_ exports + member functions. + +5. Member variables, that are pointers exported correctly. + ------------- Version 0.7.0 ------------- Modified: pyplusplus_dev/setup.py =================================================================== --- pyplusplus_dev/setup.py 2006-05-18 06:38:14 UTC (rev 135) +++ pyplusplus_dev/setup.py 2006-05-18 07:40:05 UTC (rev 136) @@ -85,7 +85,7 @@ setup( name = "pyplusplus", - version = "0.7.1", + version = "0.8.0", description="pyplusplus is a framework of components for creating C++ code generator for boost.python library", author="Roman Yakovenko", author_email="rom...@gm...", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 06:38:22
|
Revision: 135 Author: roman_yakovenko Date: 2006-05-17 23:38:14 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=135&view=rev Log Message: ----------- syntactic sugar patch Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/scopedef.py Modified: pygccxml_dev/pygccxml/declarations/scopedef.py =================================================================== --- pygccxml_dev/pygccxml/declarations/scopedef.py 2006-05-18 06:24:17 UTC (rev 134) +++ pygccxml_dev/pygccxml/declarations/scopedef.py 2006-05-18 06:38:14 UTC (rev 135) @@ -543,4 +543,18 @@ , header_dir=header_dir , header_file=header_file , recursive=recursive - , allow_empty=allow_empty) \ No newline at end of file + , allow_empty=allow_empty) + + def __getitem__(self, name_or_function): + """ Allow simple name based find of decls. Internally just calls decls() method. + @param name_or_function Name of decl to lookup or finder function. + """ + return self.decls(name_or_function) + + + + + + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 06:24:31
|
Revision: 134 Author: roman_yakovenko Date: 2006-05-17 23:24:17 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=134&view=rev Log Message: ----------- porting recent changes to windows Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/date_time/customization_data.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py pyplusplus_dev/pyplusplus/code_creators/module.py Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/customization_data.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/customization_data.py 2006-05-18 05:18:19 UTC (rev 133) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/customization_data.py 2006-05-18 06:24:17 UTC (rev 134) @@ -199,7 +199,7 @@ } if sys.platform == 'win32': - name2alias[ "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, long> >" ] \ + name2alias[ "time_duration<boost::posix_time::time_duration, boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, (boost::date_time::time_resolutions)5, (long long)1000000, 6, long> >" ] \ = "time_duration_impl" else: name2alias[ "time_duration<boost::posix_time::time_duration, boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, (boost::date_time::time_resolutions)5, (long long)1000000, 6, int> >" ] \ Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 05:18:19 UTC (rev 133) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/generate_code.py 2006-05-18 06:24:17 UTC (rev 134) @@ -42,12 +42,13 @@ , undefine_symbols=date_time_settings.undefined_symbols , optimize_queries=False) if sys.platform == 'win32': - linux_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, int> >" - win_name = "time_duration<boost::posix_time::time_duration,boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, micro, 1000000, 6, long int> >" + linux_name = "time_duration<boost::posix_time::time_duration, boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, (boost::date_time::time_resolutions)5, (long long)1000000, 6, int> >" + win_name = "time_duration<boost::posix_time::time_duration, boost::date_time::time_resolution_traits<boost::date_time::time_resolution_traits_adapted64_impl, (boost::date_time::time_resolutions)5, (long long)1000000, 6, long> >" time_duration_impl = mb.class_( linux_name ) #small price for generating code from xml and not from sources time_duration_impl.name = win_name - + time_duration_impl.demangled = None + for f_decl in mb.free_functions(): f_decl.alias = f_decl.name f_decl.name = f_decl.demangled_name @@ -151,7 +152,6 @@ extmodule.user_defined_directories.append( date_time_settings.generated_files_dir ) extmodule.license = customization_data.license extmodule.precompiled_header = 'boost/python.hpp' - mb.code_creator.replace_included_headers( customization_data.includes ) self.beautify_code( mb ) def write_files( self, mb ): Modified: pyplusplus_dev/pyplusplus/code_creators/module.py =================================================================== --- pyplusplus_dev/pyplusplus/code_creators/module.py 2006-05-18 05:18:19 UTC (rev 133) +++ pyplusplus_dev/pyplusplus/code_creators/module.py 2006-05-18 06:24:17 UTC (rev 134) @@ -94,7 +94,7 @@ if isinstance( self.creators[i], include.include_t ): return i else: - raise RuntimeError( "include_t creator has not been found." ) + return 0 def first_include_index(self): """Return the children index of the first L{include_t} object. @@ -119,11 +119,12 @@ elif isinstance( creator, module_body.module_body_t ): break + boost_python_header = include_directories.include_directories_t.normalize( 'boost/python.hpp' ) boost_python_treated = False for creator in to_be_removed: if not boost_python_treated: boost_python_treated = True - if 'boost/python.hpp' in creator.header: + if boost_python_header in creator.header: if not leave_boost_python_header: self.remove_creator( creator ) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-18 05:18:33
|
Revision: 133 Author: roman_yakovenko Date: 2006-05-17 22:18:19 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=133&view=rev Log Message: ----------- updating gccxml location Modified Paths: -------------- pygccxml_dev/unittests/autoconfig.py pyplusplus_dev/environment.py Property Changed: ---------------- pyplusplus_dev/unittests/temp/ Modified: pygccxml_dev/unittests/autoconfig.py =================================================================== --- pygccxml_dev/unittests/autoconfig.py 2006-05-17 20:43:03 UTC (rev 132) +++ pygccxml_dev/unittests/autoconfig.py 2006-05-18 05:18:19 UTC (rev 133) @@ -16,7 +16,7 @@ if 'roman' in getpass.getuser(): if sys.platform == 'win32': - gccxml_path = 'c:/tools/gccxml/bin/gccxml.exe' + gccxml_path = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' else: gccxml_path = '/home/roman/gccxml-build/bin/gccxml' Modified: pyplusplus_dev/environment.py =================================================================== --- pyplusplus_dev/environment.py 2006-05-17 20:43:03 UTC (rev 132) +++ pyplusplus_dev/environment.py 2006-05-18 05:18:19 UTC (rev 133) @@ -31,7 +31,7 @@ boost.include = 'd:/boost_cvs' python.libs = 'c:/python/libs' python.include = 'c:/python/include' - gccxml.executable = 'c:/tools/gccxml/bin/gccxml.exe' + gccxml.executable = 'd:/gccxml_cvs/gccxml-build/bin/release/gccxml.exe' else: scons.suffix = '.so' boost.libs = '/home/roman/boost_cvs/bin' Property changes on: pyplusplus_dev/unittests/temp ___________________________________________________________________ Name: svn:ignore - internal_classes.dll member_functions.dll member_variables.dll module_body.dll namespaces.dll noncopyable.dll operators.dll operators_bug.dll optional.dll optional_bug.dll pointer_as_arg.dll pointer_to_function_as_argument.dll private_assign.dll recursive.dll regression1.dll regression2.dll regression3.dll smart_pointers.dll special_operators.dll statics.dll temprorary_variable.dll unnamed_enums.dll user_text.dll abstract.cpp~ call_policies.cpp~ casting.cpp~ class_order2.cpp~ class_order3.cpp~ class_order4.cpp~ class_order.cpp~ classes.cpp~ enums.cpp~ factory.cpp~ finalizables.cpp~ free_functions.cpp~ free_operators.cpp~ global_variables.cpp~ index_operator.cpp~ internal_classes.cpp~ member_functions.cpp~ member_variables.cpp~ noncopyable.cpp~ operators_bug.cpp~ optional.cpp~ optional_bug.cpp~ pointer_as_arg.cpp~ pointer_to_function_as_argument.cpp~ private_assign.cpp~ recursive.cpp~ regression1.cpp~ regression2.cpp~ regression3.cpp~ smart_pointers.cpp~ special_operators.cpp~ statics.cpp~ temprorary_variable.cpp~ unnamed_enums.cpp~ user_text.cpp~ abstract.exp call_policies.exp casting.exp class_order2.exp class_order3.exp class_order4.exp class_order.exp classes.exp enums.exp factory.exp finalizables.exp free_function_ignore_bug.exp free_functions.exp free_operators.exp global_variables.exp index_operator.exp internal_classes.exp member_functions.exp member_variables.exp module_body.exp namespaces.exp noncopyable.exp operators.exp operators_bug.exp optional.exp optional_bug.exp pointer_as_arg.exp pointer_to_function_as_argument.exp private_assign.exp recursive.exp regression1.exp regression2.exp regression3.exp smart_pointers.exp special_operators.exp statics.exp temprorary_variable.exp unnamed_enums.exp user_text.exp abstract.lib call_policies.lib casting.lib class_order2.lib class_order3.lib class_order4.lib class_order.lib classes.lib enums.lib factory.lib finalizables.lib free_function_ignore_bug.lib free_functions.lib free_operators.lib global_variables.lib index_operator.lib internal_classes.lib member_functions.lib member_variables.lib module_body.lib namespaces.lib noncopyable.lib operators.lib operators_bug.lib optional.lib optional_bug.lib pointer_as_arg.lib pointer_to_function_as_argument.lib private_assign.lib recursive.lib regression1.lib regression2.lib regression3.lib smart_pointers.lib special_operators.lib statics.lib temprorary_variable.lib unnamed_enums.lib user_text.lib abstract.obj call_policies.obj casting.obj class_order2.obj class_order3.obj class_order4.obj class_order.obj classes.obj enums.obj factory.obj finalizables.obj free_function_ignore_bug.obj free_functions.obj free_operators.obj global_variables.obj index_operator.obj internal_classes.obj member_functions.obj member_variables.obj module_body.obj namespaces.obj noncopyable.obj operators.obj operators_bug.obj optional.obj optional_bug.obj pointer_as_arg.obj pointer_to_function_as_argument.obj private_assign.obj recursive.obj regression1.obj regression2.obj regression3.obj smart_pointers.obj special_operators.obj statics.obj temprorary_variable.obj unnamed_enums.obj user_text.obj abstract.scons call_policies.scons casting.scons class_order2.scons class_order3.scons class_order4.scons class_order.scons classes.scons enums.scons factory.scons finalizables.scons free_function_ignore_bug.scons free_functions.scons free_operators.scons global_variables.scons index_operator.scons internal_classes.scons member_functions.scons member_variables.scons module_body.scons namespaces.scons noncopyable.scons operators.scons operators_bug.scons optional.scons optional_bug.scons pointer_as_arg.scons pointer_to_function_as_argument.scons private_assign.scons recursive.scons regression1.scons regression2.scons regression3.scons smart_pointers.scons special_operators.scons statics.scons temprorary_variable.scons unnamed_enums.scons user_text.scons abstract.dll call_policies.dll casting.dll class_order2.dll class_order3.dll class_order4.dll class_order.dll classes.dll enums.dll factory.dll finalizables.dll free_function_ignore_bug.dll free_functions.dll free_operators.dll global_variables.dll index_operator.dll .sconsign.dblite __array_1.pypp.hpp classes.cpp enums.cpp free_functions.cpp module_body.cpp namespaces.cpp unnamed_enums.cpp abstract.cpp call_policies.cpp casting.cpp class_order.cpp class_order2.cpp class_order3.cpp class_order4.cpp factory.cpp finalizables.cpp free_function_ignore_bug.cpp free_operators.cpp global_variables.cpp index_operator.cpp internal_classes.cpp member_functions.cpp member_variables.cpp noncopyable.cpp operators.cpp operators_bug.cpp optional.cpp optional_bug.cpp pointer_as_arg.cpp pointer_to_function_as_argument.cpp private_assign.cpp protected.cpp recursive.cpp regression1.cpp regression2.cpp regression3.cpp smart_pointers.cpp special_operators.cpp statics.cpp temprorary_variable.cpp user_text.cpp + internal_classes.dll member_functions.dll member_variables.dll module_body.dll namespaces.dll noncopyable.dll operators.dll operators_bug.dll optional.dll optional_bug.dll pointer_as_arg.dll pointer_to_function_as_argument.dll private_assign.dll recursive.dll regression1.dll regression2.dll regression3.dll smart_pointers.dll special_operators.dll statics.dll temprorary_variable.dll unnamed_enums.dll user_text.dll abstract.cpp~ call_policies.cpp~ casting.cpp~ class_order2.cpp~ class_order3.cpp~ class_order4.cpp~ class_order.cpp~ classes.cpp~ enums.cpp~ factory.cpp~ finalizables.cpp~ free_functions.cpp~ free_operators.cpp~ global_variables.cpp~ index_operator.cpp~ internal_classes.cpp~ member_functions.cpp~ member_variables.cpp~ noncopyable.cpp~ operators_bug.cpp~ optional.cpp~ optional_bug.cpp~ pointer_as_arg.cpp~ pointer_to_function_as_argument.cpp~ private_assign.cpp~ recursive.cpp~ regression1.cpp~ regression2.cpp~ regression3.cpp~ smart_pointers.cpp~ special_operators.cpp~ statics.cpp~ temprorary_variable.cpp~ unnamed_enums.cpp~ user_text.cpp~ abstract.exp call_policies.exp casting.exp class_order2.exp class_order3.exp class_order4.exp class_order.exp classes.exp enums.exp factory.exp finalizables.exp free_function_ignore_bug.exp free_functions.exp free_operators.exp global_variables.exp index_operator.exp internal_classes.exp member_functions.exp member_variables.exp module_body.exp namespaces.exp noncopyable.exp operators.exp operators_bug.exp optional.exp optional_bug.exp pointer_as_arg.exp pointer_to_function_as_argument.exp private_assign.exp recursive.exp regression1.exp regression2.exp regression3.exp smart_pointers.exp special_operators.exp statics.exp temprorary_variable.exp unnamed_enums.exp user_text.exp abstract.lib call_policies.lib casting.lib class_order2.lib class_order3.lib class_order4.lib class_order.lib classes.lib enums.lib factory.lib finalizables.lib free_function_ignore_bug.lib free_functions.lib free_operators.lib global_variables.lib index_operator.lib internal_classes.lib member_functions.lib member_variables.lib module_body.lib namespaces.lib noncopyable.lib operators.lib operators_bug.lib optional.lib optional_bug.lib pointer_as_arg.lib pointer_to_function_as_argument.lib private_assign.lib recursive.lib regression1.lib regression2.lib regression3.lib smart_pointers.lib special_operators.lib statics.lib temprorary_variable.lib unnamed_enums.lib user_text.lib abstract.obj call_policies.obj casting.obj class_order2.obj class_order3.obj class_order4.obj class_order.obj classes.obj enums.obj factory.obj finalizables.obj free_function_ignore_bug.obj free_functions.obj free_operators.obj global_variables.obj index_operator.obj internal_classes.obj member_functions.obj member_variables.obj module_body.obj namespaces.obj noncopyable.obj operators.obj operators_bug.obj optional.obj optional_bug.obj pointer_as_arg.obj pointer_to_function_as_argument.obj private_assign.obj recursive.obj regression1.obj regression2.obj regression3.obj smart_pointers.obj special_operators.obj statics.obj temprorary_variable.obj unnamed_enums.obj user_text.obj abstract.scons call_policies.scons casting.scons class_order2.scons class_order3.scons class_order4.scons class_order.scons classes.scons enums.scons factory.scons finalizables.scons free_function_ignore_bug.scons free_functions.scons free_operators.scons global_variables.scons index_operator.scons internal_classes.scons member_functions.scons member_variables.scons module_body.scons namespaces.scons noncopyable.scons operators.scons operators_bug.scons optional.scons optional_bug.scons pointer_as_arg.scons pointer_to_function_as_argument.scons private_assign.scons recursive.scons regression1.scons regression2.scons regression3.scons smart_pointers.scons special_operators.scons statics.scons temprorary_variable.scons unnamed_enums.scons user_text.scons abstract.dll call_policies.dll casting.dll class_order2.dll class_order3.dll class_order4.dll class_order.dll classes.dll enums.dll factory.dll finalizables.dll free_function_ignore_bug.dll free_functions.dll free_operators.dll global_variables.dll index_operator.dll .sconsign.dblite __array_1.pypp.hpp classes.cpp enums.cpp free_functions.cpp module_body.cpp namespaces.cpp unnamed_enums.cpp abstract.cpp call_policies.cpp casting.cpp class_order.cpp class_order2.cpp class_order3.cpp class_order4.cpp factory.cpp finalizables.cpp free_function_ignore_bug.cpp free_operators.cpp global_variables.cpp index_operator.cpp internal_classes.cpp member_functions.cpp member_variables.cpp noncopyable.cpp operators.cpp operators_bug.cpp optional.cpp optional_bug.cpp pointer_as_arg.cpp pointer_to_function_as_argument.cpp private_assign.cpp protected.cpp recursive.cpp regression1.cpp regression2.cpp regression3.cpp smart_pointers.cpp special_operators.cpp statics.cpp temprorary_variable.cpp user_text.cpp protected.dll protected.exp protected.lib protected.obj protected.scons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 20:43:13
|
Revision: 132 Author: roman_yakovenko Date: 2006-05-17 13:43:03 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=132&view=rev Log Message: ----------- Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/unittestst/test_all.py Added: pyplusplus_dev/examples/pyboost_dev/unittestst/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/test_all.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/test_all.py 2006-05-17 20:43:03 UTC (rev 132) @@ -0,0 +1,31 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import sys + +sys.path.append( '..' ) + +def run_it( dir_name ): + pwd = os.getcwd() + os.chdir( dir_name ) + command_line = sys.executable + ' ' + 'test_all.py' + input_, output = os.popen4( command_line ) + input_.close() + while True: + data = output.readline() + print data, + if not data: + break + exit_status = output.close() + if exit_status: + print 'Error! %s did not passed the tests.' % dir_name + os.chdir( pwd ) + +run_it( 'crc' ) +run_it( 'rational' ) +run_it( 'date_time' ) +run_it( 'boost_random' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 20:42:49
|
Revision: 131 Author: roman_yakovenko Date: 2006-05-17 13:42:32 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=131&view=rev Log Message: ----------- updating scripts to new directory location Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py 2006-05-17 20:42:32 UTC (rev 131) @@ -7,7 +7,7 @@ import sys sys.path.append( '../..' ) -import boost_random +from pyboost import boost_random import unittest class tester_t( unittest.TestCase ): Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py 2006-05-17 20:42:32 UTC (rev 131) @@ -7,7 +7,7 @@ import sys sys.path.append( '../..' ) -import crc +from pyboost import crc import random import unittest Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py 2006-05-17 20:42:32 UTC (rev 131) @@ -4,11 +4,14 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -import date_time -from date_time import gregorian -from date_time import posix_time -from date_time import to_iso_string -from date_time import to_simple_string +import sys +sys.path.append( '../..' ) + +from pyboost import date_time +from pyboost.date_time import gregorian +from pyboost.date_time import posix_time +from pyboost.date_time import to_iso_string +from pyboost.date_time import to_simple_string import unittest class tester_t( unittest.TestCase ): Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py 2006-05-17 20:42:32 UTC (rev 131) @@ -5,12 +5,15 @@ # http://www.boost.org/LICENSE_1_0.txt) import os -import date_time -from date_time import gregorian -from date_time import posix_time -from date_time import local_time -from date_time import to_iso_string -from date_time import to_simple_string +import sys +sys.path.append( '../..' ) + +from pyboost import date_time +from pyboost.date_time import gregorian +from pyboost.date_time import posix_time +from pyboost.date_time import local_time +from pyboost.date_time import to_iso_string +from pyboost.date_time import to_simple_string import unittest class tester_t( unittest.TestCase ): Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py 2006-05-17 20:42:32 UTC (rev 131) @@ -5,11 +5,14 @@ # http://www.boost.org/LICENSE_1_0.txt) import time -import date_time -from date_time import gregorian -from date_time import posix_time -from date_time import to_iso_string -from date_time import to_simple_string +import sys +sys.path.append( '../..' ) + +from pyboost import date_time +from pyboost.date_time import gregorian +from pyboost.date_time import posix_time +from pyboost.date_time import to_iso_string +from pyboost.date_time import to_simple_string import unittest class tester_t( unittest.TestCase ): Modified: pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py 2006-05-17 20:42:01 UTC (rev 130) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py 2006-05-17 20:42:32 UTC (rev 131) @@ -6,7 +6,7 @@ import sys sys.path.append( '../..' ) -import rational +from pyboost import rational import unittest class tester_t( unittest.TestCase ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 20:42:11
|
Revision: 130 Author: roman_yakovenko Date: 2006-05-17 13:42:01 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=130&view=rev Log Message: ----------- updating scripts to new directory location Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/sconstruct Modified: pyplusplus_dev/examples/pyboost_dev/sconstruct =================================================================== --- pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-17 20:41:26 UTC (rev 129) +++ pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-17 20:42:01 UTC (rev 130) @@ -17,7 +17,7 @@ ) Export( 'env' ) -env.SConscript( ['pyboost/date_time/sconscript'] ) -env.SConscript( ['pyboost/crc/sconscript'] ) -env.SConscript( ['pyboost/boost_random/sconscript'] ) -env.SConscript( ['pyboost/rational/sconscript'] ) \ No newline at end of file +env.SConscript( ['dev/date_time/sconscript'] ) +env.SConscript( ['dev/crc/sconscript'] ) +env.SConscript( ['dev/boost_random/sconscript'] ) +env.SConscript( ['dev/rational/sconscript'] ) \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 20:41:32
|
Revision: 129 Author: roman_yakovenko Date: 2006-05-17 13:41:26 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=129&view=rev Log Message: ----------- making pyboost to be a package Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/pyboost/__init__.py Added: pyplusplus_dev/examples/pyboost_dev/pyboost/__init__.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/__init__.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/__init__.py 2006-05-17 20:41:26 UTC (rev 129) @@ -0,0 +1,10 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import crc +import rational +import date_time +import boost_random This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 20:39:59
|
Revision: 128 Author: roman_yakovenko Date: 2006-05-17 13:39:36 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=128&view=rev Log Message: ----------- updating scripts to new directory location Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/dev/boost_random/random_settings.py pyplusplus_dev/examples/pyboost_dev/dev/boost_random/sconscript pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_settings.py pyplusplus_dev/examples/pyboost_dev/dev/crc/sconscript pyplusplus_dev/examples/pyboost_dev/dev/date_time/date_time_settings.py pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_settings.py pyplusplus_dev/examples/pyboost_dev/dev/rational/sconscript Modified: pyplusplus_dev/examples/pyboost_dev/dev/boost_random/random_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/boost_random/random_settings.py 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/boost_random/random_settings.py 2006-05-17 20:39:36 UTC (rev 128) @@ -16,7 +16,7 @@ module_name = '_random_' working_dir = _script_dir generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'boost_random' ) +generated_files_dir = os.path.join( _script_dir, '..', '..', 'pyboost', 'boost_random', 'generated' ) defined_symbols = [ 'BOOST_NO_INCLASS_MEMBER_INITIALIZATION', 'BOOST_NO_INT64_T' ] undefined_symbols = [ '__MINGW32__' ] Modified: pyplusplus_dev/examples/pyboost_dev/dev/boost_random/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/boost_random/sconscript 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/boost_random/sconscript 2006-05-17 20:39:36 UTC (rev 128) @@ -32,4 +32,4 @@ _random_ = local_env.SharedLibrary( target=random_settings.module_name , source=get_source_files() ) -local_env.Install( '#unittests/boost_random', _random_ ) +local_env.Install( '#pyboost/boost_random', _random_ ) Modified: pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_settings.py 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/crc/crc_settings.py 2006-05-17 20:39:36 UTC (rev 128) @@ -15,8 +15,7 @@ module_name = '_crc_' working_dir = _script_dir -generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'crc' ) +generated_files_dir = os.path.join( _script_dir, '..', '..', 'pyboost', 'crc', 'generated' ) defined_symbols = ['BOOST_NO_INCLASS_MEMBER_INITIALIZATION'] undefined_symbols = [ '__MINGW32__' ] Modified: pyplusplus_dev/examples/pyboost_dev/dev/crc/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/crc/sconscript 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/crc/sconscript 2006-05-17 20:39:36 UTC (rev 128) @@ -32,4 +32,4 @@ _crc_ = local_env.SharedLibrary( target=crc_settings.module_name , source=get_source_files() ) -local_env.Install( '#unittests/crc', _crc_ ) +local_env.Install( '#pyboost/crc', _crc_ ) Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/date_time_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/date_time_settings.py 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/date_time_settings.py 2006-05-17 20:39:36 UTC (rev 128) @@ -16,7 +16,7 @@ module_name = '_date_time_' working_dir = _script_dir generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.realpath( os.path.join( _script_dir, '..', '..', 'unittests', 'date_time' ) ) +generated_files_dir = os.path.join( _script_dir, '..', '..', 'pyboost', 'date_time', 'generated' ) date_time_pypp_include = os.path.join( _script_dir, 'include' ) Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.xml 2006-05-17 20:39:36 UTC (rev 128) @@ -2,8 +2,8 @@ <GCC_XML cvs_revision="1.112"> <Namespace id="_1" name="::" members="_3 _4 _5 _6 _7 _8 _9 _10 _11 _12 _13 _14 _15 _16 _17 _18 _19 _20 _21 _22 _23 _24 _25 _26 _27 _28 _29 _30 _31 _32 _33 _34 _35 _36 _37 _38 _39 _40 _41 _42 _43 _44 _45 _46 _47 _48 _49 _50 _51 _52 _53 _54 _55 _56 _57 _58 _59 _60 _61 _62 _63 _64 _65 _66 _67 _68 _69 _70 _71 _72 _73 _74 _75 _76 _77 _78 _79 _80 _81 _82 _83 _84 _85 _86 _87 _88 _89 _90 _91 _92 _93 _94 _95 _96 _97 _98 _99 _100 _101 _102 _103 _104 _105 _106 _107 _108 _109 _110 _111 _112 _113 _114 _115 _116 _117 _118 _119 _120 _121 _122 _123 _124 _125 _126 _127 _128 _129 _130 _131 _132 _133 _134 _135 _136 _137 _138 _139 _140 _141 _142 _143 _144 _145 _146 _147 _148 _149 _150 _151 _152 _153 _154 _155 _156 _157 _158 _159 _160 _161 _162 _163 _164 _165 _166 _167 _168 _169 _170 _171 _172 _173 _174 _175 _176 _177 _178 _179 _180 _181 _182 _183 _184 _185 _186 _187 _188 _189 _190 _191 _192 _193 _194 _195 _196 _197 _198 _199 _200 _201 _202 _203 _204 _205 _206 _207 _208 _209 _210 _211 _212 _213 _214 _215 _216 _217 _218 _219 _220 _221 _222 _223 _224 _225 _226 _227 _228 _229 _230 _231 _232 _233 _234 _235 _236 _237 _238 _239 _240 _241 _242 _243 _244 _245 _246 _247 _248 _249 _250 _251 _252 _253 _254 _255 _256 _257 _258 _259 _260 _261 _262 _263 _264 _265 _266 _267 _268 _269 _270 _271 _272 _273 _274 _275 _276 _277 _278 _279 _280 _281 _282 _283 _284 _285 _286 _287 _288 _289 _290 _291 _292 _293 _294 _295 _296 _297 _298 _299 _300 _301 _302 _303 _304 _305 _306 _307 _308 _309 _310 _311 _312 _313 _314 _315 _316 _317 _318 _319 _320 _321 _322 _323 _324 _325 _326 _327 _328 _329 _330 _331 _332 _333 _334 _335 _336 _337 _338 _339 _340 _341 _342 _343 _344 _345 _346 _347 _348 _349 _350 _351 _352 _353 _354 _355 _356 _357 _358 _359 _360 _361 _362 _363 _364 _365 _366 _367 _368 _369 _370 _371 _372 _373 _374 _375 _376 _377 _378 _379 _380 _381 _382 _383 _384 _385 _386 _387 _388 _389 _390 _391 _392 _393 _394 _395 _396 _397 _398 _399 _400 _401 _402 _403 _404 _405 _406 _407 _408 _409 _410 _411 _412 _413 _414 _415 _416 _417 _418 _419 _420 _421 _422 _423 _424 _425 _426 _427 _428 _429 _430 _431 _432 _433 _434 _435 _436 _437 _438 _439 _440 _441 _442 _443 _444 _445 _446 _447 _448 _449 _450 _451 _452 _453 _454 _455 _456 _457 _458 _459 _460 _461 _462 _463 _464 _465 _466 _467 _468 _469 _470 _471 _472 _473 _474 _475 _476 _477 _478 _479 _480 _482 _483 _484 _485 _486 _487 _488 _489 _490 _491 _492 _493 _494 _495 _496 _497 _498 _499 _501 _502 _503 _504 _505 _506 _508 _509 _510 _511 _512 _513 _514 _515 _516 _517 _518 _519 _520 _521 _522 _523 _524 _525 _526 _527 _528 _529 _530 _531 _532 _533 _534 _535 _536 _537 _538 _539 _540 _541 _542 _543 _544 _545 _546 _547 _548 _549 _550 _551 _552 _553 _554 _555 _556 _557 _558 _559 _560 _561 _562 _563 _564 _565 _566 _567 _568 _569 _570 _571 _572 _573 _574 _575 _576 _577 _578 _579 _580 _581 _582 _583 _584 _585 _586 _587 _588 _589 _590 _591 _592 _593 _594 _595 _596 _597 _598 _599 _600 _601 _602 _603 _604 _605 _606 _607 _608 _609 _610 _611 _612 _613 _614 _615 _616 _617 _618 _619 _621 _622 _623 _624 _625 _626 _627 _628 _629 _630 _631 _632 _633 _634 _635 _636 _638 _639 _640 _641 _642 _643 _644 _645 _646 _647 _648 _649 _650 _651 _652 _653 _654 _655 _656 _657 _658 _659 _660 _661 _662 _663 _664 _665 _666 _667 _668 _669 _670 _671 _672 _673 _674 _675 _676 _677 _678 _679 _680 _681 _682 _683 _684 _685 _686 _687 _688 _689 _690 _691 _692 _693 _694 _695 _696 _697 _698 _699 _700 _701 _702 _703 _704 _705 _706 _707 _708 _709 _710 _711 _712 _713 _714 _715 _716 _717 _718 _719 _720 _721 _722 _723 _724 _725 _726 _727 _728 _729 _730 _731 _732 _733 _734 _735 _736 _737 _738 _739 _740 _741 _742 _743 _744 _745 _746 _747 _748 _749 _750 _751 _752 _753 _754 _755 _756 _757 _758 _759 _760 _761 _762 _763 _764 _766 _767 _768 _769 _770 _771 _772 _773 _774 _775 _776 _777 _778 _779 _780 _781 _782 _783 _784 _785 _786 _787 _788 _789 _790 _791 _792 _793 _794 _795 _796 _797 _798 _799 _800 _801 _802 _803 _804 _805 _806 _807 _808 _809 _810 _811 _812 _813 _814 _815 _816 _817 _819 _820 _821 _823 _824 _825 _826 _827 _828 _829 _830 _831 _832 _833 _834 _835 _836 _837 _838 _839 _840 _841 _842 _843 _844 _845 _846 _847 _848 _849 _850 _851 _852 _853 _854 _855 _856 _857 _858 _859 _860 _861 _862 _863 _864 _865 _866 _867 _868 _869 _870 _871 _872 _873 _874 _875 _876 _877 _878 _879 _880 _881 _882 _883 _884 _885 _886 _887 _888 _889 _890 _891 _892 _893 _894 _895 _896 _897 _898 _899 _900 _901 _902 _903 _904 _905 _906 _907 _908 _909 _910 _911 _912 _913 _914 _915 _916 _917 _918 _919 _920 _921 _922 _923 _924 _925 _926 _927 _928 _929 _930 _931 _932 _933 _934 _935 _936 _937 _938 _939 _940 _941 _942 _943 _944 _945 _946 _947 _948 _949 _950 _951 _952 _953 _954 _955 _956 _957 _958 _959 _960 _961 _962 _963 _964 _965 _966 _967 _968 _969 _970 _971 _972 _973 _974 _975 _976 _977 _978 _979 _980 _981 _982 _983 _984 _985 _986 _987 _988 _989 _990 _991 _992 _993 _994 _995 _996 _997 _998 _999 _1000 _1001 _1002 _1003 _1005 _1006 _1007 _1008 _1009 _1010 _1011 _1012 _1013 _1014 _1015 _1016 _1017 _1018 _1019 _1020 _1021 _1022 _1023 _1024 _1025 _1026 _1027 _1028 _1029 _1030 _1031 _1032 _1033 _1034 _1035 _1036 _1037 _1038 _1039 _1040 _1041 _1042 _1043 _1044 _1045 _1046 _1047 _1048 _1049 _1050 _1051 _1052 _1053 _1054 _1055 _1056 _1057 _1058 _1059 _1060 _1061 _1062 _1063 _1064 _1065 _1066 _1067 _1068 _1069 _1070 _1071 _1072 _1073 _1074 _1075 _1076 _1077 _1078 _1079 _1080 _1081 _1082 _1083 _1084 _1085 _1086 _1087 _1088 _1089 _1090 _1091 _1092 _1093 _1094 _1095 _1096 _1097 _1098 _1099 _1100 _1101 _1102 _1103 _1104 _1106 _1108 _1110 _1111 _1112 _1113 _1114 _1115 _1116 _1117 _1118 _1119 _1120 _1121 _1122 _1123 _1124 _1125 _1126 _1127 _1128 _1129 _1130 _1131 _1132 _1133 _1135 _1134 _1137 _1139 _1141 _1143 _1144 _1145 _1146 _1147 _1148 _1149 _1150 _1151 _1152 _1153 _1155 _1156 _1157 _1158 _1160 _1161 _1163 _1164 _1166 _1167 _1169 _1171 _1173 _1175 _1177 _1179 _1181 _1183 _1185 _1186 _1187 _1188 _1189 _1190 _1191 _1105 _1107 _765 _1192 _1194 _1195 _1193 _1196 _1197 _1198 _1199 _1200 _1201 _1202 _1203 _1204 _1205 _1206 _1207 _1208 _1209 _1210 _1211 _1212 _1213 _1214 _1215 _1216 _1217 _1218 _1219 _1220 _1221 _1222 _1223 _1224 _1225 _1226 _1227 _1228 _1229 _1230 _1231 _1232 _1233 _1234 _1235 _1236 _1237 _1238 _1239 _1241 _1242 _1243 _1244 _1245 _1247 _1249 _1250 _1251 _1252 _1253 _1255 _1256 _1257 _1258 _1260 _1261 _1262 _1263 _1264 _1265 _1266 _1267 _1268 _1269 _1270 _1271 _1272 _1273 _1274 _1275 _1276 _1277 _1278 _1279 _1280 _1281 _1282 _1283 _1284 _1285 _1286 _1287 _1288 _1289 _1290 _1291 _1292 _1293 _1294 _1295 _1296 _1297 _1298 _1299 _1300 _1301 _1302 _1303 _1304 _1305 _1306 _1307 _1308 _1309 _1310 _1311 _1312 _1313 _1314 _1315 _1316 _1317 _1318 _1319 _1320 _1321 _1322 _1323 _1324 _1325 _1326 _1327 _1328 _1329 _1330 _1331 _1332 _1333 _1334 _1335 _1336 _1337 _1338 _1339 _1340 _1341 _1342 _1343 _1344 _1345 _1346 _1347 _1348 _1349 _1350 _1351 _1352 _1353 _1354 _1355 _1356 _1357 _1358 _1359 _1360 _1361 _1362 _1363 _1364 _1365 _1366 _1367 _1368 _1369 _1370 _1371 _1372 _1373 _1374 _1375 _1376 _1377 _1378 _1379 _1380 _1381 _1382 _1383 _1384 _1385 _1386 _1387 _1388 _1389 _1390 _1391 _1392 _1393 _1394 _1395 _1396 _1397 _1398 _1399 _1400 _1401 _1402 _1403 _1404 _1405 _1406 _1407 _1408 _1409 _1410 _1411 _1412 _1413 _1414 _1415 _1416 _1417 _1418 _1419 _1420 _1421 _1422 _1423 _1424 _1425 _1426 _1427 _1428 _1430 _1431 _1432 _1433 _1434 _1435 _1436 _1437 _1438 _1439 _1440 _1441 _1442 _1443 _1444 _1445 _1446 _1447 _1448 _1449 _1450 _1451 _1452 _1453 _1454 _1455 _1456 _1457 _1458 _1459 _1460 _1461 _1462 _1463 _1464 _1465 _1466 _1467 _1468 _1469 _1470 _1471 _1472 _1473 _1474 _1475 _1476 _1477 _1478 _1479 _1480 _1481 _1482 _1483 _1484 _1485 _1486 _1487 _1488 _1489 _1491 _1490 _1492 _1493 _818 _1494 _1495 _1496 _1497 _1499 _1498 _1501 _1502 _1503 _1504 _1505 _1506 _1507 _1508 _1509 _1510 _1512 _1513 _1514 _1515 _1516 _1517 _1518 _1519 _1520 _1521 _1522 _1523 _1525 _1524 _1526 _1527 _1528 _1529 _1530 _1531 _1532 _1533 _1534 _1535 _1536 _1537 _1538 _1539 _1540 _1541 _1542 _1543 _1544 _1545 _1546 _1547 _1548 _1549 _1550 _1551 _1552 _1553 _1554 _1555 _1556 _1557 _1558 _1559 _1560 _1562 _1563 _1564 _1565 _1566 _1567 _1568 _1569 _1570 _1571 _1573 _1574 _1575 _1576 _1577 _1578 _1579 _1580 _1581 _1582 _1583 _1584 _1585 _1586 _1587 _1588 _1589 _1590 _1591 _1592 _1593 _1594 _1561 _1595 _1596 _1597 _1598 _1599 _1600 _1601 _1602 _1603 _1604 _1605 _1606 _1607 _1608 _1609 _1610 _1611 _1612 _1613 _1614 _1615 _1616 _1617 _1618 _1619 _1620 _1621 _1622 _1623 _1624 _1625 _1626 _1627 _1628 _1629 _1630 _1631 _1632 _1633 _1634 _1635 _1636 _1637 _1638 _1639 _1640 _1641 _1642 _1643 _1644 _1645 _1646 _1647 _1648 _1649 _1650 _1651 _1652 _1653 _1654 _1655 _1656 _1657 _1658 _1659 _1660 _1661 _1662 _1663 _1664 _1665 _1666 _1667 _1668 _1669 _1670 _1671 _1672 _1673 _1674 _1675 _1676 _1677 _1678 _1679 _1680 _1681 _1682 _1683 _1684 _1685 _1686 _1687 _1688 _1689 _1690 _1691 _1692 _1693 _1694 _1695 _1696 _1697 _1698 _1699 _1700 _1701 _1702 _1703 _1704 _1705 _1706 _1707 _1708 _1709 _1710 _1711 _1712 _1713 _1714 _1715 _1716 _1717 _1718 _1719 _1720 _1721 _1722 _1723 _1724 _1725 _1726 _1727 _1728 _1729 _1730 _1731 _1732 _1733 _1734 _1735 _1736 _1737 _1738 _1739 _1740 _1741 _1742 _1743 _1744 _1745 _1746 _1747 _1748 _1749 _1750 _1751 _1752 _1753 _1754 _1755 _1756 _1757 _1758 _1759 _1760 _1761 _1762 _1763 _1764 _1765 _1766 _1767 _1768 _1769 _1770 _1771 _1772 _1773 _1774 _1775 _1776 _1777 _1778 _1779 _1780 _1781 _1782 _1783 _1784 _1785 _1786 _1787 _1788 _1789 _1790 _1791 _1792 _1793 _1794 _1795 _1796 _1797 _1798 _1799 _1800 _1801 _1802 _1803 _1804 _1805 _1806 _1807 _1808 _1809 _1810 _1811 _1812 _1813 _1814 _1815 _1816 _1817 _1818 _1819 _1820 _1821 _1822 _1823 _1824 _1825 _1826 _1827 _1828 _1829 _1830 _1831 _1832 _1833 _1834 _1835 _1836 _1837 _1838 _1839 _1840 _1841 _1842 _1843 _1844 " mangled="_Z2::" demangled="::"/> <Namespace id="_2" name="std" context="_1" members="_1846 _1847 _1848 _1849 _1850 _1851 _1852 _1853 _1854 _1855 _1856 _1857 _1858 _1859 _1860 _1861 _1862 _1863 _1864 _1865 _1866 _1867 _1868 _1869 _1870 _1871 _1872 _1873 _1874 _1875 _1876 _1877 _1878 _1879 _1880 _1881 _1882 _1883 _1884 _1885 _1886 _1887 _1888 _1889 _1890 _1891 _1892 _1893 _1894 _1895 _1900 _1901 _1906 _1907 _1920 _1921 _1926 _1927 _1932 _1933 _1934 _1935 _1936 _1937 _1938 _1939 _1940 _1941 _1942 _1956 _1957 _1958 _1959 _1960 _1961 _1962 _1963 _1964 _1965 _1968 _1973 _1974 _1975 _1976 _1981 _1982 _1983 _1984 _1987 _1988 _1989 _1990 _1991 _1992 _1993 _1994 _1995 _1996 _1997 _2006 _2007 _2008 _2039 _2048 _2049 _2050 _2051 _2052 _2053 _2054 _2055 _2056 _2057 _2058 _2059 _2060 _2061 _2062 _2063 _2064 _2065 _2066 _2067 _2068 _2069 _2070 _2071 _2072 _2073 _2074 _2075 _2076 _2077 _2078 _2079 _2080 _2081 _2082 _2083 _2084 _2085 _2086 _2087 _2088 _2089 _2090 _2091 _2092 _2093 _2094 _2100 _2101 _2142 _2143 _2144 _2162 _2163 _2203 _2205 _2206 _2207 _2268 _2281 _2290 _2307 _2308 _2313 _2315 _2316 _2317 _2324 _2325 _2326 _2449 _2450 _2451 _2452 _2453 _2454 _2455 _2456 _2457 _2459 _2461 _2463 _2465 _2467 _2469 _2471 _2473 _2475 _2477 _2479 _2481 _2483 _2485 _2487 _2489 _2491 _2493 _2495 _2497 _2499 _2501 _2503 _2505 _2507 _2509 _2510 _2515 _2516 _2517 _2518 _2519 _2520 _2521 _2522 _2523 _2524 _2525 _2526 _2527 _2528 _2530 _2531 _2532 _2533 _2534 _2535 _2536 _2537 _2538 _2540 _2542 _2561 _2562 _2563 _2564 _2565 _2566 _2567 _2568 _2569 _2632 _2633 _2634 _2635 _2636 _2637 _2638 _2647 _2648 _2649 " mangled="_Z3std" demangled="std"/> - <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_pyboost_date_time_include_date_time.pypp.hpp6rBGba" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> - <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_pyboost_date_time_include_date_time.pypp.hpp6rBGba" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> + <Function id="_3" name="_GLOBAL__D__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppWwecHb" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> + <Function id="_4" name="_GLOBAL__I__home_roman_pygccxml_sources_sources_pyplusplus_dev_examples_pyboost_dev_dev_date_time_include_date_time.pypp.hppWwecHb" returns="_1154" context="_1" location="f0:131" file="f0" line="131" endline="131"/> <Variable id="_5" name="_ZGVN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE" type="_1248" context="_1" location="f1:372" file="f1" line="372" artificial="1"/> <Function id="_6" name="__static_initialization_and_destruction_0" returns="_1154" context="_1" mangled="_Z41__static_initialization_and_destruction_0ii" demangled="__static_initialization_and_destruction_0(int, int)" location="f0:131" file="f0" line="131" endline="76"> <Argument name="__initialize_p" type="_500" location="f0:131" file="f0" line="131"/> @@ -34451,8 +34451,8 @@ <File id="f113" name="/usr/include/c++/4.0.3/cstdlib"/> <File id="f114" name="/usr/include/c++/4.0.3/bits/stl_pair.h"/> <File id="f115" name="<internal>"/> - <File id="f116" name="/home/roman/pygccxml_sources/sources/pyplusplus_dev/examples/pyboost_dev/pyboost/date_time/include/date_time.pypp.hpp"/> - <File id="f117" name="/home/roman/pygccxml_sources/sources/pyplusplus_dev/examples/pyboost_dev/pyboost/date_time/include/date_time_wrapper.hpp"/> + <File id="f116" name="/home/roman/pygccxml_sources/sources/pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time.pypp.hpp"/> + <File id="f117" name="/home/roman/pygccxml_sources/sources/pyplusplus_dev/examples/pyboost_dev/dev/date_time/include/date_time_wrapper.hpp"/> <File id="f118" name="/home/roman/boost_cvs/boost/mpl/aux_/integral_wrapper.hpp"/> <File id="f119" name="/home/roman/boost_cvs/boost/mpl/arg_fwd.hpp"/> <File id="f120" name="/home/roman/boost_cvs/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp"/> Modified: pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/date_time/sconscript 2006-05-17 20:39:36 UTC (rev 128) @@ -39,4 +39,4 @@ _date_time_ = local_env.SharedLibrary( target=date_time_settings.module_name , source=get_source_files() ) -local_env.Install( '#unittests/date_time', _date_time_ ) \ No newline at end of file +local_env.Install( '#pyboost/date_time', _date_time_ ) \ No newline at end of file Modified: pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_settings.py 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/rational/rational_settings.py 2006-05-17 20:39:36 UTC (rev 128) @@ -15,8 +15,8 @@ module_name = '_rational_' working_dir = _script_dir -generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'rational' ) +generated_files_dir = os.path.join( _script_dir, '..', '..', 'pyboost', 'rational', 'generated' ) + defined_symbols = ['BOOST_NO_INCLASS_MEMBER_INITIALIZATION'] undefined_symbols = [ '__MINGW32__' ] Modified: pyplusplus_dev/examples/pyboost_dev/dev/rational/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/dev/rational/sconscript 2006-05-17 19:09:43 UTC (rev 127) +++ pyplusplus_dev/examples/pyboost_dev/dev/rational/sconscript 2006-05-17 20:39:36 UTC (rev 128) @@ -32,4 +32,4 @@ _rational_ = local_env.SharedLibrary( target=rational_settings.module_name , source=get_source_files() ) -local_env.Install( '#unittests/rational', _rational_ ) +local_env.Install( '#pyboost/rational', _rational_ ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 19:09:57
|
Revision: 127 Author: roman_yakovenko Date: 2006-05-17 12:09:43 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=127&view=rev Log Message: ----------- moving unittests Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/unittests/ pyplusplus_dev/examples/pyboost_dev/pyboost/crc/unittests/ pyplusplus_dev/examples/pyboost_dev/pyboost/date_time/unittests/ pyplusplus_dev/examples/pyboost_dev/pyboost/rational/unittests/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 19:07:42
|
Revision: 126 Author: roman_yakovenko Date: 2006-05-17 12:07:20 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=126&view=rev Log Message: ----------- Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/unittestst/ pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/ pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/crc/ pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/examples.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/posix_time_tester.py pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/test_all.py pyplusplus_dev/examples/pyboost_dev/unittestst/rational/ pyplusplus_dev/examples/pyboost_dev/unittestst/rational/test_all.py Added: pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/boost_random/test_all.py 2006-05-17 19:07:20 UTC (rev 126) @@ -0,0 +1,77 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import sys +sys.path.append( '../..' ) + +import boost_random +import unittest + +class tester_t( unittest.TestCase ): + def __init__( self, *args ): + unittest.TestCase.__init__( self, *args ) + + def randomness_tester( self, generator, count=1000 ): + generated = set() + for i in range( count ): + value = generator() + generated.add( value ) + self.failUnless( len( generated ) >= count * 0.9 ) + + def generator_tester( self, gclass, *args ): + gen = gclass() + self.randomness_tester( gen ) + print '\nname : ', gen.__class__.__name__ + print ' max: ', gen.max() + print ' min: ', gen.min() + gen = gclass( *args ) + self.randomness_tester( gen ) + gen.seed() + self.randomness_tester( gen ) + + def test_generators(self): + for gclass in boost_random.generators: + self.generator_tester(gclass) + + def instantiate_dist( self, urng, dist ): + if not boost_random.variate_generator_exists( urng, dist ): + return + + gen1 = boost_random.variate_generator( urng, dist) + gen2 = boost_random.variate_generator( urng, dist) + self.randomness_tester( gen1 ) + self.randomness_tester( gen2 ) + self.failUnless( abs( gen1() - gen2() ) < 1e-6 ) + gen1.engine() + gen1.distribution().reset() + gen2.engine() + gen2.distribution().reset() + + def instantiate_real_dist( self, urng ): + self.instantiate_dist(urng, boost_random.uniform_real(0, 2.1) ) + self.instantiate_dist(urng, boost_random.triangle_distribution(1, 1.5, 7) ) + self.instantiate_dist(urng, boost_random.exponential_distribution(5) ) + self.instantiate_dist(urng, boost_random.normal_distribution(0,1) ) + #self.instantiate_dist(urng, boost_random.normal_distribution() ) + self.instantiate_dist(urng, boost_random.lognormal_distribution(1, 1) ) + self.instantiate_dist(urng, boost_random.cauchy_distribution(1, 1) ) + self.instantiate_dist(urng, boost_random.gamma_distribution(1) ) + + def test_distributions( self ): + for gclass in boost_random.generators: + self.instantiate_real_dist( gclass() ) + + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t) ) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Added: pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/crc/test_all.py 2006-05-17 19:07:20 UTC (rev 126) @@ -0,0 +1,233 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import sys +sys.path.append( '../..' ) + +import crc +import random +import unittest + +class consts: + data = [ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 ] + crc_ccitt_result = 0x29B1 + crc_16_result = 0xBB3D + crc_32_result = 0xCBF43926 + +class tester_t( unittest.TestCase ): + def __init__( self, *args ): + unittest.TestCase.__init__( self, *args ) + + def fundamental_test( self, cls, data, expected ): + inst = cls() + inst.process_bytes( data ) + #self.failUnless( inst.checksum() == expected ) + + def compute_test( self, fast_crc, slow_crc, expected ): + fast_crc.process_bytes( consts.data, len(consts.data) ) + slow_crc.process_bytes( consts.data, len(consts.data) ) + + def test( self ): + self.fundamental_test( crc.crc_ccitt_type, consts.data, consts.crc_ccitt_result ) + self.fundamental_test( crc.crc_16_type, consts.data, consts.crc_16_result ) + self.fundamental_test( crc.crc_32_type, consts.data, consts.crc_32_result ) + + def test_crc_basic_1( self ): + crc1 = crc.crc_basic_1( 1 ) + crc1.process_bytes( consts.data ) + self.failUnless( crc1.checksum() == 1 ) + + def test_crc_basic_3( self ): + #The CRC standard is a SDH/SONET Low Order LCAS control word with CRC-3 + #taken from ITU-T G.707 (12/03) XIII.2. + + #Four samples, each four bytes should all have a CRC of zero + samples = \ + [ + [ 0x3A, 0xC4, 0x08, 0x06 ], + [ 0x42, 0xC5, 0x0A, 0x41 ], + [ 0x4A, 0xC5, 0x08, 0x22 ], + [ 0x52, 0xC4, 0x08, 0x05 ] + ] + + # Basic computer + tester1 = crc.basic[3]( 0x03 ) #same as crc.crc_basic_3 + + tester1.process_bytes( samples[0] ) + self.failUnless( tester1.checksum() == 0 ) + + tester1.reset() + tester1.process_bytes( samples[1] ) + self.failUnless( tester1.checksum() == 0 ) + + tester1.reset() + tester1.process_bytes( samples[2] ) + self.failUnless( tester1.checksum() == 0 ) + + tester1.reset() + tester1.process_bytes( samples[3] ) + self.failUnless( tester1.checksum() == 0 ) + + # Optimal computer + #define PRIVATE_CRC_FUNC boost::crc<3, 0x03, 0, 0, false, false> + #define PRIVATE_ACRC_FUNC boost::augmented_crc<3, 0x03> + + #self.failUnless( 0 == PRIVATE_CRC_FUNC(samples[0], 4) ) + #self.failUnless( 0 == PRIVATE_CRC_FUNC(samples[1], 4) ) + #self.failUnless( 0 == PRIVATE_CRC_FUNC(samples[2], 4) ) + #self.failUnless( 0 == PRIVATE_CRC_FUNC(samples[3], 4) ) + + # maybe the fix to CRC functions needs to be applied to augmented CRCs? + + #undef PRIVATE_ACRC_FUNC + #undef PRIVATE_CRC_FUNC + + def test_crc_basic_7( self ): + #"Doing short-CRC (7-bit augmented) message tests." + + # The CRC standard is a SDH/SONET J0/J1/J2/N1/N2/TR TTI (trace message) + # with CRC-7, o.a. ITU-T G.707 Annex B, G.832 Annex A. + + # Two samples, each sixteen bytes + # Sample 1 is '\x80' + ASCII("123456789ABCDEF") + # Sample 2 is '\x80' + ASCII("TTI UNAVAILABLE") + samples = [ [ 0x80, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 ] + , [ 0x80, 0x54, 0x54, 0x49, 0x20, 0x55, 0x4E, 0x41, + 0x56, 0x41, 0x49, 0x4C, 0x41, 0x42, 0x4C, 0x45 ] ] + results = [ 0x62, 0x23 ] + + # Basic computer + tester1 = crc.crc_basic_7( 0x09 ) + + tester1.process_bytes( samples[0] ) + self.failUnless( tester1.checksum() == results[0] ) + + tester1.reset() + tester1.process_bytes( samples[1] ) + self.failUnless( tester1.checksum() == results[1] ) + + # Optimal computer + #define PRIVATE_CRC_FUNC boost::crc<7, 0x09, 0, 0, false, false> + #define PRIVATE_ACRC_FUNC boost::augmented_crc<7, 0x09> + + #self.failUnless( results[0] == PRIVATE_CRC_FUNC(samples[0], 16) ) + #self.failUnless( results[1] == PRIVATE_CRC_FUNC(samples[1], 16) ) + + # maybe the fix to CRC functions needs to be applied to augmented CRCs? + + #undef PRIVATE_ACRC_FUNC + #undef PRIVATE_CRC_FUNC + + def compute_test( self, optimal_cls, basic_cls, data, expected ): + fast_crc = optimal_cls() + slow_crc = basic_cls( fast_crc.truncated_polynominal + , fast_crc.initial_remainder + , fast_crc.final_xor_value + , fast_crc.reflect_input + , fast_crc.reflect_remainder ) + + fast_crc.process_bytes( data ) + slow_crc.process_bytes( data ) + self.failUnless( fast_crc.checksum() == expected ) + self.failUnless( slow_crc.checksum() == expected ) + #self.failUnless( func_result == expected ); + + def interrupt_test( self, optimal_cls, basic_cls, data, expected ): + fast_crc1 = optimal_cls() + slow_crc1 = basic_cls( fast_crc1.truncated_polynominal + , fast_crc1.initial_remainder + , fast_crc1.final_xor_value + , fast_crc1.reflect_input + , fast_crc1.reflect_remainder ) + self.failUnless( fast_crc1.get_interim_remainder() == slow_crc1.get_initial_remainder() ) + first_half = data[:len( data )/2] + second_half = data[len( data )/2:] + + fast_crc1.process_bytes( first_half ); + slow_crc1.process_bytes( first_half ); + self.failUnless( fast_crc1.checksum() == slow_crc1.checksum() ) + + #Process the second half of the data (also test accessors) + fast_crc2 = optimal_cls( fast_crc1.get_interim_remainder() ) + slow_crc2 = basic_cls( slow_crc1.get_truncated_polynominal() + , slow_crc1.get_interim_remainder() + , slow_crc1.get_final_xor_value() + , slow_crc1.get_reflect_input() + , slow_crc1.get_reflect_remainder() ) + + fast_crc2.process_block( second_half ) + slow_crc2.process_block( second_half ) + + self.failUnless( fast_crc2.checksum() == slow_crc2.checksum() ) + self.failUnless( fast_crc2.checksum() == expected ) + self.failUnless( slow_crc2.checksum() == expected ) + + def error_test( self, optimal_cls, basic_cls ): + # Create a random block of data + ran_data = map( lambda unused: random.randint(0, 255), [0] * 256 ) + + # Create computers and compute the checksum of the data + fast_tester = optimal_cls() + slow_tester = basic_cls( fast_tester.truncated_polynominal + , fast_tester.initial_remainder + , fast_tester.final_xor_value + , fast_tester.reflect_input + , fast_tester.reflect_remainder ) + + fast_tester.process_bytes( ran_data ) + slow_tester.process_bytes( ran_data ) + + fast_checksum = fast_tester.checksum() + slow_checksum = slow_tester.checksum() + + self.failUnless( fast_checksum == slow_checksum ) + + # Do the checksum again (and test resetting ability) + fast_tester.reset(); + slow_tester.reset( fast_tester.initial_remainder ); + fast_tester.process_bytes( ran_data ) + slow_tester.process_bytes( ran_data ) + self.failUnless( fast_tester.checksum() == slow_tester.checksum() ) + self.failUnless( fast_tester.checksum() == fast_checksum ) + self.failUnless( slow_tester.checksum() == slow_checksum ) + + # Produce a single-bit error + ran_data[ ran_data[0] % 255 ] = ( ran_data[ ran_data[0] % 255 ] ^ ( 1 << (ran_data[1] % 32) ) ) % 255 + + # Compute the checksum of the errorenous data + # (and continue testing resetting ability) + fast_tester.reset( fast_tester.initial_remainder ) + slow_tester.reset() + fast_tester.process_bytes( ran_data ) + slow_tester.process_bytes( ran_data ) + self.failUnless( fast_tester.checksum() == slow_tester.checksum() ) + self.failUnless( fast_tester.checksum() != fast_checksum ) + self.failUnless( slow_tester.checksum() != slow_checksum ) + + def test_crc_ccitt( self ): + self.compute_test( crc.crc_ccitt_type, crc.crc_basic_16, consts.data, consts.crc_ccitt_result ) + self.interrupt_test( crc.crc_ccitt_type, crc.crc_basic_16, consts.data, consts.crc_ccitt_result ) + self.error_test( crc.crc_ccitt_type, crc.crc_basic_16 ) + + def test_crc_16( self ): + self.compute_test( crc.crc_16_type, crc.crc_basic_16, consts.data, consts.crc_16_result) + self.interrupt_test( crc.crc_16_type, crc.crc_basic_16, consts.data, consts.crc_16_result) + + def test_crc_32( self ): + self.compute_test( crc.crc_32_type, crc.crc_basic_32, consts.data, consts.crc_32_result) + self.interrupt_test( crc.crc_32_type, crc.crc_basic_32, consts.data, consts.crc_32_result) + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t) ) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Added: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/examples.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/examples.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/examples.py 2006-05-17 19:07:20 UTC (rev 126) @@ -0,0 +1,33 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import unittest +import date_time +from date_time import gregorian +from date_time import posix_time +from date_time import local_time +from date_time import to_iso_string + +class examples_t( unittest.TestCase ): + def __init__( self, *args ): + unittest.TestCase.__init__( self, *args ) + + def test_days_alive(self): + birthday = gregorian.date( 1900, date_time.Mar, 18 ) + today = gregorian.day_clock.local_day() + alive = today - birthday + print str(alive) + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(examples_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Added: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/gregorian_tester.py 2006-05-17 19:07:20 UTC (rev 126) @@ -0,0 +1,556 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import date_time +from date_time import gregorian +from date_time import posix_time +from date_time import to_iso_string +from date_time import to_simple_string +import unittest + +class tester_t( unittest.TestCase ): + def __init__( self, *args ): + unittest.TestCase.__init__( self, *args ) + + def test_current_day(self): + d1 = gregorian.day_clock.local_day() + print to_iso_string( d1 ) + + ymd = gregorian.day_clock.local_day_ymd() + + print '%i-%s-%i' % ( ymd.year.as_number() + , ymd.month.as_long_string() + , ymd.day.as_number() ) + + d2 = gregorian.day_clock.universal_day() + print to_iso_string( d2 ) + + ymd2 = gregorian.day_clock.universal_day_ymd() + print '%i-%s-%i' % ( ymd2.year.as_number() + , ymd2.month.as_long_string() + , ymd2.day.as_number() ) + + def test_date(self): + self.failUnless( gregorian.date() == gregorian.date( date_time.not_a_date_time ) ) + d1 = gregorian.date( 1900, 1, 1 ) + d2 = gregorian.date( 2000, 1, 1 ) + d3 = gregorian.date( 1900, 1, 1 ) + d4 = gregorian.date( 2000, 12, 31 ) + d4a = gregorian.date( 2000, date_time.Dec, 31 ) + self.failUnless( d4 == d4a ) + self.failUnless( d1.day().as_number() == 1 ) + self.failUnless( d1.month().as_number() == 1 ) + self.failUnless( d1.year().as_number() == 1900 ) + self.failUnless( d4a.month().as_number() == 12 ) + self.failUnless( d1 < d2 ) + self.failUnless( not ( d1 < d1 ) ) + self.failUnless( d1 <= d1 ) + self.failUnless( d2 > d1 ) + self.failUnless( not ( d1 > d1 ) ) + self.failUnless( d1 >= d1 ) + self.failUnless( d2 != d1 ) + self.failUnless( d1 == d3 ) + ymd = d1.year_month_day() + self.failUnless( ymd.year.as_number() == 1900 ) + self.failUnless( ymd.month.as_number() == 1 ) + self.failUnless( ymd.day.as_number() == 1 ) + + answers = [ gregorian.date( 1900, date_time.Jan, 1 ) + , gregorian.date( 1900, date_time.Jan, 4 ) + , gregorian.date( 1900, date_time.Jan, 7 ) + , gregorian.date( 1900, date_time.Jan, 10 ) + , gregorian.date( 1900, date_time.Jan, 13 ) + ] + off = gregorian.date_duration( 3 ) + d5 = gregorian.date( 1900, 1, 1 ) + for i in range(5): + self.failUnless( d5 == answers[i] ) + d5 = d5 + off + + answers1 = [ gregorian.date(2000, 2 ,26) + , gregorian.date(2000, 2 ,28) + , gregorian.date(2000, date_time.Mar ,1 )] + d8 = gregorian.date(2000, date_time.Feb, 26) + for i in range(3): + self.failUnless( d8 == answers1[i] ) + d8 += gregorian.days(2) + + d6 = gregorian.date(2000,2,28) + d7 = gregorian.date(2000,3,1) + twoDays = gregorian.date_duration(2) + negtwoDays = gregorian.date_duration(-2) + zeroDays = gregorian.date_duration(0) + self.failUnless( twoDays == d7 - d6 ) + self.failUnless( negtwoDays == d6 - d7 ) + self.failUnless( zeroDays == d6 - d6 ) + self.failUnless( d6 + twoDays == d7 ) + self.failUnless( d7 - twoDays == d6 ) + self.failUnless( gregorian.date(1999,1,1) + gregorian.date_duration(365) + == gregorian.date(2000,1,1) ) + self.failUnless( gregorian.date(1999,1,1) + zeroDays == gregorian.date(1999,1,1) ) + + d = gregorian.date(2003, date_time.Oct, 31) + dd = gregorian.date_duration(55) + d += dd + self.failUnless( d == gregorian.date(2003, date_time.Dec,25) ) + d -= dd; + self.failUnless( d == gregorian.date(2003, date_time.Oct,31) ) + + d = gregorian.date(2003,date_time.Oct, 31) + dd1 = gregorian.date_duration( date_time.pos_infin) + dd2 = gregorian.date_duration( date_time.neg_infin) + dd3 = gregorian.date_duration( date_time.not_a_date_time) + + self.failUnless( d + dd1 == gregorian.date(date_time.pos_infin)) + self.failUnless( d + dd2 == gregorian.date(date_time.neg_infin)) + self.failUnless( d + dd3 == gregorian.date(date_time.not_a_date_time)) + self.failUnless( d - dd1 == gregorian.date(date_time.neg_infin)) + self.failUnless( d - dd2 == gregorian.date(date_time.pos_infin)) + self.failUnless( d - dd3 == gregorian.date(date_time.not_a_date_time)) + self.failUnless( gregorian.date(date_time.pos_infin) + dd1 + == gregorian.date(date_time.pos_infin)) + self.failUnless( gregorian.date(date_time.pos_infin) - dd1 + == gregorian.date(date_time.not_a_date_time)) + self.failUnless( gregorian.date(date_time.neg_infin) + dd1 + == gregorian.date(date_time.not_a_date_time)) + self.failUnless( gregorian.date(date_time.neg_infin) - dd1 + == gregorian.date(date_time.neg_infin)) + + self.failUnlessRaises( Exception, lambda: gregorian.date( 2000, 1, 32 ) ) + self.failUnlessRaises( Exception, lambda: gregorian.date( 2000, 1, 0 ) ) + self.failUnlessRaises( Exception, lambda: gregorian.date( 2000, 2, 31 ) ) + + d15 = gregorian.date(1400,1,1) + self.failUnless( d15.julian_day() == 2232400) + self.failUnless( d15.modjulian_day() == -167601) + + d16 = gregorian.date(2004,2,29) + self.failUnless( d16.julian_day() == 2453065) + self.failUnless( d16.modjulian_day() == 53064) + + d31 = gregorian.date(2000, date_time.Jun, 1) + self.failUnless( d31.week_number() == 22) + + d38 = gregorian.date(2001, 1, 1) + self.failUnless( d38.day_of_year().as_number() == 1) + + def test_date_duration(self): + threeDays = gregorian.date_duration(3) + twoDays = gregorian.date_duration(2) + self.failUnless( threeDays == threeDays ) + self.failUnless( threeDays == gregorian.date_duration(3) ) + self.failUnless( threeDays != twoDays ) + self.failUnless( twoDays < threeDays ) + self.failUnless( not ( threeDays < twoDays ) ) + self.failUnless( not ( threeDays < threeDays ) ) + self.failUnless( not ( threeDays > threeDays ) ) + self.failUnless( threeDays >= threeDays ) + self.failUnless( not ( twoDays >= threeDays ) ) + self.failUnless( twoDays + threeDays == gregorian.date_duration(5) ) + fiveDays = gregorian.date_duration(3) + fiveDays += twoDays + self.failUnless( fiveDays == gregorian.date_duration(5) ) + derivedOneDay = threeDays - twoDays + self.failUnless( twoDays - threeDays == gregorian.date_duration(-1) ) + oneDay = gregorian.date_duration(1) + self.failUnless( oneDay == derivedOneDay ) + fiveDaysDerived = gregorian.date_duration( 10 ) + fiveDaysDerived -= fiveDays + self.failUnless( fiveDaysDerived == fiveDays) + + oneDay = twoDays / 2 + self.failUnless( oneDay.days() == 1 ) + hundred = gregorian.date_duration(100) + hundred /= -10 + self.failUnless( hundred.days() == -10 and hundred.is_negative()) + self.failUnless( gregorian.date_duration( -gregorian.date_duration( 123 ).days() ).days() == -123 ) + pos_dur = gregorian.date_duration(123) + neg_dur = -pos_dur + self.failUnless( neg_dur.days() == -123) + + pi_dur = gregorian.date_duration(date_time.pos_infin) + ni_dur = gregorian.date_duration(date_time.neg_infin) + nd_dur = gregorian.date_duration(date_time.not_a_date_time) + self.failUnless( pi_dur + ni_dur == nd_dur) + self.failUnless( ni_dur / 3 == ni_dur) + self.failUnless( pi_dur + hundred == pi_dur) + self.failUnless( -pi_dur == ni_dur) + + + def test_generators(self): + pd1 =gregorian.partial_date(1, date_time.Jan) + d = pd1.get_date(2000) + self.failUnless( pd1.to_string() == "0" ) + self.failUnless( gregorian.date(2000,1,1) == d) + + pd2 = gregorian.partial_date(1, date_time.Feb) + + self.failUnless( pd1 == pd1) + self.failUnless( not(pd1 == pd2) ) + self.failUnless( not(pd2 == pd1) ) + self.failUnless( not(pd1 < pd1) ) + self.failUnless( pd1 < pd2) + self.failUnless( not(pd2 < pd1) ) + + lastkday = gregorian.last_day_of_the_week_in_month + lsif = lastkday( date_time.Sunday, date_time.Feb) + self.failUnless( gregorian.date(2002, date_time.Feb,24) + == lsif.get_date(2002)) + self.failUnless( lsif.to_string() == "M2.5.0" ) + + firstkday = gregorian.first_day_of_the_week_in_month + fsif = firstkday(date_time.Sunday, date_time.Feb) + self.failUnless( gregorian.date(2002, date_time.Feb,3) + == fsif.get_date(2002)) + self.failUnless( fsif.to_string() == "M2.1.0" ) + + firstkdayafter = gregorian.first_day_of_the_week_after + fkaf = firstkdayafter(date_time.Monday) + self.failUnless( gregorian.date(2002, date_time.Feb,4) + == fkaf.get_date( gregorian.date(2002,date_time.Feb,1))) + self.failUnless( '2002-Feb-04' == to_simple_string( fkaf.get_date( gregorian.date(2002,date_time.Feb,1)))) + + firstkdaybefore = gregorian.first_day_of_the_week_before + fkbf = firstkdaybefore(date_time.Monday) + self.failUnless( '2002-Feb-11' == to_simple_string(fkaf.get_date(gregorian.date(2002,date_time.Feb,10)))) + self.failUnless( gregorian.date(2002,date_time.Feb,4) + == fkbf.get_date(gregorian.date(2002,date_time.Feb,10))) + + nthkdayofmonth = gregorian.nth_day_of_the_week_in_month; + nkd1 = nthkdayofmonth(nthkdayofmonth.third, date_time.Sunday, date_time.Jul) + + self.failUnless( gregorian.date(1969, date_time.Jul, 20) == nkd1.get_date(1969)) + self.failUnless( nkd1.to_string() == "M7.3.0" ) + + saturday = gregorian.date(2003,date_time.Feb,8) + sund = gregorian.greg_weekday(date_time.Sunday) + self.failUnless( gregorian.days_until_weekday(saturday, sund) == gregorian.days(1)) + self.failUnless( gregorian.days_before_weekday(saturday, sund) == gregorian.days(6)) + self.failUnless( gregorian.next_weekday(saturday, sund)== gregorian.date(2003,date_time.Feb,9)) + self.failUnless( gregorian.previous_weekday(saturday, sund)== gregorian.date(2003,date_time.Feb,2)) + + def test_greg_day(self): + self.failUnless( gregorian.greg_day(1).as_number() == 1 ) + self.failUnlessRaises( Exception, lambda: gregorian.greg_day(0) ) + self.failUnless( gregorian.greg_day.min() == 1 ) + self.failUnless( gregorian.greg_day.max() == 31 ) + sunday = gregorian.greg_weekday(0) + monday = gregorian.greg_weekday(1) + self.failUnless( sunday.as_short_string() == "Sun" ) + self.failUnlessRaises( Exception, lambda: gregorian.greg_day_of_year_rep(367) ) + + def test_greg_year(self): + self.failUnless( gregorian.greg_year(1400).as_number() == 1400 ) + self.failUnlessRaises( Exception, lambda: gregorian.greg_year(0) ) + self.failUnless( gregorian.greg_year.min() == 1400 ) + self.failUnless( gregorian.greg_year.max() == 10000 ) + + def test_greg_month(self): + m1 = gregorian.greg_month(date_time.Jan) + self.failUnless( m1.as_number() == 1) + self.failUnless( m1.as_short_string() == "Jan") + self.failUnless( m1.as_long_string() == "January") + sm1 = gregorian.greg_month(1) + self.failUnless( sm1.as_number() == 1) + self.failUnless( gregorian.greg_month.min() == 1 ) + self.failUnless( gregorian.greg_month.max() == 12 ) + + def test_greg_cal(self): + self.failUnless( gregorian.calendar.day_of_week(gregorian.ymd_type(2000,9,24))==0 ) + self.failUnless( gregorian.calendar.is_leap_year(1404) ) + jday1 = gregorian.calendar.day_number( gregorian.ymd_type(2000,1,1)) + jday2 = gregorian.calendar.day_number( gregorian.ymd_type(2001,1,1)) + self.failUnless( jday1 == 2451545 ) + self.failUnless( jday2 == 2451911 ) + ymd = gregorian.calendar.from_day_number(jday1) + self.failUnless( ymd.year.as_number() == 2000 + and ymd.month.as_number() == 1 + and ymd.day.as_number() == 1 ) + self.failUnless( gregorian.calendar.end_of_month_day(2000,1) == 31) + + def test_greg_durations(self): + m1 = gregorian.months(5) + m2 = gregorian.months(3) + m3 = gregorian.months(1) + self.failUnless( gregorian.months(8) == m1 + m2) + m1 += m2 + self.failUnless( gregorian.months(8) == m1) + self.failUnless( gregorian.months(-5) == m2 - m1) + m2 -= m1; + self.failUnless( gregorian.months(-5) == m2) + + d1 = gregorian.date(2005, date_time.Jan, 1) + + self.failUnless( d1 + gregorian.months(-1) + == gregorian.date(2004, date_time.Dec, 1) ) + d3 = gregorian.date(2005, date_time.Dec, 1); + self.failUnless( d3 - gregorian.months(-1) + == gregorian.date(2006,date_time.Jan,1)) + m1 = gregorian.months(5) + m2 = gregorian.months(3) + m3 = gregorian.months(10) + self.failUnless( gregorian.months(15) == m1 * 3) + m1 *= 3 + self.failUnless( gregorian.months(15) == m1) + self.failUnless( gregorian.months(12) == m2 * 4) + self.failUnless( gregorian.months(3) == m3 / 3) + m3 /= 3 + self.failUnless( gregorian.months(3) == m3) + + m = gregorian.months(-5) + m_pos = gregorian.months(date_time.pos_infin) + m_neg = gregorian.months(date_time.neg_infin) + m_nadt = gregorian.months(date_time.not_a_date_time) + self.failUnless( m + m_pos == m_pos) + self.failUnless( m + m_neg == m_neg) + self.failUnless( m_pos + m_neg == m_nadt) + self.failUnless( m_neg + m_neg == m_neg) + self.failUnless( m - m_pos == m_neg) + self.failUnless( m - m_neg == m_pos) + self.failUnless( m_pos - m_neg == m_pos) + self.failUnless( m_pos * -1 == m_neg) + self.failUnless( m_pos * 0 == m_nadt) + self.failUnless( m_neg / 3 == m_neg) + + y1 = gregorian.years(2) + y2 = gregorian.years(4) + self.failUnless( gregorian.months(27) == m3 + y1) + m3 += y1 + self.failUnless( gregorian.months(27) == m3) + self.failUnless( gregorian.months(-21) == m3 - y2) + m3 -= y2 + self.failUnless( gregorian.months(-21) == m3) + + d = gregorian.date(2001, date_time.Oct, 31); + self.failUnless( gregorian.date(2002, date_time.Feb, 28) + == d + gregorian.months(4)) + d += gregorian.months(4) + self.failUnless( gregorian.date(2002, date_time.Feb, 28) == d); + d = gregorian.date(2001, date_time.Oct, 31); + self.failUnless( gregorian.date(2001, date_time.Apr, 30) + == d - gregorian.months(6)); + d -= gregorian.months(6); + self.failUnless( gregorian.date(2001, date_time.Apr, 30) == d); + + y1 = gregorian.years(2) + y2 = gregorian.years(4) + y3 = gregorian.years(1) + self.failUnless( gregorian.years(3) == y3 + y1) + y3 += y1 + self.failUnless( gregorian.years(3) == y3) + self.failUnless( gregorian.years(-1) == y3 - y2) + y3 -= y2 + self.failUnless( gregorian.years(-1) == y3) + + y1 = gregorian.years(5) + y2 = gregorian.years(3) + y3 = gregorian.years(10) + + self.failUnless( gregorian.years(15) == y1 * 3) + y1 *= 3 + self.failUnless( gregorian.years(15) == y1) + + self.failUnless( gregorian.years(3) == y3 / 3) + y3 /= 3 + self.failUnless( gregorian.years(3) == y3) + + m = gregorian.years(15) + y_pos = gregorian.years(date_time.pos_infin) + y_neg = gregorian.years(date_time.neg_infin) + y_nadt = gregorian.years(date_time.not_a_date_time) + self.failUnless( m + y_pos == y_pos) + self.failUnless( m + y_neg == y_neg) + self.failUnless( y_pos + y_neg == y_nadt) + self.failUnless( y_neg + y_neg == y_neg) + self.failUnless( m - y_pos == y_neg) + self.failUnless( m - y_neg == y_pos) + self.failUnless( y_pos - y_neg == y_pos) + self.failUnless( y_pos * -1 == y_neg) + self.failUnless( y_pos * 0 == y_nadt) + self.failUnless( y_neg / 3 == y_neg) + + m1 = gregorian.months(5) + m2 = gregorian.months(3) + self.failUnless( gregorian.months(39) == y2 + m2) + self.failUnless( gregorian.months(31) == y2 - m1) + + d = gregorian.date(2001, date_time.Feb, 28) + self.failUnless( gregorian.date(2004, date_time.Feb, 29) == d + gregorian.years(3)) + d += gregorian.years(3) + self.failUnless( gregorian.date(2004, date_time.Feb, 29) == d) + + d = gregorian.date(2000, date_time.Feb, 29) + self.failUnless( gregorian.date(1994, date_time.Feb, 28) == d - gregorian.years(6)) + d -= gregorian.years(6) + self.failUnless( gregorian.date(1994, date_time.Feb, 28) == d) + + w1 = gregorian.weeks(2) + w2 = gregorian.weeks(4) + w3 = gregorian.weeks(1) + pi = gregorian.weeks(date_time.pos_infin) + self.failUnless( gregorian.weeks(date_time.pos_infin) == w1 + pi) + self.failUnless( gregorian.weeks(3) == w3 + w1) + w3 += w1 + self.failUnless( gregorian.weeks(3) == w3) + self.failUnless( gregorian.weeks(-1) == w3 - w2) + w3 -= w2 + self.failUnless( gregorian.weeks(-1) == w3) + + d = gregorian.days(10) + self.failUnless( gregorian.days(31) == d + gregorian.weeks(3)) + d += gregorian.weeks(3); + self.failUnless( gregorian.days(31) == d) + + d = gregorian.days(10) + self.failUnless( gregorian.days(-32) == d - gregorian.weeks(6)) + d -= gregorian.weeks(6) + self.failUnless( gregorian.days(-32) == d) + + d = gregorian.date(2001, date_time.Feb, 28) + self.failUnless( gregorian.date(2001, date_time.Mar, 21) == d + gregorian.weeks(3)) + d += gregorian.weeks(3) + self.failUnless( gregorian.date(2001, date_time.Mar, 21) == d) + + d = gregorian.date(2001, date_time.Feb, 28); + self.failUnless( gregorian.date(2001, date_time.Jan, 17) == d - gregorian.weeks(6)) + d -= gregorian.weeks(6) + self.failUnless( gregorian.date(2001, date_time.Jan, 17) == d) + + d = gregorian.date(2000, date_time.Oct, 31) + d2 = d + gregorian.months(4) + gregorian.years(2) + d3 = d + gregorian.years(2) + gregorian.months(4) + self.failUnless( gregorian.date(2003, date_time.Feb,28) == d2) + self.failUnless( gregorian.date(2003,date_time.Feb,28) == d3) + m = gregorian.years(2) + gregorian.months(4) - gregorian.months(4) - gregorian.years(2) + self.failUnless( m.number_of_months() == 0) + + def test_period(self): + d1 = gregorian.date(2000,date_time.Jan,1) + d2 = gregorian.date(2000,date_time.Jan,4) + p1 = gregorian.date_period(d1,d2) + p2 = gregorian.date_period(d1,gregorian.date_duration(3) ) + self.failUnless( p1 == p2) + self.failUnless( p1.begin() == d1) + self.failUnless( p1.last() == d2-gregorian.date_duration(1) ) + self.failUnless( p1.end() == d2) + self.failUnless( p2.length() == gregorian.date_duration(3) ) + self.failUnless( p1.contains(d1) ) + self.failUnless( not p1.contains(d2) ) + p3 = gregorian.date_period( gregorian.date(2000,date_time.Jan,4) + , gregorian.date(2000,date_time.Feb,1) ) + self.failUnless( not (p1 == p3) ) + self.failUnless( p1 < p3) + self.failUnless( p3 > p1) + self.failUnless( p3 != p1) + self.failUnless( p1.intersects(p1) ) + self.failUnless( not p1.intersects(p3) ) + self.failUnless( not p3.intersects(p1) ) + p4 = gregorian.date_period(gregorian.date(1999,date_time.Dec,1), d2) + self.failUnless( p1.intersects(p4) ) + self.failUnless( p4.intersects(p1) ) + p5 = gregorian.date_period(gregorian.date(1999,date_time.Dec,1) + , gregorian.date(2000,date_time.Dec,31) ) + self.failUnless( p1.intersects(p5) ) + self.failUnless( p5.intersects(p1) ) + p6 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1) + ,gregorian.date(2000,date_time.Dec,31) ) + self.failUnless( p5.contains(p6) ) + self.failUnless( p6.contains(p6) ) + self.failUnless( not p6.contains(p5) ) + + fourDays = gregorian.date_duration(4) + p1.shift(fourDays) + shifted = gregorian.date_period(gregorian.date(2000,date_time.Jan,5) + , gregorian.date(2000,date_time.Jan,8) ) + self.failUnless( p1 == shifted) + + i1 = gregorian.date_period(gregorian.date(2000,date_time.Jan,5) + , gregorian.date(2000,date_time.Jan,10) ) + i2 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1) + , gregorian.date(2000,date_time.Jan,7) ) + r1 = gregorian.date_period(gregorian.date(2000,date_time.Jan,5) + , gregorian.date(2000,date_time.Jan,7) ) + self.failUnless( i1.intersection(i2) == r1) + self.failUnless( i2.intersection(i1) == r1) + + i3 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1) + , gregorian.date(2000,date_time.Jan,15) ) + self.failUnless( i1.intersection(i3) == i1) + self.failUnless( i3.intersection(i1) == i1) + + i4 = gregorian.date_period(gregorian.date(2000,date_time.Jan,7), gregorian.date(2000,date_time.Jan,10) ) + i5 = gregorian.date_period(gregorian.date(2000,date_time.Jan,6) + , gregorian.date(2000,date_time.Jan,9) ) + self.failUnless( i1.intersection(i5) == i5) + self.failUnless( i5.intersection(i1) == i5) + self.failUnless( i2.intersection(i4).is_null() ) + + r3 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1), gregorian.date(2000,date_time.Jan,10) ) + + self.failUnless( i1.merge(i2) == r3) + self.failUnless( i2.merge(i4).is_null() ) + r4 = gregorian.date_period(gregorian.date(2000,date_time.Jan,5), gregorian.date(2000,date_time.Jan,10) ) + self.failUnless( i1.merge(i5) == r4) + + self.failUnless( i1.span(i2) == r3) + self.failUnless( i2.span(i4) == r3) + self.failUnless( i4.span(i2) == r3) + self.failUnless( i3.span(i2) == i3) + + i6 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1), gregorian.date(2000,date_time.Jan,2) ) + self.failUnless( i6.span(i4) == r3) + self.failUnless( i4.span(i6) == r3) + + bf_start = gregorian.date(2000,date_time.Jan,5) + bf_end = gregorian.date(2000,date_time.Jan,10) + bf_before = gregorian.date(2000,date_time.Jan,4) + bf_after = gregorian.date(2000,date_time.Jan,11) + bf_during = gregorian.date(2000, date_time.Jan, 7) + bfp1 = gregorian.date_period(bf_start, bf_end) + + self.failUnless( not bfp1.is_before(bf_start) ) + self.failUnless( bfp1.is_before(bf_end) ) + self.failUnless( not bfp1.is_before(bfp1.last() )) + self.failUnless( not bfp1.is_before(bf_before) ) + self.failUnless( not bfp1.is_before(bf_during) ) + self.failUnless( bfp1.is_before(bf_after) ) + + self.failUnless( not bfp1.is_after(bf_start) ) + self.failUnless( not bfp1.is_after(bf_end) ) + self.failUnless( not bfp1.is_after(bfp1.last() )) + self.failUnless( bfp1.is_after(bf_before) ) + self.failUnless( not bfp1.is_after(bf_during) ) + self.failUnless( not bfp1.is_after(bf_after) ) + + adj1 = gregorian.date_period( gregorian.date(2000,date_time.Jan,5) + , gregorian.date(2000,date_time.Jan,10) ) + adj2 = gregorian.date_period (gregorian.date(2000,date_time.Jan,1), gregorian.date(2000,date_time.Jan,5) ) + adj3 = gregorian.date_period(gregorian.date(2000,date_time.Jan,7), gregorian.date(2000,date_time.Jan,12) ) + adj4 = gregorian.date_period(gregorian.date(2000,date_time.Jan,12), gregorian.date(2000,date_time.Jan,15) ) + adj5 = gregorian.date_period(gregorian.date(2000,date_time.Jan,1), gregorian.date(2000,date_time.Jan,3) ) + adj6 = gregorian.date_period(gregorian.date(2000,date_time.Jan,7), gregorian.date(2000,date_time.Jan,9) ) + + self.failUnless( adj1.is_adjacent(adj2) ) + self.failUnless( adj2.is_adjacent(adj1) ) + self.failUnless( not adj1.is_adjacent(adj3) ) + self.failUnless( not adj3.is_adjacent(adj1) ) + self.failUnless( not adj1.is_adjacent(adj4) ) + self.failUnless( not adj4.is_adjacent(adj1) ) + self.failUnless( not adj1.is_adjacent(adj5) ) + self.failUnless( not adj5.is_adjacent(adj1) ) + self.failUnless( not adj1.is_adjacent(adj6) ) + self.failUnless( not adj6.is_adjacent(adj1) ) + +def create_suite(): + suite = unittest.TestSuite() + suite.addTest( unittest.makeSuite(tester_t)) + return suite + +def run_suite(): + unittest.TextTestRunner(verbosity=2).run( create_suite() ) + +if __name__ == "__main__": + run_suite() Added: pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py (rev 0) +++ pyplusplus_dev/examples/pyboost_dev/unittestst/date_time/local_time_tester.py 2006-05-17 19:07:20 UTC (rev 126) @@ -0,0 +1,605 @@ +#! /usr/bin/python +# Copyright 2004 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import date_time +from date_time import gregorian +from date_time import posix_time +from date_time import local_time +from date_time import to_iso_string +from date_time import to_simple_string +import unittest + +class tester_t( unittest.TestCase ): + def __init__( self, *args ): + unittest.TestCase.__init__( self, *args ) + + def test_clocks( self ): + az_tz = local_time.posix_time_zone("MST-07") + ny_tz = local_time.posix_time_zone("EST-05EDT,M4.1.0,M10.5.0") + print to_simple_string( posix_time.second_clock.local_time() ) + print local_time.local_sec_clock.local_time(az_tz).to_string() + print local_time.local_sec_clock.local_time(ny_tz).to_string() + + print to_simple_string( posix_time.microsec_clock.local_time() ) + print local_time.local_microsec_clock.local_time(az_tz).to_string() + print local_time.local_microsec_clock.local_time(ny_tz).to_string() + + def test_dst_transition_day_rule(self): + rule1 = local_time.partial_date_dst_rule( + gregorian.partial_date(30, date_time.Apr) + , gregorian.partial_date(30, date_time.Oct)) + self.failUnless( rule1.start_day(2001) == gregorian.date(2001, date_time.Apr, 30)) + self.failUnless( rule1.end_day(2001) == gregorian.date(2001, date_time.Oct, 30)) + + rule2 = local_time.first_last_dst_rule( + local_time.first_last_dst_rule.start_rule(date_time.Sunday, date_time.Apr) + , local_time.first_last_dst_rule.end_rule(date_time.Sunday, date_time.Oct)) + + self.failUnless( rule2.start_day(2001) == gregorian.date(2001, date_time.Apr, 1)) + self.failUnless( rule2.end_day(2001) == gregorian.date(2001, date_time.Oct, 28)) + + rule3 = local_time.last_last_dst_rule( + local_time.last_last_dst_rule.start_rule(date_time.Sunday, date_time.Mar) + , local_time.last_last_dst_rule.end_rule(date_time.Sunday, date_time.Oct)) + + self.failUnless( rule3.start_day(2001) == gregorian.date(2001, date_time.Mar, 25)) + self.failUnless( rule3.end_day(2001) == gregorian.date(2001, date_time.Oct, 28) ) + + nkday = gregorian.nth_kday_of_month + rule4 = local_time.nth_last_dst_rule( + local_time.nth_last_dst_rule.start_rule(nkday.first, date_time.Sunday, date_time.Mar) + , local_time.nth_last_dst_rule.end_rule(date_time.Sunday, date_time.Oct)) + + self.failUnless( rule4.start_day(2001) == gregorian.date(2001, date_time.Mar, 4)) + self.failUnless( rule4.end_day(2001) == gregorian.date(2001, date_time.Oct, 28)) + + rule5 = local_time.nth_kday_dst_rule( + local_time.nth_kday_dst_rule.start_rule(nkday.first, date_time.Sunday, date_time.Mar) + , local_time.nth_kday_dst_rule.end_rule(nkday.fourth, date_time.Sunday, date_time.Oct)) + + self.failUnless( rule5.start_day(2001) == gregorian.date(2001, date_time.Mar, 4)) + self.failUnless( rule5.end_day(2001) == gregorian.date(2001, date_time.Oct, 28)) + + def test_custom_time_zone( self ): + rule1 = local_time.partial_date_dst_rule( + gregorian.partial_date(30, date_time.Apr) + , gregorian.partial_date(30, date_time.Oct)) + + rule2 = local_time.first_last_dst_rule( + local_time.first_last_dst_rule.start_rule( date_time.Sunday, date_time.Apr) + , local_time.first_last_dst_rule.end_rule( date_time.Sunday, date_time.Oct)) + + rule3 = local_time.last_last_dst_rule( + local_time.last_last_dst_rule.start_rule(date_time.Sunday, date_time.Mar) + , local_time.last_last_dst_rule.end_rule(date_time.Sunday, date_time.Oct)) + + rule4 = None + + pst = local_time.time_zone_names( "Pacific Standard Time" + , "PST" + , "Pacific Daylight Time" + , "PDT" ) + + mst = local_time.time_zone_names( "Mountain Standard Time" + , "MST" + , "" + , "" ) + + of = local_time.dst_adjustment_offsets( posix_time.hours(1) + , posix_time.hours(2) + , posix_time.hours(2)) + of2 = local_time.dst_adjustment_offsets( posix_time.hours(0) + , posix_time.hours(0) + , posix_time.hours(0)) + + tz1 = local_time.custom_time_zone(pst, posix_time.hours(-8), of, rule1) + tz2 = local_time.custom_time_zone(pst, posix_time.hours(-8), of, rule2) + tz3 = local_time.custom_time_zone(pst, posix_time.hours(-8), of, rule3) + tz4 = local_time.custom_time_zone(mst, posix_time.hours(-7), of2, rule4) + + + self.failUnless( tz1.dst_zone_abbrev() == "PDT" ) + self.failUnless( tz1.std_zone_abbrev() == "PST" ) + self.failUnless( tz1.std_zone_name() == "Pacific Standard Time" ) + self.failUnless( tz1.dst_zone_name() == "Pacific Daylight Time" ) + + self.failUnless( tz1.dst_offset() == posix_time.hours(1) ) + self.failUnless( tz1.base_utc_offset() == posix_time.hours(-8) ) + self.failUnless( tz1.has_dst() ) + + self.failUnless( tz1.dst_local_start_time(2003) + == posix_time.ptime( gregorian.date(2003, date_time.Apr,30) + , posix_time.hours(2) ) ) + + self.failUnless( tz1.dst_local_end_time(2003) + == posix_time.ptime( gregorian.date(2003, date_time.Oct,30) + , posix_time.hours(2) ) ) + + + self.failUnless( tz1.to_posix_string() == "PST-08PDT+01,120/02:00,303/02:00") + self.failUnless( tz2.to_posix_string() == "PST-08PDT+01,M4.1.0/02:00,M10.5.0/02:00") + self.failUnless( tz3.to_posix_string() == "PST-08PDT+01,M3.5.0/02:00,M10.5.0/02:00") + self.failUnless( tz4.to_posix_string() == "MST-07") + + self.failUnless( not tz4.has_dst() ) + + self.failUnless( tz4.dst_local_start_time(2005) + == posix_time.ptime( date_time.not_a_date_time ) ) + + self.failUnless( tz4.dst_local_end_time(2005) + == posix_time.ptime( date_time.not_a_date_time ) ) + + def test_local_time_period( self ): + d1 = gregorian.date(2001, date_time.Jan, 1) + az_tz = local_time.posix_time_zone("MST-07") + + t1 = local_time.local_date_time( d1, posix_time.hours(2), az_tz, False) + t2 = local_time.local_date_time( d1, posix_time.hours(3), az_tz, False) + p1 = local_time.local_time_period( t1, t2 ) + p2 = local_time.local_time_period( t1, t2 ) + self.failUnless( p1 == p2 ) + + p4 = local_time.local_time_period( t1, posix_time.hours(1) ) + self.failUnless( p4.length() == posix_time.hours(1) ) + self.failUnless( p1 == p4 ) + self.failUnless( p1.begin() == t1 ) + self.failUnless( p1.end() == t2 ) + self.failUnless( p1.last() == t2 - posix_time.time_duration.unit() ) + self.failUnless( p1.contains( t1 ) ) + self.failUnless( not p1.contains( t2 ) ) + self.failUnless( p1.contains( t2 - posix_time.seconds(1) ) ) + + t3 = local_time.local_date_time( gregorian.date(2001, date_time.Jan,1) + , posix_time.hours(4) + , az_tz + , False ) + p5 = local_time.local_time_period( t2, t3 ) + self.failUnless( not p1.contains( p5.begin() ) ) + self.failUnless( not p5.contains( p1.begin() ) ) + self.failUnless( not( p1 == p5 ) ) + self.failUnless( p1 < p5 ) + self.failUnless( p5 > p1 ) + self.failUnless( p5 != p1 ) + self.failUnless( p1.intersects(p1) ) + self.failUnless( not p1.intersects(p5) ) + self.failUnless( not p5.intersects(p1) ) + + p6 = local_time.local_time_period( t2, t3 ) + p6.shift( posix_time.minutes(30) ) + self.failUnless( p5.intersects(p6) ) + self.failUnless( p6.intersects(p5) ) + self.failUnless( p5.contains( p6.begin() ) ) + p6.shift( posix_time.minutes(30) ) + self.failUnless( not p5.intersects(p6) ) + self.failUnless( not p6.intersects(p5) ) + p6.shift( posix_time.minutes(-30) ) + + p7 = p5.intersection(p6) + + self.failUnless( p7 == local_time.local_time_period( + local_time.local_date_time( d1 + , posix_time.time_duration(3,30,0) + , az_tz, False) + , local_time.local_date_time( d1 + , posix_time.time_duration(4,0,0) + , az_tz + , False) ) ) + + def test_time_zone(self): + rule1 = local_time.partial_date_dst_rule( + gregorian.partial_date(30, date_time.Apr) + , gregorian.partial_date(30, date_time.Oct) ) + + rule2 = local_time.first_last_dst_rule( + local_time.first_last_dst_rule.start_rule( date_time.Sunday, date_time.Apr) + , local_time.first_last_dst_rule.end_rule( date_time.Sunday, date_time.Oct)) + + rule3 = local_time.last_last_dst_rule( + local_time.last_last_dst_rule.start_rule( date_time.Sunday, date_time.Mar) + , local_time.last_last_dst_rule.end_rule( date_time.Sunday, date_time.Oct)) + rule4 = None + + pst = local_time.time_zone_names( "Pacific Standard Time" + , "PST" + , "Pacific Daylight Time" + , "PDT") + mst = local_time.time_zone_names("Mountain Standard Time", "MST", "" , "") + + of = local_time.dst_adjustment_offsets( + posix_time.hours(1) + , posix_time.hours(2) + , posix_time.hours(2) ) + + of2 = local_time.dst_adjustment_offsets( + posix_time.hours(0) + , posix_time.hours(0) + , posix_time.hours(0) ) + + tz1 = local_time.time_zone(pst, posix_time.hours(-8), of, rule1) + tz2 = local_time.time_zone(pst, posix_time.hours(-8), of, rule2) + tz3 = local_time.time_zone(pst, posix_time.hours(-8), of, rule3) + tz4 = local_time.time_zone(mst, posix_time.hours(-7), of2, rule4) + + self.failUnless( tz1.dst_zone_abbrev() == "PDT") + self.failUnless( tz1.std_zone_abbrev() == "PST") + self.failUnless( tz1.std_zone_name() == "Pacific Standard Time") + self.failUnless( tz1.dst_zone_name() == "Pacific Daylight Time") + + self.failUnless( tz1.dst_offset() == posix_time.hours(1) ) + self.failUnless( tz1.base_utc_offset() == posix_time.hours(-8) ) + self.failUnless( tz1.has_dst() ) + + self.failUnless( tz1.dst_local_start_time(2003) + == posix_time.ptime( gregorian.date(2003, date_time.Apr,30) + , posix_time.hours(2) ) ) + + self.failUnless( tz1.dst_local_end_time(2003) + == posix_time.ptime( gregorian.date(2003, date_time.Oct,30) + ,posix_time.hours(2) ) ) + + self.failUnless( tz1.to_posix_string() == "PST-08PDT+01,120/02:00,303/02:00" ) + self.failUnless( tz2.to_posix_string() == "PST-08PDT+01,M4.1.0/02:00,M10.5.0/02:00") + self.failUnless( tz3.to_posix_string() == "PST-08PDT+01,M3.5.0/02:00,M10.5.0/02:00") + self.failUnless( tz4.to_posix_string() == "MST-07") + + self.failUnless( not tz4.has_dst() ) + self.failUnless( tz4.dst_local_start_time(2005) + == posix_time.ptime( date_time.not_a_date_time ) ) + self.failUnless( tz4.dst_local_end_time(2005) + == posix_time.ptime( date_time.not_a_date_time ) ) + + def test_tz_database(self): + tz_db = local_time.time_zone_database() + tz_db.load_from_file( os.path.join( os.path.split( date_time.__file__ )[0] + , 'date_time_zonespec.csv' ) ) + + + self.failUnless( not tz_db.time_zone_from_region("Invalid/name") ) + + nyc_test = tz_db.time_zone_from_region("America/New_York") + self.failUnless( nyc_test ) + self.failUnless( nyc_test.std_zone_abbrev() == "EST" ) + self.failUnless( nyc_test.std_zone_name() == "Eastern Standard Time" ) + self.failUnless( nyc_test.dst_zone_abbrev() == "EDT" ) + self.failUnless( nyc_test.dst_zone_name() == "Eastern Daylight Time" ) + self.failUnless( nyc_test.base_utc_offset() == posix_time.hours(-5) ) + self.failUnless( nyc_test.dst_offset() == posix_time.hours(1) ) + self.failUnless( nyc_test.dst_local_start_time(2004) + == posix_time.ptime( gregorian.date(2004, date_time.Apr, 4) + , posix_time.hours(2) ) ) + self.failUnless( nyc_test.dst_local_end_time(2004) + == posix_time.ptime( gregorian.date(2004, date_time.Oct, 31) + , posix_time.hours(2) ) ) + self.failUnless( nyc_test.has_dst() ) + + phx_test = tz_db.time_zone_from_region("America/Phoenix") + self.failUnless( phx_test ) + self.failUnless( phx_test.std_zone_abbrev() == "MST" ) + self.failUnless( phx_test.std_zone_name() == "Mountain Standard Time" ) + self.failUnless( phx_test.dst_zone_abbrev() == "" ) + self.failUnless( phx_test.dst_zone_name() == "" ) + self.failUnless( phx_test.base_utc_offset() == posix_time.hours(-7) ) + self.failUnless( phx_test.dst_offset() == posix_time.hours(0) ) + self.failUnless( phx_test.has_dst() == False) + + + eastern = local_time.posix_time_zone("EST-05:00:00EDT+01:00:00,M4.1.0/02:00:00,M10.5.0/02:00:00") + tz_db.add_record("United States/Eastern", eastern) + eastern_test = tz_db.time_zone_from_region("United States/Eastern" ) + self.failUnless( eastern_test ) + self.failUnless( eastern_test.std_zone_abbrev() == "EST" ) + self.failUnless( eastern_test.std_zone_name() == "EST" ) + self.failUnless( eastern_test.dst_zone_abbrev() == "EDT" ) + self.failUnless( eastern_test.dst_zone_name() == "EDT" ) + self.failUnless( eastern_test.base_utc_offset() == posix_time.hours(-5) ) + self.failUnless( eastern_test.dst_local_start_time(2004) + == posix_time.ptime( gregorian.date(2004, date_time.Apr, 4) + , posix_time.hours(2) ) ) + self.failUnless( eastern_test.dst_local_end_time(2004) + == posix_time.ptime( gregorian.date(2004, date_time.Oct, 31) + , posix_time.hours(2) ) ) + self.failUnless( eastern_test.has_dst() ) + + def test_posix_time_zone(self): + specs = [ "MST-07" + , "MST-07:00:00" + , "EST-05EDT,M4.1.0,M10.5.0" + , "EST-05:00:00EDT+01:00:00,M4.1.0/02:00:00,M10.5.0/02:00:00" + , "PST-08PDT,J46/1:30,J310" + , "PST-08PDT,45,310/0:30:00" ] + + nyc1 = local_time.posix_time_zone( specs[2] ) + nyc2 = local_time.posix_time_zone( specs[3] ) + + td = posix_time.hours(-5) + self.failUnless( nyc1.has_dst() and nyc2.has_dst() ) + self.failUnless( nyc1.base_utc_offset() == td ) + self.failUnless( nyc1.base_utc_offset() == nyc2.base_utc_offset() ) + self.failUnless( nyc1.std_zone_abbrev() == "EST" ) + self.failUnless( nyc2.std_zone_abbrev() == "EST" ) + self.failUnless( nyc1.dst_zone_abbrev() == "EDT" ) + self.failUnless( nyc2.dst_zone_abbrev() == "EDT" ) + self.failUnless( nyc1.std_zone_name() == "EST" ) + self.failUnless( nyc2.std_zone_name() == "EST" ) + self.failUnless( nyc1.dst_zone_name() == "EDT" ) + self.failUnless( nyc2.dst_zone_name() == "EDT... [truncated message content] |
From: <rom...@us...> - 2006-05-17 18:35:03
|
Revision: 125 Author: roman_yakovenko Date: 2006-05-17 11:34:54 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=125&view=rev Log Message: ----------- move unittests to pyboost Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/pyboost/ Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/unittests/ Copied: pyplusplus_dev/examples/pyboost_dev/pyboost (from rev 123, pyplusplus_dev/examples/pyboost_dev/unittests) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 18:33:32
|
Revision: 124 Author: roman_yakovenko Date: 2006-05-17 11:33:22 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=124&view=rev Log Message: ----------- move pyboost to dev Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/dev/ Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/pyboost/ Copied: pyplusplus_dev/examples/pyboost_dev/dev (from rev 123, pyplusplus_dev/examples/pyboost_dev/pyboost) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 12:39:49
|
Revision: 123 Author: roman_yakovenko Date: 2006-05-17 05:39:32 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=123&view=rev Log Message: ----------- Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/unittests/random/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 12:25:37
|
Revision: 122 Author: roman_yakovenko Date: 2006-05-17 05:25:07 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=122&view=rev Log Message: ----------- boost_random is almost ready Unit tests is the only missing thing Modified Paths: -------------- pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/random_settings.py pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/sconscript pyplusplus_dev/examples/pyboost_dev/sconstruct pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/__init__.py pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/unittests/test_all.py Modified: pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/random_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/random_settings.py 2006-05-17 06:51:13 UTC (rev 121) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/random_settings.py 2006-05-17 12:25:07 UTC (rev 122) @@ -16,12 +16,7 @@ module_name = '_random_' working_dir = _script_dir generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'random' ) +unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'boost_random' ) defined_symbols = [ 'BOOST_NO_INCLASS_MEMBER_INITIALIZATION', 'BOOST_NO_INT64_T' ] undefined_symbols = [ '__MINGW32__' ] -#defined_symbols = ['BOOST_DATE_TIME_NO_MEMBER_INIT'] -#if sys.platform == 'win32': - #defined_symbols.extend( [ 'BOOST_DATE_TIME_DYN_LINK' ] ) - - \ No newline at end of file Modified: pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/sconscript 2006-05-17 06:51:13 UTC (rev 121) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/boost_random/sconscript 2006-05-17 12:25:07 UTC (rev 122) @@ -32,4 +32,4 @@ _random_ = local_env.SharedLibrary( target=random_settings.module_name , source=get_source_files() ) -local_env.Install( '#unittests/random', _random_ ) +local_env.Install( '#unittests/boost_random', _random_ ) Modified: pyplusplus_dev/examples/pyboost_dev/sconstruct =================================================================== --- pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-17 06:51:13 UTC (rev 121) +++ pyplusplus_dev/examples/pyboost_dev/sconstruct 2006-05-17 12:25:07 UTC (rev 122) @@ -19,5 +19,5 @@ Export( 'env' ) env.SConscript( ['pyboost/date_time/sconscript'] ) env.SConscript( ['pyboost/crc/sconscript'] ) -env.SConscript( ['pyboost/random/sconscript'] ) +env.SConscript( ['pyboost/boost_random/sconscript'] ) env.SConscript( ['pyboost/rational/sconscript'] ) \ No newline at end of file Modified: pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/__init__.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/__init__.py 2006-05-17 06:51:13 UTC (rev 121) +++ pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/__init__.py 2006-05-17 12:25:07 UTC (rev 122) @@ -6,6 +6,10 @@ import _random_ +#TODO: +# normal_distribution, cauchy_distribution +# are missed default argument + #generators: from _random_ import ecuyer1988 from _random_ import hellekalek1995 @@ -488,5 +492,17 @@ if not valid_distrs.has_key( dcls ): raise RuntimeError( 'Unable to create variate_generator(%s, %s) - takoe sochetanie does not exist!' % ( gcls.__name__, dcls.__name__ ) ) - return valid_distrs[dcls] + return valid_distrs[dcls]( generator, distribution ) +def variate_generator_exists( generator, distribution ): + global __vg + global distributions + gcls = generator.__class__ + if not __vg.has_key( gcls ): + return False + dcls = distribution.__class__ + if dcls not in distributions: + return False + + valid_distrs = __vg[ gcls ] + return valid_distrs.has_key( dcls ) Modified: pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/unittests/test_all.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/unittests/test_all.py 2006-05-17 06:51:13 UTC (rev 121) +++ pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/unittests/test_all.py 2006-05-17 12:25:07 UTC (rev 122) @@ -7,15 +7,64 @@ import sys sys.path.append( '../..' ) -import random -print random.__path__ +import boost_random import unittest class tester_t( unittest.TestCase ): def __init__( self, *args ): unittest.TestCase.__init__( self, *args ) + def randomness_tester( self, generator, count=1000 ): + generated = set() + for i in range( count ): + value = generator() + generated.add( value ) + self.failUnless( len( generated ) >= count * 0.9 ) + def generator_tester( self, gclass, *args ): + gen = gclass() + self.randomness_tester( gen ) + print '\nname : ', gen.__class__.__name__ + print ' max: ', gen.max() + print ' min: ', gen.min() + gen = gclass( *args ) + self.randomness_tester( gen ) + gen.seed() + self.randomness_tester( gen ) + + def test_generators(self): + for gclass in boost_random.generators: + self.generator_tester(gclass) + + def instantiate_dist( self, urng, dist ): + if not boost_random.variate_generator_exists( urng, dist ): + return + + gen1 = boost_random.variate_generator( urng, dist) + gen2 = boost_random.variate_generator( urng, dist) + self.randomness_tester( gen1 ) + self.randomness_tester( gen2 ) + self.failUnless( abs( gen1() - gen2() ) < 1e-6 ) + gen1.engine() + gen1.distribution().reset() + gen2.engine() + gen2.distribution().reset() + + def instantiate_real_dist( self, urng ): + self.instantiate_dist(urng, boost_random.uniform_real(0, 2.1) ) + self.instantiate_dist(urng, boost_random.triangle_distribution(1, 1.5, 7) ) + self.instantiate_dist(urng, boost_random.exponential_distribution(5) ) + self.instantiate_dist(urng, boost_random.normal_distribution(0,1) ) + #self.instantiate_dist(urng, boost_random.normal_distribution() ) + self.instantiate_dist(urng, boost_random.lognormal_distribution(1, 1) ) + self.instantiate_dist(urng, boost_random.cauchy_distribution(1, 1) ) + self.instantiate_dist(urng, boost_random.gamma_distribution(1) ) + + def test_distributions( self ): + for gclass in boost_random.generators: + self.instantiate_real_dist( gclass() ) + + def create_suite(): suite = unittest.TestSuite() suite.addTest( unittest.makeSuite(tester_t) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 06:51:20
|
Revision: 121 Author: roman_yakovenko Date: 2006-05-16 23:51:13 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=121&view=rev Log Message: ----------- adding missing import Modified Paths: -------------- pyplusplus_dev/pyplusplus/module_builder/builder.py Modified: pyplusplus_dev/pyplusplus/module_builder/builder.py =================================================================== --- pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-05-17 06:41:00 UTC (rev 120) +++ pyplusplus_dev/pyplusplus/module_builder/builder.py 2006-05-17 06:51:13 UTC (rev 121) @@ -4,6 +4,7 @@ # http://www.boost.org/LICENSE_1_0.txt) import os +import sys import time import types from sets import Set as set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 06:41:10
|
Revision: 120 Author: roman_yakovenko Date: 2006-05-16 23:41:00 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=120&view=rev Log Message: ----------- rename random to boost_random Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 06:39:24
|
Revision: 119 Author: roman_yakovenko Date: 2006-05-16 23:39:18 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=119&view=rev Log Message: ----------- Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/unittests/brandom/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 06:39:04
|
Revision: 118 Author: roman_yakovenko Date: 2006-05-16 23:38:55 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=118&view=rev Log Message: ----------- rename random to boost_random Added Paths: ----------- pyplusplus_dev/examples/pyboost_dev/unittests/boost_random/ Copied: pyplusplus_dev/examples/pyboost_dev/unittests/boost_random (from rev 113, pyplusplus_dev/examples/pyboost_dev/unittests/brandom) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rom...@us...> - 2006-05-17 06:38:27
|
Revision: 117 Author: roman_yakovenko Date: 2006-05-16 23:38:20 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=117&view=rev Log Message: ----------- Removed Paths: ------------- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/generate_code.py pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_export.hpp pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_settings.py pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/sconscript Deleted: pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/generate_code.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/generate_code.py 2006-05-17 06:38:02 UTC (rev 116) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/generate_code.py 2006-05-17 06:38:20 UTC (rev 117) @@ -1,169 +0,0 @@ -#! /usr/bin/python -# Copyright 2004 Roman Yakovenko. -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - - -import os -import sys -import time -import shutil -import logging -import random_settings -from pygccxml import parser -from pygccxml import declarations -from pyplusplus import module_builder -from pyplusplus.module_builder import call_policies - - -LICENSE = """// Copyright 2004 Roman Yakovenko. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -""" - -class code_generator_t(object): - def __init__(self): - module_builder.set_logger_level( logging.INFO ) - self.__file = os.path.join( random_settings.working_dir, 'random_export.hpp' ) - self.__mb = module_builder.module_builder_t( - [ parser.create_cached_source_fc( - self.__file - , os.path.join( random_settings.generated_files_dir, 'random.xml' ) ) ] - , gccxml_path=random_settings.gccxml.executable - , include_paths=[random_settings.boost.include] - , define_symbols=random_settings.defined_symbols - , undefine_symbols=random_settings.undefined_symbols) - self.generators = [ "ecuyer1988" - , "hellekalek1995" - , "kreutzer1986" - , "lagged_fibonacci1279" - , "lagged_fibonacci19937" - , "lagged_fibonacci2281" - , "lagged_fibonacci23209" - , "lagged_fibonacci3217" - , "lagged_fibonacci4423" - , "lagged_fibonacci44497" - , "lagged_fibonacci607" - , "lagged_fibonacci9689" - , "minstd_rand" - , "minstd_rand0" - , "mt11213b" - , "mt19937" - , "ranlux3" - , "ranlux3_01" - , "ranlux4" - , "ranlux4_01" - , "ranlux64_3_01" - , "ranlux64_4_01" - , "taus88" ] - - self.no_min_max = [ 'py_cauchy_distribution' - , 'py_bernoulli_distribution' - , 'py_binomial_distribution' - , 'py_poisson_distribution' - , 'py_normal_distribution' - , 'py_gamma_distribution' - , 'py_triangle_distribution' - , 'py_uniform_on_sphere' - , 'py_exponential_distribution' - , 'py_geometric_distribution' - , 'py_lognormal_distribution' - ] - - def typedef2class( self, scope, name ): - typedef = scope.typedef( name ) - return typedef.type.declaration - - def filter_declarations(self ): - self.__mb.global_ns.exclude() - boost_ns = self.__mb.global_ns.namespace( 'boost', recursive=False ) - for name in self.generators: - gen_cls = self.typedef2class( boost_ns, name ) - gen_cls.include() - #TODO: find out why compiler complains - gen_cls.member_functions( 'seed' ).create_with_signature = True - - pyimpl_ns = boost_ns.namespace( 'pyimpl' ) - helpers = pyimpl_ns.classes( lambda decl: decl.name.startswith( 'py_') ) - helpers.include() - for helper in helpers: - distrib_cls = self.typedef2class( helper, "distribution" ) - distrib_cls.include() - var_gen_typedefs = helper.typedefs( lambda decl: decl.name.startswith( 'variate_generator_' ) ) - for var_gen_typedef in var_gen_typedefs: - var_gen_cls = var_gen_typedef.type.declaration - var_gen_cls.include() - var_gen_cls.member_operators( symbol='()' ).create_with_signature = True - if helper.name in self.no_min_max: - var_gen_cls.member_function( 'max' ).exclude() - var_gen_cls.member_function( 'min' ).exclude() - - ecuyer1988 = self.typedef2class( boost_ns, 'ecuyer1988' ) - ecuyer1988.member_function( 'seed', arg_types=[None, None] ).exclude() - - def prepare_declarations( self ): - boost_ns = self.__mb.namespace( 'boost' ) - for name in self.generators: - gen_cls = self.typedef2class( boost_ns, name ) - gen_cls.alias = name - - pyimpl_ns = boost_ns.namespace( 'pyimpl' ) - helpers = pyimpl_ns.classes( lambda decl: decl.name.startswith( 'py_') ) - for helper in helpers: - distrib_cls = self.typedef2class( helper, "distribution" ) - distrib_cls.alias = helper.name[3:] #py_ - var_gen_typedefs = helper.typedefs( lambda decl: decl.name.startswith( 'variate_generator_' ) ) - for var_gen_typedef in var_gen_typedefs: - var_gen_cls = var_gen_typedef.type.declaration - var_gen_cls.alias = var_gen_typedef.name + '__' + distrib_cls.alias - - self.set_call_policies() - - def set_call_policies( self ): - boost_ns = self.__mb.namespace( 'boost' ) - engine_funcs = boost_ns.member_functions( name="engine" - , function=lambda decl: not decl.has_const ) - engine_funcs.call_policies = call_policies.return_internal_reference() - - distribution_funcs = boost_ns.member_functions( name="distribution" - , function=lambda decl: not decl.has_const ) - distribution_funcs.call_policies = call_policies.return_internal_reference() - - - - def customize_extmodule( self ): - global LICENSE - extmodule = self.__mb.code_creator - #beautifying include code generation - extmodule.license = LICENSE - extmodule.user_defined_directories.append( random_settings.boost.include ) - extmodule.user_defined_directories.append( random_settings.working_dir ) - extmodule.user_defined_directories.append( random_settings.generated_files_dir ) - extmodule.precompiled_header = 'boost/python.hpp' - extmodule.replace_included_headers( ['boost/random.hpp', 'boost/nondet_random.hpp', 'random_export.hpp' ] ) - - def write_files( self ): - #self.__mb.write_module( os.path.join( random_settings.generated_files_dir, 'random.pypp.cpp' ) ) - self.__mb.split_module( random_settings.generated_files_dir ) - - def create(self): - start_time = time.clock() - self.filter_declarations() - self.prepare_declarations() - self.__mb.build_code_creator( random_settings.module_name ) - - self.customize_extmodule() - self.write_files( ) - print 'time taken : ', time.clock() - start_time, ' seconds' - -def export(): - cg = code_generator_t() - cg.create() - -if __name__ == '__main__': - export() - print 'done' - - Deleted: pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_export.hpp =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_export.hpp 2006-05-17 06:38:02 UTC (rev 116) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_export.hpp 2006-05-17 06:38:20 UTC (rev 117) @@ -1,472 +0,0 @@ -#include <boost/random.hpp> - -namespace boost{ namespace random{ namespace pyimpl{ - -struct generators{ - static void instantiate(){ - sizeof( ecuyer1988 ); - sizeof( hellekalek1995 ); - sizeof( kreutzer1986 ); - sizeof( lagged_fibonacci1279 ); - sizeof( lagged_fibonacci19937 ); - sizeof( lagged_fibonacci2281 ); - sizeof( lagged_fibonacci23209 ); - sizeof( lagged_fibonacci3217 ); - sizeof( lagged_fibonacci4423 ); - sizeof( lagged_fibonacci44497 ); - sizeof( lagged_fibonacci607 ); - sizeof( lagged_fibonacci9689 ); - sizeof( minstd_rand ); - sizeof( minstd_rand0 ); - sizeof( mt11213b ); - sizeof( mt19937 ); - sizeof( ranlux3 ); - sizeof( ranlux3_01 ); - sizeof( ranlux4 ); - sizeof( ranlux4_01 ); - sizeof( ranlux64_3_01 ); - sizeof( ranlux64_4_01 ); - sizeof( taus88 ); - } -}; - -#define CREATE_INSTANTIATION( GENERATOR_TYPE ) \ - static result_type \ - inline call( distribution& dist, GENERATOR_TYPE& gen ){ \ - return dist( gen ); \ - } \ - \ - typedef variate_generator< GENERATOR_TYPE, distribution > variate_generator_##GENERATOR_TYPE; \ - \ - variate_generator< GENERATOR_TYPE, distribution > \ - create_vg(distribution dist, GENERATOR_TYPE gen ){ \ - return variate_generator< GENERATOR_TYPE, distribution >(gen, dist); \ - } - -struct py_uniform_smallint{ - - typedef uniform_smallint<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - //CREATE_INSTANTIATION( lagged_fibonacci1279 ); - //CREATE_INSTANTIATION( lagged_fibonacci19937 ); - //CREATE_INSTANTIATION( lagged_fibonacci2281 ); - //CREATE_INSTANTIATION( lagged_fibonacci23209 ); - //CREATE_INSTANTIATION( lagged_fibonacci3217 ); - //CREATE_INSTANTIATION( lagged_fibonacci4423 ); - //CREATE_INSTANTIATION( lagged_fibonacci44497 ); - //CREATE_INSTANTIATION( lagged_fibonacci607 ); - //CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - //CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - //CREATE_INSTANTIATION( ranlux4_01 ); - //CREATE_INSTANTIATION( ranlux64_3_01 ); - //CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_uniform_int{ - - typedef uniform_int<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - //CREATE_INSTANTIATION( lagged_fibonacci1279 ); - //CREATE_INSTANTIATION( lagged_fibonacci19937 ); - //CREATE_INSTANTIATION( lagged_fibonacci2281 ); - //CREATE_INSTANTIATION( lagged_fibonacci23209 ); - //CREATE_INSTANTIATION( lagged_fibonacci3217 ); - //CREATE_INSTANTIATION( lagged_fibonacci4423 ); - //CREATE_INSTANTIATION( lagged_fibonacci44497 ); - //CREATE_INSTANTIATION( lagged_fibonacci607 ); - //CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - //CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - //CREATE_INSTANTIATION( ranlux4_01 ); - //CREATE_INSTANTIATION( ranlux64_3_01 ); - //CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - - -struct py_uniform_real{ - - typedef uniform_real<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_bernoulli_distribution{ - - typedef bernoulli_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - - -struct py_geometric_distribution{ - - typedef geometric_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_triangle_distribution{ - - typedef triangle_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - - -struct py_exponential_distribution{ - - typedef exponential_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - - -struct py_normal_distribution{ - - typedef normal_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_uniform_on_sphere{ - - typedef uniform_on_sphere<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_lognormal_distribution{ - - typedef lognormal_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_gamma_distribution{ - - typedef gamma_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_binomial_distribution{ - - typedef binomial_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_poisson_distribution{ - - typedef poisson_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -struct py_cauchy_distribution{ - - typedef cauchy_distribution<> distribution; - typedef distribution::result_type result_type; - - CREATE_INSTANTIATION( ecuyer1988 ); - CREATE_INSTANTIATION( hellekalek1995 ); - CREATE_INSTANTIATION( kreutzer1986 ); - CREATE_INSTANTIATION( lagged_fibonacci1279 ); - CREATE_INSTANTIATION( lagged_fibonacci19937 ); - CREATE_INSTANTIATION( lagged_fibonacci2281 ); - CREATE_INSTANTIATION( lagged_fibonacci23209 ); - CREATE_INSTANTIATION( lagged_fibonacci3217 ); - CREATE_INSTANTIATION( lagged_fibonacci4423 ); - CREATE_INSTANTIATION( lagged_fibonacci44497 ); - CREATE_INSTANTIATION( lagged_fibonacci607 ); - CREATE_INSTANTIATION( lagged_fibonacci9689 ); - CREATE_INSTANTIATION( minstd_rand ); - CREATE_INSTANTIATION( minstd_rand0 ); - CREATE_INSTANTIATION( mt11213b ); - CREATE_INSTANTIATION( mt19937 ); - CREATE_INSTANTIATION( ranlux3 ); - CREATE_INSTANTIATION( ranlux3_01 ); - CREATE_INSTANTIATION( ranlux4 ); - CREATE_INSTANTIATION( ranlux4_01 ); - CREATE_INSTANTIATION( ranlux64_3_01 ); - CREATE_INSTANTIATION( ranlux64_4_01 ); - CREATE_INSTANTIATION( taus88 ); -}; - -} } } - - Deleted: pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_settings.py =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_settings.py 2006-05-17 06:38:02 UTC (rev 116) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/random_settings.py 2006-05-17 06:38:20 UTC (rev 117) @@ -1,27 +0,0 @@ -#! /usr/bin/python -# Copyright 2004 Roman Yakovenko. -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -import os -import sys - -_script_dir = os.path.abspath( os.getcwd() ) -environment_path = os.path.realpath( os.path.join( _script_dir, '..', '..', '..', '..' ) ) -sys.path.append( environment_path ) - -from environment import boost, scons, gccxml, python - -module_name = '_random_' -working_dir = _script_dir -generated_files_dir = os.path.join( _script_dir, 'generated' ) -unittests_dir = os.path.join( _script_dir, '..', '..', 'unittests', 'random' ) - -defined_symbols = [ 'BOOST_NO_INCLASS_MEMBER_INITIALIZATION', 'BOOST_NO_INT64_T' ] -undefined_symbols = [ '__MINGW32__' ] -#defined_symbols = ['BOOST_DATE_TIME_NO_MEMBER_INIT'] -#if sys.platform == 'win32': - #defined_symbols.extend( [ 'BOOST_DATE_TIME_DYN_LINK' ] ) - - \ No newline at end of file Deleted: pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/sconscript =================================================================== --- pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/sconscript 2006-05-17 06:38:02 UTC (rev 116) +++ pyplusplus_dev/examples/pyboost_dev/pyboost/brandom/sconscript 2006-05-17 06:38:20 UTC (rev 117) @@ -1,35 +0,0 @@ -#! /usr/bin/python -# Copyright 2004 Roman Yakovenko. -# Distributed under the Boost Software License, Version 1.0. (See -# accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -import os -import sys -import random_settings - -Import( 'env' ) - -def get_ccflags(): - if sys.platform == 'win32': - return random_settings.scons.ccflags \ - + map( lambda ds: '/D%s' % ds, random_settings.defined_symbols ) - else: - return map( lambda ds: '-D' + ds, random_settings.defined_symbols ) - -def get_source_files(): - source_files = filter( lambda s: s.endswith( '.cpp' ), os.listdir(random_settings.generated_files_dir) ) - return map( lambda fname: os.path.join( random_settings.generated_files_dir, fname ), source_files ) - -def get_target(): - return os.path.join( random_settings.generated_files_dir - , random_settings.module_name + random_settings.scons.suffix ) - -local_env = env.Copy() -local_env.Append( CPPPATH=[ random_settings.working_dir, random_settings.generated_files_dir ] ) -local_env.Append( CCFLAGS=get_ccflags() ) - -_random_ = local_env.SharedLibrary( target=random_settings.module_name - , source=get_source_files() ) - -local_env.Install( '#unittests/random', _random_ ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |