rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
return self.SI_CODE + ' ' + self.CMMNAME + ' ' + str(self.restant()) + self.NUMBER_OF_UNITS
return self.SI_CODE + ' ' + self.CMMNAME + ' ' + str(self.restant())
def __unicode__(self): resting= '' #resting = str(restant_si_item(self.LTI_ID,self.CMMNAME)) return self.SI_CODE + ' ' + self.CMMNAME + ' ' + str(self.restant()) + self.NUMBER_OF_UNITS
return HttpResponseRedirect(reverse(lti_detail_url,args=[request.user.get_profile().warehouses.ORIGIN_WH_CODE]))
return HttpResponseRedirect(reverse(lti_detail_url,args=[current_wb.ltiNumber]))
def waybill_finalize_dispatch(request,wb_id): current_wb = Waybill.objects.get(id=wb_id) current_wb.transportDispachSigned=True current_wb.transportDispachSignedTimestamp=datetime.datetime.now() current_wb.dispatcherSigned=True for lineitem in current_wb.loadingdetail_set.select_related(): print lineitem.numberUnitsLo...
db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001")
db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001')
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set....
Response_Message.setvalue(0,' '*200)
Response_Message.setvalue(0,u' '*200)
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set....
Response_Code.setvalue(0,' '*2)
Response_Code.setvalue(0,u' '*2)
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set....
db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001")
db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001')
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
self.ErrorMessages = '' self.ErrorCodes = ''
self.ErrorMessages = u'' self.ErrorCodes = u''
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
DOCUMENT_CODE = 'wb' DISPATCH_DATE=the_waybill.dateOfDispatch.strftime("%Y%m%d")
DOCUMENT_CODE = u'wb' DISPATCH_DATE=unicode(the_waybill.dateOfDispatch.strftime("%Y%m%d"))
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
ORIGIN_DESCR=''
ORIGIN_DESCR=u''
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
DESTINATION_CODE=str(the_waybill.destinationWarehouse.ORG_CODE) PRO_ACTIVITY_CODE="" ACTIVITY_OUC="" LNDARRM_CODE=""
DESTINATION_CODE=unicode(the_waybill.destinationWarehouse.ORG_CODE) PRO_ACTIVITY_CODE=u"" ACTIVITY_OUC=u"" LNDARRM_CODE=u""
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
LOADING_DATE=the_waybill.dateOfLoading.strftime("%Y%m%d")
LOADING_DATE=unicode(the_waybill.dateOfLoading.strftime("%Y%m%d"))
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
COI_CODE = lineItem.siNo.coi_code()
COI_CODE = unicode(lineItem.siNo.coi_code())
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
strNetTotal = "%.3f" % NetTotal
strNetTotal = u'%.3f' % NetTotal
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
strGrossTotal = "%.3f" % GrossTotal
strGrossTotal = u'%.3f' % GrossTotal
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
Response_Message.setvalue(0,' '*200)
Response_Message.setvalue(0,u' '*200)
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
Response_Code.setvalue(0,' '*2)
Response_Code.setvalue(0,u' '*2)
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
print [CODE, DISPATCH_DATE, ORIGIN_TYPE, ORIGIN_LOCATION_CODE, ORIGIN_CODE, ORIGIN_DESCR, DESTINATION_LOCATION_CODE, DESTINATION_CODE, LTI_ID, LOADING_DATE, ORGANIZATION_ID, TRAN_TYPE_CODE, VEHICLE_REGISTRATION, MODETRANS_CODE, COMMENTS, PERSON_CODE, PERSON_OUC, CERTIFING_TITLE, TRANS_CONTRACTOR_CODE, SUPPLIER1_OUC, DR...
empty = u'' cursor.callproc(u'write_waybill.dispatch',(
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
''
empty
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybil...
description = models.CharField(max_length=20)
description = models.CharField(max_length=80)
def __unicode__(self): return self.REASON
invalidated= forms.CharField(widget=forms.HiddenInput())
invalidated= forms.CharField(widget=forms.HiddenInput(),required=False)
def clean(self): cleaned = self.cleaned_data print self.instance.dateOfDispatch
cursor.callproc('write_waybill.dispatch',(
cursor.callproc(u'write_waybill.receipt',(
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set...
WB_CODE,
CURR_CODE,
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set...
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()
def write_dispatch_waybill_compas(self,waybill_id):
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = u'' self.ErrorCodes = u'' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_way...
CODE,
CURR_CODE,
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = u'' self.ErrorCodes = u'' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_way...
CONTAINER_NUMBER,
CURR_CONTAINER_NUMBER,
def write_dispatch_waybill_compass(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = u'' self.ErrorCodes = u'' # gather wb info the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_way...
for myrecord in originalPerson: myrecord.save(using='default')
for my_person in originalPerson: my_person.save(using='default')
def import_ltis(request): #Copy Persons originalPerson = EpicPerson.objects.using('compas').filter(org_unit_code='JERX001') for myrecord in originalPerson: myrecord.save(using='default') #copy LTIs original = ltioriginal.objects.using('compas').filter(REQUESTED_DISPATCH_DATE__gt='2010-06-01') for myrecord in original:...
listRecepients = ReceptionPoint.objects.values('CONSEGNEE_CODE').distinct() listDispatchers = DispatchPoint.objects.values('ORIGIN_WH_CODE').distinct() print listDispatchers
def import_ltis(request): #Copy Persons originalPerson = EpicPerson.objects.using('compas').filter(org_unit_code='JERX001') for myrecord in originalPerson: myrecord.save(using='default') #copy LTIs original = ltioriginal.objects.using('compas').filter(REQUESTED_DISPATCH_DATE__gt='2010-06-01') for myrecord in original:...
status = 'done'
status = 'Import Finished'
def import_ltis(request): #Copy Persons originalPerson = EpicPerson.objects.using('compas').filter(org_unit_code='JERX001') for myrecord in originalPerson: myrecord.save(using='default') #copy LTIs original = ltioriginal.objects.using('compas').filter(REQUESTED_DISPATCH_DATE__gt='2010-06-01') for myrecord in original:...
def dispatchToCompas(request): profile = '' try: profile=request.user.get_profile() except: pass list_waybills = Waybill.objects.filter(waybillValidated = True).filter( waybillSentToCompas = False) the_compas = compas_write() error_message = '' error_codes = '' for waybill in list_waybills: status_wb = the_compas.the...
def waybill_finalize_dispatch(request,wb_id): current_wb = Waybill.objects.get(id=wb_id) current_wb.transportDispachSigned=True current_wb.transportDispachSignedTimestamp=datetime.datetime.now() current_wb.dispatcherSigned=True for lineitem in current_wb.loadingdetail_set.select_related(): print lineitem.numberUnitsLo...
numberUnitsLoaded= forms.CharField(widget=forms.HiddenInput())
def waybill_reception(request,wb_code): # get the LTI info profile = '' try: profile=request.user.get_profile() except: pass current_wb = Waybill.objects.get(id=wb_code) current_lti = current_wb.ltiNumber class LoadingDetailRecForm(ModelForm): siNo= ModelChoiceField(queryset=ltioriginal.objects.filter(CODE = current_lt...
fields = ('wbNumber','siNo','numberUnitsLoaded','numberUnitsGood','numberUnitsLost','numberUnitsDamaged','unitsLostReason','unitsDamagedReason','unitsDamagedType','unitsLostType','overloadedUnits')
fields = ('wbNumber','siNo','numberUnitsGood','numberUnitsLost','numberUnitsDamaged','unitsLostReason','unitsDamagedReason','unitsDamagedType','unitsLostType','overloadedUnits')
def waybill_reception(request,wb_code): # get the LTI info profile = '' try: profile=request.user.get_profile() except: pass current_wb = Waybill.objects.get(id=wb_code) current_lti = current_wb.ltiNumber class LoadingDetailRecForm(ModelForm): siNo= ModelChoiceField(queryset=ltioriginal.objects.filter(CODE = current_lt...
def fixtures_serialize(): dispatchPointsData = DispatchPoint.objects.all() receptionPointData = ReceptionPoint.objects.all() packagingDescriptonShort = PackagingDescriptonShort.objects.all() lossesDamagesReason = LossesDamagesReason.objects.all() lossesDamagesType = LossesDamagesType.objects.all() serialized_data = ...
def deserialize(request): waybillnumber='' for obj in serializers.deserialize("json", request.POST['wbdata']): if type(obj.object) is Waybill: waybillnumber= obj.object.id print waybillnumber return HttpResponseRedirect('../receive/'+ str(waybillnumber))
Full_coi= TheStockItems[0].origin_id
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set...
lostUnits
lostUnits, Full_coi, COMM_CATEGORY_CODE, COMM_CODE, PCKKCODE, ALLCODE, QUALITY
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection(u'TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001') cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set...
my_wh='' if profile != '':
if profile != '' :
def waybill_search(request): profile = '' try: profile=request.user.get_profile() except: pass search_string = request.GET['wbnumber'] found_wb='' found_wb = Waybill.objects.filter(waybillNumber__icontains=search_string) my_valid_wb=[] my_wh='' if profile != '': for waybill in found_wb: if profile.isCompasUser: my_va...
if profile.warehouses and waybill.loadingdetail_set.select_related()[0].siNo.ORIGIN_WH_CODE == profile.warehouses.ORIGIN_WH_CODE:
elif profile.warehouses and waybill.loadingdetail_set.select_related()[0].siNo.ORIGIN_WH_CODE == profile.warehouses.ORIGIN_WH_CODE:
def waybill_search(request): profile = '' try: profile=request.user.get_profile() except: pass search_string = request.GET['wbnumber'] found_wb='' found_wb = Waybill.objects.filter(waybillNumber__icontains=search_string) my_valid_wb=[] my_wh='' if profile != '': for waybill in found_wb: if profile.isCompasUser: my_va...
if profile.receptionPoints and waybill.loadingdetail_set.select_related()[0].siNo.CONSEGNEE_CODE == profile.receptionPoints.CONSEGNEE_CODE and waybill.loadingdetail_set.select_related()[0].siNo.DESTINATION_LOC_NAME == profile.receptionPoints.LOC_NAME :
elif profile.receptionPoints and waybill.loadingdetail_set.select_related()[0].siNo.CONSEGNEE_CODE == profile.receptionPoints.CONSEGNEE_CODE and waybill.loadingdetail_set.select_related()[0].siNo.DESTINATION_LOC_NAME == profile.receptionPoints.LOC_NAME :
def waybill_search(request): profile = '' try: profile=request.user.get_profile() except: pass search_string = request.GET['wbnumber'] found_wb='' found_wb = Waybill.objects.filter(waybillNumber__icontains=search_string) my_valid_wb=[] my_wh='' if profile != '': for waybill in found_wb: if profile.isCompasUser: my_va...
ltis = ltioriginal.objects.ltiCodesByWH(origin) profile=request.user.get_profile() return render_to_response('ltis.html',
ltis = ltioriginal.objects.ltiCodesByWH(origin) profile = '' try: profile=request.user.get_profile() except: pass return render_to_response('ltis.html',
def listOfLtis(request,origin): ltis = ltioriginal.objects.ltiCodesByWH(origin) profile=request.user.get_profile() return render_to_response('ltis.html', {'ltis':ltis,'profile':profile}, context_instance=RequestContext(request))
dispatch_list = ltioriginal.objects.warehouses() profile=request.user.get_profile() return render_to_response('dispatch_list.html',
dispatch_list = ltioriginal.objects.warehouses() profile = '' try: profile=request.user.get_profile() except: pass return render_to_response('dispatch_list.html',
def dispatch(request): dispatch_list = ltioriginal.objects.warehouses() profile=request.user.get_profile() return render_to_response('dispatch_list.html', {'dispatch_list':dispatch_list,'profile':profile}, context_instance=RequestContext(request))
profile=request.user.get_profile()
profile = '' try: profile=request.user.get_profile() except: pass
def waybill_reception_list(request): waybills = Waybill.objects.all() profile=request.user.get_profile() return render_to_response('waybill/reception_list.html', {'object_list':waybills,'profile':profile}, context_instance=RequestContext(request))
profile=request.user.get_profile()
profile = '' try: profile=request.user.get_profile() except: pass
def waybill_search(request): profile=request.user.get_profile() search_string = request.GET['wbnumber'] found_wb='' found_wb = Waybill.objects.filter(waybillNumber__icontains=search_string) my_valid_wb=[] for waybill in found_wb: if waybill.loadingdetail_set.select_related()[0].siNo.ORIGIN_WH_CODE == profile.warehous...
profile=request.user.get_profile()
profile = '' try: profile=request.user.get_profile() except: pass
def waybillCreate(request,lti_code): # get the LTI info current_lti = ltioriginal.objects.filter(CODE = lti_code) lti_code_global = lti_code profile=request.user.get_profile() class LoadingDetailDispatchForm(ModelForm): siNo= ModelChoiceField(queryset=ltioriginal.objects.filter(CODE = lti_code),label='Commodity') class...
matches = [match for match in variable_re.finditer(input_str)]
if expansion_symbol in input_str: matches = [match for match in variable_re.finditer(input_str)] else: matches = None
def ExpandVariables(input, is_late, variables, build_file): # Look for the pattern that gets expanded into variables if not is_late: variable_re = early_variable_re else: variable_re = late_variable_re input_str = str(input) # Get the entire list of matches as a list of MatchObject instances. # (using findall here wo...
[gyp.common.FixIfRelativePath(params['gyp_binary'], options.depth), '-fmake'] +
[gyp_binary, '-fmake'] +
def CalculateMakefilePath(build_file, base_name): """Determine where to write a Makefile for a given gyp file.""" # Paths in gyp files are relative to the .gyp file, but we want # paths relative to the source root for the master makefile. Grab # the path of the .gyp file as the base to relativize against. # E.g. "foo/...
variables['DEPTH'] = d
variables['DEPTH'] = d.replace('\\', '/')
def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, depth, check): global absolute_build_file_paths # If depth is set, predefine the DEPTH variable to be a relative path from # this build file's directory to the directory identified by depth. if depth: d = gyp.common.RelativePath(depth, os.pa...
cmd_cc = $(CC.$(TOOLSET)) $(CFLAGS) $(GYP_CFLAGS) $(DEPFLAGS) -c -o $@ $<
cmd_cc = $(CC.$(TOOLSET)) $(CFLAGS.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) -c -o $@ $<
ifdef V quiet=
cmd_cxx = $(CXX.$(TOOLSET)) $(CXXFLAGS) $(GYP_CXXFLAGS) $(DEPFLAGS) -c -o $@ $<
cmd_cxx = $(CXX.$(TOOLSET)) $(CXXFLAGS.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) -c -o $@ $<
ifdef V quiet=
cmd_link = $(LINK.$(TOOLSET)) $(LDFLAGS) $(GYP_LDFLAGS) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
cmd_link = $(LINK.$(TOOLSET)) $(LDFLAGS.$(TOOLSET)) $(GYP_LDFLAGS) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
ifdef V quiet=
cmd_solink = $(LINK.$(TOOLSET)) -shared $(LDFLAGS) $(GYP_LDFLAGS) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
cmd_solink = $(LINK.$(TOOLSET)) -shared $(LDFLAGS.$(TOOLSET)) $(GYP_LDFLAGS) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
ifdef V quiet=
up_to_date_ending = 'Checking Dependencies...\n** BUILD SUCCEEDED **\n'
up_to_date_endings = ( 'Checking Dependencies...\n** BUILD SUCCEEDED **\n', 'Check dependencies\n** BUILD SUCCEEDED **\n\n', )
def built_file_path(self, name, type=None, **kw): """ Returns a path to the specified file name, of the specified type, as built by Scons.
if not output.endswith(self.up_to_date_ending):
if not output.endswith(self.up_to_date_endings):
def up_to_date(self, gyp_file, target=None, **kw): """ Verifies that a build of the specified Xcode target is up to date. """ result = self.build(gyp_file, target, **kw) if not result: output = self.stdout() for expression in self.strip_up_to_date_expressions: output = expression.sub('', output) if not output.endswith(...
ARFLAGS.target := crs
ARFLAGS.target := $(call detect_arflags,target)
ifdef V quiet=
ARFLAGS.host := crs
ARFLAGS.host := $(call detect_arflags,host)
ifdef V quiet=
"""JOB_COUNT="$(sysctl -n hw.ncpu)"
"""JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)"
def GenerateOutput(target_list, target_dicts, data, params): options = params['options'] generator_flags = params.get('generator_flags', {}) parallel_builds = generator_flags.get('xcode_parallel_builds', True) serialize_all_tests = \ generator_flags.get('xcode_serialize_all_test_runs', True) xcode_projects = {} for bui...
message = '@echo note: ' + ExpandXcodeVariables(message, rule_input_dict)
message = ExpandXcodeVariables(message, rule_input_dict)
def GenerateOutput(target_list, target_dicts, data, params): options = params['options'] generator_flags = params.get('generator_flags', {}) parallel_builds = generator_flags.get('xcode_parallel_builds', True) serialize_all_tests = \ generator_flags.get('xcode_serialize_all_test_runs', True) project_version = generator...
makefile.write('\tmkdir -p %s\n' % ' '.join(concrete_output_dirs))
makefile.write('\t@mkdir -p "%s"\n' % '" "'.join(concrete_output_dirs))
def GenerateOutput(target_list, target_dicts, data, params): options = params['options'] generator_flags = params.get('generator_flags', {}) parallel_builds = generator_flags.get('xcode_parallel_builds', True) serialize_all_tests = \ generator_flags.get('xcode_serialize_all_test_runs', True) project_version = generator...
makefile.write('\t%s\n' % message)
makefile.write('\t@echo note: %s\n' % message)
def GenerateOutput(target_list, target_dicts, data, params): options = params['options'] generator_flags = params.get('generator_flags', {}) parallel_builds = generator_flags.get('xcode_parallel_builds', True) serialize_all_tests = \ generator_flags.get('xcode_serialize_all_test_runs', True) project_version = generator...
match = re.search(r'REG_\w+[ ]+([^\r]+)\r\n', text)
match = re.search(r'REG_\w+\s+([^\r]+)\r\n', text)
def _RegistryGetValue(key, value): """Use reg.exe to read a paricular key. While ideally we might use the win32 module, we would like gyp to be python neutral, so for instance cygwin python lacks this module. Arguments: key: The registry key to read from. value: The particular value to read. Return: The contents ther...
"cmd_%(name)s_%(count)d = %(cd_action)s%(mkdirs)s%(action)s" % {
"cmd_%(name)s_%(count)d = export LD_LIBRARY_PATH=" "$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; " "%(cd_action)s%(mkdirs)s%(action)s" % {
def WriteRules(self, rules, extra_sources, extra_outputs, part_of_all): """Write Makefile code for any 'rules' from the gyp input.
' must be length 2 or 3, not ' + len(condition)
' must be length 2 or 3, not ' + str(len(condition))
def ProcessConditionsInDict(the_dict, is_late, variables, build_file): # Process a 'conditions' or 'target_conditions' section in the_dict, # depending on is_late. If is_late is False, 'conditions' is used. # # Each item in a conditions list consists of cond_expr, a string expression # evaluated as the condition, and ...
break home_dot_gyp = None if home != None: home_dot_gyp = os.path.join(home, '.gyp') if not os.path.exists(home_dot_gyp): home_dot_gyp = None
home_dot_gyp = os.path.join(home, '.gyp') if not os.path.exists(home_dot_gyp): home_dot_gyp = None else: break
def main(args): my_name = os.path.basename(sys.argv[0]) parser = RegeneratableOptionParser() usage = 'usage: %s [options ...] [build_file ...]' parser.set_usage(usage.replace('%s', '%prog')) parser.add_option('-D', dest='defines', action='append', metavar='VAR=VAL', env_name='GYP_DEFINES', help='sets variable VAR to v...
if ret[-1] == '/':
if item[-1] == '/':
def MakePathRelative(to_file, fro_file, item): # If item is a relative path, it's relative to the build file dict that it's # coming from. Fix it up to make it relative to the build file dict that # it's going into. # Exception: any |item| that begins with these special characters is # returned without modification. #...
self.WriteList(spec.get('libraries'), 'LIBS')
libraries = spec.get('libraries') if libraries: libraries = gyp.common.uniquer(libraries) self.WriteList(libraries, 'LIBS')
def WriteTarget(self, spec, configs, deps, link_deps, extra_outputs, part_of_all): """Write Makefile code to produce the final target of the gyp spec.
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw > $(depfile).tmp sed -e 's|\\||' $(depfile).raw |\ xargs -n1 printf "%s:\n" |\ sed -e 1d \ >> $(depfile).tmp cat $(depfile).tmp >> $(depfile) rm $(depfile).tmp $(depfile).raw
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) sed -e 's|\\||' -e 's| |\n|g' $(depfile).raw |\ grep -v '^$$' |\ sed -e 1d -e 's|$$|:|' \ >> $(depfile) rm $(depfile).raw
ifdef V quiet=
if path[-1] == '/':
if ret[-1] == '/':
def MakePathRelative(to_file, fro_file, item): # If item is a relative path, it's relative to the build file dict that it's # coming from. Fix it up to make it relative to the build file dict that # it's going into. # Exception: any |item| that begins with these special characters is # returned without modification. #...
('C:\\Program Files', 'Microsoft Visual Studio 8', 'Common7', 'IDE', 'devenv.com'),
def initialize_build_tool(self): """ Initializes the Visual Studio .build_tool parameter, searching %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable, and falling back to a hard-coded default (on the current drive) if necessary. """ super(TestGypMSVS, self).initialize_build_tool() if not self.build_tool: # We ...
ARFLAGS.target := $(call detect_arflags,target)
ARFLAGS.target := crs
ifdef V quiet=
ARFLAGS.host := $(call detect_arflags,host)
ARFLAGS.host := crs
ifdef V quiet=
inputs=[src, build_file],
inputs=[src, os.path.basename(build_file)],
'target %s lists multiple .def files: %s' % (
$(AR.$(1)) crT $(obj).$(1)/arflags/artest.a $(obj).$(1)/arflags/artest.o > /dev/null 2>&1 &&
$(AR.$(1)) crsT $(obj).$(1)/arflags/artest.a $(obj).$(1)/arflags/artest.o > /dev/null 2>&1 &&
ifdef V quiet=
arflags=crT;
arflags=crsT;
ifdef V quiet=
arflags=cr;
arflags=crs;
ifdef V quiet=
RANLIB.target ?= ranlib
ifdef V quiet=
RANLIB.host ?= ranlib
ifdef V quiet=
quiet_cmd_alink = AR+RANLIB($(TOOLSET)) $@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^) && $(RANLIB.$(TOOLSET)) $@
quiet_cmd_alink = AR($(TOOLSET)) $@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^)
ifdef V quiet=
config_type = _GetMsvsConfigurationType(spec)
config_type = _GetMsvsConfigurationType(spec, build_file)
def _GenerateMsvsProject(proj_path, guid, build_file, spec, options, version): """Generates a .vcproj file. It may create .rules and .user files too. Arguments: proj_path: The path of the project file to be created. The .rules and .user files will start with the same path. guid: The GUID of this project. build_file:...
def _GetMsvsConfigurationType(spec):
def _GetMsvsConfigurationType(spec, build_file):
def _GetMsvsConfigurationType(spec): """Returns the configuration type for this project. It's a number defined by Microsoft. May raise an exception. Returns: An integer, the configuration type. """ try: config_type = { 'executable': '1', # .exe 'shared_library': '2', # .dll 'loadable_module': '2', # .dll 'static_l...
name = self.target + '_' + action['action_name']
name = self.target + '_' + StringToMakefileVariable(action['action_name'])
def WriteActions(self, actions, extra_sources, extra_outputs, part_of_all): """Write Makefile code for any 'actions' from the gyp input.
name = self.target + '_' + rule['rule_name']
name = self.target + '_' + StringToMakefileVariable(rule['rule_name'])
def WriteRules(self, rules, extra_sources, extra_outputs, part_of_all): """Write Makefile code for any 'rules' from the gyp input.
cmd = re.sub('^cat ', 'type ', cmd)
if type(cmd) == list: cmd = [re.sub('^cat ', 'type ', cmd[0])] + cmd[1:] else: cmd = re.sub('^cat ', 'type ', cmd)
def FixupPlatformCommand(cmd): if sys.platform == 'win32': cmd = re.sub('^cat ', 'type ', cmd) return cmd
DEPFLAGS = -MMD -MF $(depfile).tmp
DEPFLAGS = -MMD -MF $(depfile).raw
ifdef V quiet=
sed -i -e "s|^$(notdir $@)|$@|" $(depfile).tmp sed -e "s|^[^:]*: *||" -e "s| *\\\\$$||" -e 's|^ *||' \ -e "/./s|$$|:|" $(depfile).tmp >> $(depfile).tmp
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw > $(depfile).tmp sed -e 's|\\||' $(depfile).raw |\ xargs -n1 printf "%s:\n" |\ sed -e 1d \ >> $(depfile).tmp
ifdef V quiet=
rm -f $(depfile).tmp
rm $(depfile).tmp $(depfile).raw
ifdef V quiet=
for r in roots:
pending = set(roots) while pending: r = pending.pop() if r in dependencies: continue dependencies.add(r)
def DeepDependencyTargets(target_dicts, roots): """Returns the recursive list of target dependencies. """ dependencies = set() for r in roots: spec = target_dicts[r] r_deps = list(set((spec.get('dependencies', []) + spec.get('dependencies_original', [])))) for d in r_deps: if d not in roots: dependencies.add(d) for d i...
r_deps = list(set((spec.get('dependencies', []) + spec.get('dependencies_original', [])))) for d in r_deps: if d not in roots: dependencies.add(d) for d in DeepDependencyTargets(target_dicts, r_deps): if d not in roots: dependencies.add(d) return list(dependencies)
pending.update(set(spec.get('dependencies', []))) pending.update(set(spec.get('dependencies_original', []))) return list(dependencies - set(roots))
def DeepDependencyTargets(target_dicts, roots): """Returns the recursive list of target dependencies. """ dependencies = set() for r in roots: spec = target_dicts[r] r_deps = list(set((spec.get('dependencies', []) + spec.get('dependencies_original', [])))) for d in r_deps: if d not in roots: dependencies.add(d) for d i...
projectURL='http://localhost',
projectURL='http://localhost/',
def __init__(self, username=None, password=None, port=2525, fromaddr=None, mode="failing", categories=None, builders=None, projectURL='http://localhost', addLogs=False, relayhost="localhost", subject="%(projectName)s %(builder)s %(result)s", lookup=None, extraRecipients=[], sendToInterestedUsers=True, reply_to=None, ht...
build_url = "%s/builders/%s/builds/%s" % ( self.projectURL,
build_url = "%sbuilders/%s/builds/%s" % ( self.projectURL,
def buildMessage(self, name, build, results): """Send an email about the result. Don't attach the patch as MailNotifier.buildMessage do.""" self.subject = '%(projectName)s build of %(builder)s ended in %(result)s' ss = build.getSourceStamp() waterfall_url = self.projectURL build_url = "%s/builders/%s/builds/%s" % ( sel...
print "Mail: %s" % self.subject print print self._body
def buildMessage(self, name, build, results): """Send an email about the result. Don't attach the patch as MailNotifier.buildMessage do.""" self.subject = '%(projectName)s build of %(builder)s ended in %(result)s' ss = build.getSourceStamp() waterfall_url = self.projectURL build_url = "%s/builders/%s/builds/%s" % ( sel...
black_modules = filter(bool, opt.black_modules.split(' '))
if opt.black_modules: black_modules = filter(bool, opt.black_modules.split(' ')) else: black_modules = []
def load_mod_info(mdir, module): """ :param module: The name of the module (sale, purchase, ...) """ for filename in ['__openerp__.py', '__terp__.py']: description_file = os.path.join(mdir, module, filename) # Broken for zip modules. if description_file and os.path.isfile(description_file): return eval(open(description...
raise NotImplementedError
def cancel_buildrequests(self, brids): # TODO: we aren't entirely sure if it'd be safe to just delete the # buildrequest: what else might be waiting on it that would then just # hang forever?. _check_buildset() should handle it well (an empty # buildset will appear complete and SUCCESS-ful). But we haven't # thought i...
print "save summaries for %s: %s" % (build_id, build_result)
def saveTResults(self, build_id, name, build_result, t_results): print "save summaries for %s: %s" % (build_id, build_result) # TODO bld_obj = rpc.RpcProxy('software_dev.commit') tsum_obj = rpc.RpcProxy('software_dev.test_result') for seq, tr in enumerate(t_results): vals = { 'build_id': build_id, 'name': name, 'subst...
return True
def _check_buildset(self, t, bsid, now): return True # Since there is no difference from buildset->buildrequest, # nothing to do. raise NotImplementedError q = self.quoteq("SELECT br.complete,br.results" " FROM buildsets AS bs, buildrequests AS br" " WHERE bs.complete=0" " AND br.buildsetid=bs.id AND bs.id=?") t.execu...
raise NotImplementedError q = self.quoteq("SELECT br.complete,br.results" " FROM buildsets AS bs, buildrequests AS br" " WHERE bs.complete=0" " AND br.buildsetid=bs.id AND bs.id=?") t.execute(q, (bsid,)) results = t.fetchall() is_complete = True bs_results = SUCCESS for (complete, r) in results: if not complete: is_c...
return True
def _check_buildset(self, t, bsid, now): return True # Since there is no difference from buildset->buildrequest, # nothing to do. raise NotImplementedError q = self.quoteq("SELECT br.complete,br.results" " FROM buildsets AS bs, buildrequests AS br" " WHERE bs.complete=0" " AND br.buildsetid=bs.id AND bs.id=?") t.execu...
bqi_rest.append(bmsg)
bqi_rest.append(bexc)
def createSummary(self, plog): global log logs = self.cmd.logs buildbotURL = self.build.builder.botmaster.parent.buildbotURL bqi_re = re.compile(r'([^\>\|]+)(\|[^\>]+)?\> (.*)$')
log_order.apppend(sumk)
log_order.append(sumk)
def createSummary(self, plog): global log logs = self.cmd.logs buildbotURL = self.build.builder.botmaster.parent.buildbotURL bqi_re = re.compile(r'([^\>\|]+)(\|[^\>]+)?\> (.*)$') qlog_re = re.compile(r'Module: "(.+)", score: (.*)$')
url = 'bzr+ssh://bazaar.launchpad.net/' + url[3:]
url = 'https://code.launchpad.net/' + url[3:]
def __init__(self, url, poll_interval=10*60, blame_merge_author=False, branch_name=None, branch_id=None, category=None): # poll_interval is in seconds, so default poll_interval is 10 # minutes. # bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel/ # works, lp:~launchpad-pqm/launchpad/devel/ doesn't without h...
log.err("Cannot open the branch: %s" % e)
twisted.python.log.err("Cannot open the branch: %s" % e)
def startService(self): twisted.python.log.msg("BzrPoller(%s) starting" % self.url) buildbot.changes.base.ChangeSource.startService(self) if self.branch_name is None: ourbranch = self.url else: ourbranch = self.branch_name last_cid = self.parent.getLatestChangeNumberNow(branch=self.branch_id) if last_cid: change = self...
linere = re.compile(r'\[(.*)\] ([A-Z]+):([\w\.-]+):(.*)$', re.DOTALL)
linere = re.compile(r'\[(.*)\] ([A-Z_]+):([\w\.-]+):(.*)$', re.DOTALL)
def format(self, record): """ Format to stream """ levelstr = '' if record.levelno != logging.INFO: levelstr = '|%d' % record.levelno
self.linere = re.compile(r'\[(.*)\] ([A-Z]+):([\w\.-]+):(.*)$', re.DOTALL)
self.linere = re.compile(r'\[(.*)\] ([A-Z_]+):([\w\.-]+):(.*)$', re.DOTALL)
def __init__(self, root_path, port, netport, addons_path, pyver=None, srv_mode='v600', timed=False, debug=False, do_warnings=False, ftp_port=None, defines=False, pyargs=False, config=None): threading.Thread.__init__(self) self.root_path = root_path self.port = port # self.addons_path = addons_path self.args = [ 'python...
('pass', 'Passed'),('skip', 'Skipped')],
('pass', 'Passed'),('skip', 'Skipped'), ('debug','Debug')],
def _get_test_ids(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for step in self.pool.get('buildbot.test.step').browse(cr, uid, ids, context=context): result[step.test_id.id] = True return result.keys()