debuttypeChaineAvecBlancs = '\t\t<xs:simpleType name="T_stg">\n\t\t\t <xs:restriction>\n\t\t\t <xs:simpleType>\n\t\t\t\t <xs:list>\n\t\t\t\t <xs:simpleType>\n\t\t\t\t\t <xs:restriction base="xs:string">'
fintypeChaineAvecBlancs = '\t\t</xs:restriction>\n\t\t </xs:simpleType>\n\t\t </xs:list>\n\t\t </xs:simpleType>\n\t\t'
-SequenceChaineAvecBlancs = '\t\t<xs:complexType name="T_{}">\n\t\t\t <xs:sequence> <xs:element name="stg" type="Vimmp:T_stg" minOccurs="1" maxOccurs="1" default="{}">n\t\t\t <\xs:sequence>\n\t\t<xs:complexType name>\n'
+SequenceChaineAvecBlancs = '\t\t<xs:complexType name="T_{}">\n\t\t\t <xs:sequence> <xs:element name="stg" type="Vimmp:T_stg" minOccurs="1" maxOccurs="1" default="{}">n\t\t\t </xs:sequence>\n\t\t<xs:complexType name>\n'
import inspect
def creationAccasSimp(c):
- print c
+ print (c)
-class toto
-def __init__(self,*args):
- print dir(self)
- mro = type(self).mro()
- for next_class in mro[mro.index(ChildB) + 1:] :
- if hasattr(next_class, '__init__'):
- next_class.__init__(self,args)
+#class toto
+#def __init__(self,*args):
+# print dir(self)
+# mro = type(self).mro()
+# for next_class in mro[mro.index(ChildB) + 1:] :
+# if hasattr(next_class, '__init__'):
+# next_class.__init__(self,args)
# Utility function to identify classes of interest
def _isSupersedable (cls):
if issubclass(c,pyxb.binding.basis.complexTypeDefinition) : raw_classes_compo.add(c)
else : raw_classes_simp.add(c)
#print 'Original classes complex type: %s' % (raw_classes_compo,)
- print 'Original classes simple type: %s' % (raw_classes_simp,)
+ #print 'Original classes simple type: %s' % (raw_classes_simp,)
for c in raw_classes_simp:
setattr(c,'creationAccasSimp',creationAccasSimp)
oldInit=c.__init__
- print c.__class__
+ #print c.__class__
#setattr(c,'__init__',__init__)
- print c.__mro__
+ #print c.__mro__
# PyXB complex type definitions in this module that did not come
# from the original import *.
# Raw classes superseded by something in this module
superseded_classes = set([ _o for _o in raw_classes if _o._SupersedingClass() in this_classes ])
superseded_classes_tuple = tuple(superseded_classes)
- print 'Superseded classes: %s' % (superseded_classes,)
+ #print 'Superseded classes: %s' % (superseded_classes,)
# Raw classes that are subclasses of something superseded by this
# module, but that are not themselves superseded by this module
need_supersedure_classes = set([_o for _o in raw_classes if issubclass(_o, superseded_classes_tuple) and _o not in superseded_classes])
- print 'Need supersedure classes: %s' % (need_supersedure_classes,)
+ #print 'Need supersedure classes: %s' % (need_supersedure_classes,)
# Add local definitions to supersede classes all of whose
# ancestors have been superseded as necessary.
_injectClasses()
m=T_Unit1(1)
-print m
+#print m
if self.attendTuple() :
#nbDElts=type(listeDElt[0])
- print self.nomTypeAttendu
+ print (self.nomTypeAttendu)
self.traiteLesSequences()
# ---------------------------------------------------------
def explore(self,cata):
# --------------------
- print "je passe dans explore pour PROC ", self.nom
+ print ("je passe dans explore pour PROC ", self.nom)
self.dictATraiter= dictPROCXMLEficas
self.argumentXMLToEficas()
self.exploreArbre(cata)
# ---------------------------------------------------------
def explore(self,cata):
# ------------------------
- print "je passe dans explore pour OPER", self.nom
+ #print "je passe dans explore pour OPER", self.nom
self.cata=cata
self.dictATraiter= dictOPERXMLEficas
self.argumentXMLToEficas()
# ---------------------------------------------------------
def explore(self,cata):
# ------------------------
- print ('je passe dans explore pour BLOC', self.nom)
+ #print ('je passe dans explore pour BLOC', self.nom)
self.cata=cata
self.dictATraiter= dictBLOCXMLEficas
self.argumentXMLToEficas()
from setuptools import setup, find_packages
from sphinx.setup_command import BuildDoc
from InterfaceQT4 import getVersion
+#from pyqt_distutils.build_ui import build_ui
-#try:
-# from pyqt_distutils.build_ui import build_ui
-# cmdclass = {'build_ui': build_ui}
-#except ImportError:
-# build_ui = None # user won't have pyqt_distutils when deploying
-# cmdclass = {}
+import os
+import pathlib
maVersion = getVersion.getEficasVersion()
-mesPackages=find_packages(exclude=('convert','generator'))
+cmdclass = {'build_sphinx': BuildDoc }
+# 'build_ui': build_ui}
-print (mesPackages)
+def package_files(directory,extension=None):
+ paths = []
+ for (path, directories, filenames) in os.walk(directory):
+ for filename in filenames:
+ if extension==None : paths.append(os.path.join('..', path, filename))
+ elif pathlib.Path(filename).suffix == extension : paths.append(os.path.join('..', path, filename))
+ return paths
+
+doc_files = package_files('Doc')
+aide_files = package_files('Aide')
+rn_files = package_files('ReacteurNumerique')
+#ui_files = package_files('UiQT5', '.ui')
+pyui_files = package_files('UiQT5', '.py')
+icons_files = package_files('Editeur/icons')
+
+packages_data_files = doc_files + aide_files + rn_files + pyui_files + icons_files
setup(
name="eficas_RN",
description=(
"Tool used by the Réacteur Numérique project to "
"check data validity. also provides an GUI for setting up cases"),
- packages=find_packages(
- where='.',
- include=['Accas'],
- exclude=['convert','generator'],
+
+ packages = find_packages(
+ include=['Accas','Editeur', 'Efi2Xsd', 'Extensions', 'Ihm', 'InterfaceQT4', 'Noyau', 'Validation'],
+ exclude=['convert', 'generator'],
),
- #packages=find_packages(exclude=['convert']),
- #package_dir = {'': eficas},
- #packages=["Accas",],
+ data_files=[('convert',['convert/parseur_python.py', 'convert/__init__.py', 'convert/convert_pyth.py','convert/convert_python.py', 'convert/autre_parseur.py']),
+ ('generator',['generator/Formatage.py', 'generator/generator_aplat.py', 'generator/generator_python.py', 'generator/generator_XML.py', 'generator/__init__.py']),
+ ],
- #install_requires=[
- # "sphinx>=1.0.1",
- #],
- #command_options={
- # 'build_sphinx': {
- # 'project': ('setup.py', u'Eficas IHM'),
- # 'version': ('setup.py', maVersion),
- # 'source_dir': ('setup.py', 'doc')}
- # },
- python_requires=">=3.1")
+ package_data = {'': packages_data_files ,},
+
+ cmdclass=cmdclass,
+ command_options={
+ 'build_sphinx': {
+ 'project': ('setup.py', u'Eficas IHM'),
+ 'version': ('setup.py', maVersion),
+ 'source_dir': ('setup.py', 'Doc')},
+ 'build_ui': {
+ 'source_dir': ('setup.py', 'UiQT5')}
+ },
+ install_requires=[
+ "sphinx>=1.0.1",
+ ],
+ python_requires=">=3.1"
+)