Update of /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17784/pyplusplus/examples/py_date_time
Modified Files:
_date_time_.suo create_date_time.py customization_data.py
Log Message:
updating examples
Index: customization_data.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/customization_data.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** customization_data.py 19 Mar 2006 13:35:39 -0000 1.14
--- customization_data.py 29 Mar 2006 07:03:54 -0000 1.15
***************
*** 28,32 ****
! aliases = {
"months_duration<boost::gregorian::greg_durations_config>"
: "months"
--- 28,32 ----
! name2alias = {
"months_duration<boost::gregorian::greg_durations_config>"
: "months"
***************
*** 185,190 ****
, "dst_calculator<boost::gregorian::date,boost::posix_time::time_duration>"
: "dst_calculator"
- #, "tz_db_base<boost::local_time::custom_time_zone,boost::date_time::day_calc_dst_rule<boost::local_time::nth_kday_rule_spec> >"
- # : "tz_database"
, "microsec_clock<boost::local_time::local_date_time_base<boost::posix_time::ptime, boost::date_time::time_zone_base<boost::posix_time::ptime, char> > >"
: "local_microsec_clock"
--- 185,188 ----
***************
*** 204,213 ****
if sys.platform == 'win32':
! aliases[ "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> >" ] \
= "time_duration_impl"
else:
! aliases[ "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> >" ] \
= "time_duration_impl"
#may be those names are uglier, but they are much short
ns_aliases = {
--- 202,215 ----
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 int> >" ] \
= "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, micro, 1000000, 6, int> >" ] \
= "time_duration_impl"
+ alias2name = {}
+ for name, alias in name2alias.items():
+ alias2name[ alias ] = name
+
#may be those names are uglier, but they are much short
ns_aliases = {
Index: create_date_time.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/create_date_time.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** create_date_time.py 29 Mar 2006 04:26:57 -0000 1.34
--- create_date_time.py 29 Mar 2006 07:03:54 -0000 1.35
***************
*** 20,38 ****
def __init__(self):
self.__destination_dir = settings.working_dir
! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' )
! self.__aliases = customization_data.aliases
! self.__includes = customization_data.includes
! self.__ns_aliases = customization_data.ns_aliases
def _create_xml_file( self ):
#On windows I have some problems to compile boost.date_time
#library, so I will use xml files generated on linux
! parser_config \
! = parser.config_t( gccxml_path=settings.gccxml_path
! , include_paths=[settings.boost_path]
! , define_symbols=settings.defined_symbols
! , undefine_symbols=settings.undefined_symbols )
! reader = parser.source_reader_t( )
destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' )
if sys.platform == 'linux2':
--- 20,34 ----
def __init__(self):
self.__destination_dir = settings.working_dir
! self.__file = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.hpp' )
def _create_xml_file( self ):
#On windows I have some problems to compile boost.date_time
#library, so I will use xml files generated on linux
! config = parser.config_t( gccxml_path=settings.gccxml_path
! , include_paths=[settings.boost_path]
! , define_symbols=settings.defined_symbols
! , undefine_symbols=settings.undefined_symbols )
! reader = parser.source_reader_t( config )
destination = os.path.join( settings.date_time_pypp_include, 'date_time.pypp.xml' )
if sys.platform == 'linux2':
***************
*** 56,60 ****
mb.run_query_optimizer()
! for name, alias in self.__aliases.items():
decl = mb.class_( name )
decl.alias = alias
--- 52,56 ----
mb.run_query_optimizer()
! for name, alias in customization_data.name2alias.items():
decl = mb.class_( name )
decl.alias = alias
***************
*** 87,91 ****
, 'counted_time_rep<'
, 'date_facet<'
- , 'time_facet<'
, 'period_formatter<'
, 'date_generator_formatter<'
--- 83,86 ----
***************
*** 94,107 ****
boost_ns.classes( lambda decl: decl.name.startswith( name ) ).exclude()
! ends_with = [ '_impl', '_traits', '_config', '_formatter']
! for name in starts_with:
boost_ns.classes( lambda decl: decl.name.endswith( name ) ).exclude()
! #boost.date_time has problem to create local_[micro]sec_clock
! #variable, it has nothing to do with pyplusplus
empty_classes = ['local_microsec_clock', 'local_sec_clock' ]
! classes = boost_ns.classes( lambda decl: decl.alias in empty_classes )
! classes.exclude()
! classes.ignore = False
tdi = mb.class_( lambda decl: decl.alias == 'time_duration_impl' )
--- 89,103 ----
boost_ns.classes( lambda decl: decl.name.startswith( name ) ).exclude()
! ends_with = [ '_impl', '_config']
! for name in ends_with:
boost_ns.classes( lambda decl: decl.name.endswith( name ) ).exclude()
! #~ #boost.date_time has problem to create local_[micro]sec_clock
! #~ #variable, it has nothing to do with pyplusplus
empty_classes = ['local_microsec_clock', 'local_sec_clock' ]
! for alias in empty_classes:
! class_ = boost_ns.class_( customization_data.alias2name[alias] )
! class_.exclude()
! class_.ignore = False
tdi = mb.class_( lambda decl: decl.alias == 'time_duration_impl' )
***************
*** 162,166 ****
includes = includes[1:] #all includes except boost\python.hpp
map( lambda creator: extmodule.remove_creator( creator ), includes )
! for include_header in self.__includes:
extmodule.adopt_include( code_creators.include_t( header=include_header ) )
--- 158,162 ----
includes = includes[1:] #all includes except boost\python.hpp
map( lambda creator: extmodule.remove_creator( creator ), includes )
! for include_header in customization_data.includes:
extmodule.adopt_include( code_creators.include_t( header=include_header ) )
***************
*** 196,200 ****
position += 1
! for full_ns_name, alias in self.__ns_aliases.items():
creator = code_creators.namespace_alias_t( alias=alias
, full_namespace_name=full_ns_name )
--- 192,196 ----
position += 1
! for full_ns_name, alias in customization_data.ns_aliases.items():
creator = code_creators.namespace_alias_t( alias=alias
, full_namespace_name=full_ns_name )
Index: _date_time_.suo
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/examples/py_date_time/_date_time_.suo,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
Binary files /tmp/cvsFpKeQ0 and /tmp/cvsrv0vKM differ
|