From 507393a0aa95b563255ff31cc3ddd5428f0aa762 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 13 Dec 2020 16:51:35 -0700 Subject: [PATCH] update explicit references to /usr/bin/python -> /usr/bin/python2 --- packages/.gitignore | 7 +- packages/Makefile | 7 +- packages/SOIJ8.fp | 20 ----- packages/SOIJ8.py | 85 ++++++++++++++++++++ packages/diodes/0605.py | 2 +- packages/diodes/Makefile | 2 +- packages/jst/PH-smt-ra.py | 2 +- packages/jst/PH-th-ra.py | 2 +- packages/jst/PH-th-v.py | 2 +- packages/molex/Makefile | 6 +- packages/molex/miniusb.py | 2 +- packages/molex/picoblade-smt-ra.py | 2 +- packages/molex/picoblade-th-v.py | 2 +- packages/molex/picoflex-th-v.py | 2 +- packages/molex/ufl.py | 2 +- packages/norcomp/181-female.py | 2 +- packages/norcomp/182-female.py | 2 +- packages/norcomp/182-male.py | 2 +- packages/norcomp/189.py | 2 +- packages/pinheader/50milpitch.py | 24 +++--- packages/pinheader/Makefile | 4 + packages/switches/Makefile | 2 +- packages/switches/PNswitchDPDT.py | 2 +- packages/te-connectivity/3.5mm-ra.py | 2 +- packages/te-connectivity/bnc-th.py | 2 +- packages/te-connectivity/buchanan.py | 2 +- packages/te-connectivity/micromatch-smt-v.py | 2 +- packages/te-connectivity/micromatch-th-v.py | 2 +- packages/te-connectivity/tphybrid.py | 2 +- 29 files changed, 133 insertions(+), 64 deletions(-) delete mode 100644 packages/SOIJ8.fp create mode 100755 packages/SOIJ8.py diff --git a/packages/.gitignore b/packages/.gitignore index 0881e44..ffc6bd3 100644 --- a/packages/.gitignore +++ b/packages/.gitignore @@ -74,6 +74,7 @@ DR127.fp PowerPAD32.fp usb_onboard.fp u-pdfn-8.fp +dfn-2x3-8.fp ufqfpn28.fp ufqfpn24.fp ufqfpn20.fp @@ -124,7 +125,5 @@ VQFN-HR-12.fp wqfn-16.fp TSX-3225.fp ECX2236.fp -norcomp/*.fp -cui/*.fp -dfn-2x3-8.fp -*.pyc +trapc5mx.fp +SOIJ8.fp diff --git a/packages/Makefile b/packages/Makefile index 0c576b4..662c1d1 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -141,16 +141,17 @@ FOOTPRINTS= \ wqfn-16.fp \ TSX-3225.fp \ ECX2236.fp \ - trapc5mx.fp + trapc5mx.fp \ + SOIJ8.fp .5c.fp: nickle $*.5c -o $@ .py.fp: - python $*.py > $@ + python2 $*.py > $@ .py.lht: - python $*.py > $@ + python2 $*.py > $@ BUILDDIRS=$(DIRS:%=build-%) CLEANDIRS=$(DIRS:%=clean-%) diff --git a/packages/SOIJ8.fp b/packages/SOIJ8.fp deleted file mode 100644 index 20ce7af..0000000 --- a/packages/SOIJ8.fp +++ /dev/null @@ -1,20 +0,0 @@ -# author: Bdale Garbee -# email: bdale@gag.com -# dist-license: GPL 2 -# use-license: unlimited -Element[0x0 "SOIJ8" "" "" 0 0 -10161 -12011 0 100 0x0] -( - Pad[ -7499 -11712 -7499 -15845 2559 2441 3159 "pin8" "8" 0x0100] - Pad[ -7499 11713 -7499 15846 2559 2441 3159 "pin1" "1" 0x0100] - Pad[ -2499 -11712 -2499 -15845 2559 2441 3159 "pin7" "7" 0x0100] - Pad[ -2499 11713 -2499 15846 2559 2441 3159 "pin2" "2" 0x0100] - Pad[ 2500 -11712 2500 -15845 2559 2441 3159 "pin6" "6" 0x0100] - Pad[ 2500 11713 2500 15846 2559 2441 3159 "pin3" "3" 0x0100] - Pad[ 7500 -11712 7500 -15845 2559 2441 3159 "pin5" "5" 0x0100] - Pad[ 7500 11713 7500 15846 2559 2441 3159 "pin4" "4" 0x0100] - ElementLine[ -10491 -10590 -10491 10591 1000 ] - ElementLine[ -10491 10591 10492 10591 1000 ] - ElementLine[ 10492 10591 10492 -10590 1000 ] - ElementLine[ 10492 -10590 -10491 -10590 1000 ] - ElementArc[ -7499 8760 500 500 0 360 1000 ] -) diff --git a/packages/SOIJ8.py b/packages/SOIJ8.py new file mode 100755 index 0000000..3dda6f0 --- /dev/null +++ b/packages/SOIJ8.py @@ -0,0 +1,85 @@ +#!/usr/bin/python3 +# Copyright 2007-2020 by Bdale Garbee . GPLv2 +# +# Program to emit PCB footprint for SOIJ8 package used by 24FC1025 +# + +# dimensions in mm from 22064B.pdf datasheet for Microchip 25LC1024 + +BodyWidth = 5.38 +BodyHeight = 5.33 + +PinWidth = 0.65 +PinHeight = 1.7 +PinSpacing = 1.27 +RowCenters = 7.0 +RowSpacing = RowCenters - PinHeight + +import sys + +# we're going to use the 1/100 of a mil fundamental unit form +def mm2mils100( mm ): + return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 ) + +print ('# author: Bdale Garbee') +print ('# email: bdale@gag.com') +print ('# dist-license: GPL 2') +print ('# use-license: unlimited') + +print ('Element[0x0 "SOIJ8" "" "" 0 0 -10161 -12011 0 100 0x0]') +print ("(") +for pin in range (0,4): + print (' Pad[',\ + mm2mils100((pin-1.5) * PinSpacing), \ + mm2mils100(-(RowSpacing/2 + PinWidth/2)), \ + mm2mils100((pin-1.5) * PinSpacing), \ + mm2mils100(-(RowSpacing/2 + PinHeight - PinWidth/2)), \ + mm2mils100(PinWidth), \ + mm2mils100(PinSpacing - PinWidth), \ + mm2mils100(PinWidth)+600, \ + '"pin%i"' % (8 - pin), '"%i"' % (8 - pin), '0x0100]') + + print (' Pad[',\ + mm2mils100((pin-1.5) * PinSpacing), \ + mm2mils100(RowSpacing/2 + PinWidth/2), \ + mm2mils100((pin-1.5) * PinSpacing), \ + mm2mils100(RowSpacing/2 + PinHeight - PinWidth/2), \ + mm2mils100(PinWidth), \ + mm2mils100(PinSpacing - PinWidth), \ + mm2mils100(PinWidth)+600, \ + '"pin%i"' % (1 + pin), '"%i"' % (1 + pin), '0x0100]') + +print (' ElementLine[',\ + mm2mils100(-BodyHeight/2), \ + mm2mils100(-BodyWidth/2), \ + mm2mils100(-BodyHeight/2), \ + mm2mils100( BodyWidth/2), \ + '1000 ]') + +print (' ElementLine[',\ + mm2mils100(-BodyHeight/2), \ + mm2mils100( BodyWidth/2), \ + mm2mils100( BodyHeight/2), \ + mm2mils100( BodyWidth/2), \ + '1000 ]') + +print (' ElementLine[',\ + mm2mils100( BodyHeight/2), \ + mm2mils100( BodyWidth/2), \ + mm2mils100( BodyHeight/2), \ + mm2mils100(-BodyWidth/2), \ + '1000 ]') + +print (' ElementLine[',\ + mm2mils100( BodyHeight/2), \ + mm2mils100(-BodyWidth/2), \ + mm2mils100(-BodyHeight/2), \ + mm2mils100(-BodyWidth/2), \ + '1000 ]') + +print (' ElementArc[',\ + mm2mils100(-1.5 * PinSpacing), \ + mm2mils100(RowSpacing/2-PinHeight/4), \ + '500 500 0 360 1000 ]') + +print (")") diff --git a/packages/diodes/0605.py b/packages/diodes/0605.py index 69bc9db..01c2101 100755 --- a/packages/diodes/0605.py +++ b/packages/diodes/0605.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for 0605 dual LED diff --git a/packages/diodes/Makefile b/packages/diodes/Makefile index e9ea782..fdb8c69 100644 --- a/packages/diodes/Makefile +++ b/packages/diodes/Makefile @@ -11,7 +11,7 @@ FOOTPRINTS = \ nickle $*.5c -o $@ .py.fp: - python $*.py > $@ + python2 $*.py > $@ all: $(FOOTPRINTS) .gitignore diff --git a/packages/jst/PH-smt-ra.py b/packages/jst/PH-smt-ra.py index a7d1b42..7d32ca9 100755 --- a/packages/jst/PH-smt-ra.py +++ b/packages/jst/PH-smt-ra.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/jst/PH-th-ra.py b/packages/jst/PH-th-ra.py index 494e11c..22b4c08 100755 --- a/packages/jst/PH-th-ra.py +++ b/packages/jst/PH-th-ra.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/jst/PH-th-v.py b/packages/jst/PH-th-v.py index 407f3d2..a4ac8cb 100755 --- a/packages/jst/PH-th-v.py +++ b/packages/jst/PH-th-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/molex/Makefile b/packages/molex/Makefile index 036587d..5993635 100644 --- a/packages/molex/Makefile +++ b/packages/molex/Makefile @@ -16,13 +16,13 @@ ufl.fp: ufl.py ./ufl.py > ufl.fp pico-ezmate-6.fp: pico-ezmate.py - python pico-ezmate.py 6 >$@ + python2 pico-ezmate.py 6 >$@ pico-ezmate-4.fp: pico-ezmate.py - python pico-ezmate.py 4 >$@ + python2 pico-ezmate.py 4 >$@ pico-ezmate-2.fp: pico-ezmate.py - python pico-ezmate.py 2 >$@ + python2 pico-ezmate.py 2 >$@ clean: rm -f 53261* 53047* 90325* 548190572.fp ufl.fp pico-ezmate-*.fp diff --git a/packages/molex/miniusb.py b/packages/molex/miniusb.py index 380e1a2..6fa80a5 100755 --- a/packages/molex/miniusb.py +++ b/packages/molex/miniusb.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/molex/picoblade-smt-ra.py b/packages/molex/picoblade-smt-ra.py index 04205bb..a6b21e8 100755 --- a/packages/molex/picoblade-smt-ra.py +++ b/packages/molex/picoblade-smt-ra.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/molex/picoblade-th-v.py b/packages/molex/picoblade-th-v.py index a25f161..35261be 100755 --- a/packages/molex/picoblade-th-v.py +++ b/packages/molex/picoblade-th-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2008 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/molex/picoflex-th-v.py b/packages/molex/picoflex-th-v.py index 9d64c05..8cb6422 100755 --- a/packages/molex/picoflex-th-v.py +++ b/packages/molex/picoflex-th-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2008 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/molex/ufl.py b/packages/molex/ufl.py index b910f27..db91d69 100755 --- a/packages/molex/ufl.py +++ b/packages/molex/ufl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2009 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for Molex version of U.FL micro coax connector diff --git a/packages/norcomp/181-female.py b/packages/norcomp/181-female.py index 0357a75..d143029 100755 --- a/packages/norcomp/181-female.py +++ b/packages/norcomp/181-female.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2016 by Bdale Garbee . GPLv3+ # # Program to emit PCB footprint for Norcomp 181-YYY-213RYY1 connectors diff --git a/packages/norcomp/182-female.py b/packages/norcomp/182-female.py index b23fbbb..d82e804 100755 --- a/packages/norcomp/182-female.py +++ b/packages/norcomp/182-female.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2011 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for Norcomp 182-YYY-213RYY1 connectors diff --git a/packages/norcomp/182-male.py b/packages/norcomp/182-male.py index 0059580..3f1c9db 100755 --- a/packages/norcomp/182-male.py +++ b/packages/norcomp/182-male.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2016 by Bdale Garbee . GPLv3+ # # Program to emit PCB footprint for Norcomp 182-YYY-113RYY1 connectors diff --git a/packages/norcomp/189.py b/packages/norcomp/189.py index 46be29b..6f74ce5 100755 --- a/packages/norcomp/189.py +++ b/packages/norcomp/189.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2011 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for Norcomp 182-YYY-213RYY1 connectors diff --git a/packages/pinheader/50milpitch.py b/packages/pinheader/50milpitch.py index 76b1b78..7897ac9 100755 --- a/packages/pinheader/50milpitch.py +++ b/packages/pinheader/50milpitch.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # Copyright 2011 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for @@ -24,26 +24,26 @@ if pins > 15: sys.stderr.write('Must be no more than 15 pins\n') sys.exit(1) -print '# author: Bdale Garbee' -print '# email: bdale@gag.com' -print '# dist-license: GPL 2' -print '# use-license: unlimited' +print ('# author: Bdale Garbee') +print ('# email: bdale@gag.com') +print ('# dist-license: GPL 2') +print ('# use-license: unlimited') -print 'Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]' -print "(" +print ('Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]') +print ("(") for pin in range (1,pins+1): pinnum = pins + 1 - pin if pinnum == 1: - Flags = '0x0101' + Flags = '0x0101' else: - Flags = '0x0001' - print ' Pin[', \ + Flags = '0x0001' + print (' Pin[', \ mm2mils100((pins-1)*PinSpacing - (pin-1)*PinSpacing), \ 0, \ 4200, \ 1200, \ 4800, \ 2800, \ - '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']') -print ")" +print (")") diff --git a/packages/pinheader/Makefile b/packages/pinheader/Makefile index 021187f..e4c1c7f 100644 --- a/packages/pinheader/Makefile +++ b/packages/pinheader/Makefile @@ -1,4 +1,5 @@ FOOTPRINTS = \ + 50mil2pin.fp \ 50mil4pin.fp \ 50mil5pin.fp \ 50mil6pin.fp \ @@ -10,6 +11,9 @@ FOOTPRINTS = \ all: $(FOOTPRINTS) .gitignore +50mil2pin.fp: 50milpitch.py + ./50milpitch.py 2 > 50mil2pin.fp + 50mil3pin.fp: 50milpitch.py ./50milpitch.py 3 > 50mil3pin.fp diff --git a/packages/switches/Makefile b/packages/switches/Makefile index 425bb43..930e0ac 100644 --- a/packages/switches/Makefile +++ b/packages/switches/Makefile @@ -11,7 +11,7 @@ FOOTPRINTS = \ nickle $*.5c -o $@ .py.fp: - python $*.py > $@ + python2 $*.py > $@ all: $(FOOTPRINTS) .gitignore diff --git a/packages/switches/PNswitchDPDT.py b/packages/switches/PNswitchDPDT.py index db4eb8a..2cbdd4f 100755 --- a/packages/switches/PNswitchDPDT.py +++ b/packages/switches/PNswitchDPDT.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2010 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for C&K PN22SJNA03QE DPDT switch diff --git a/packages/te-connectivity/3.5mm-ra.py b/packages/te-connectivity/3.5mm-ra.py index 2cd4d48..20892b2 100755 --- a/packages/te-connectivity/3.5mm-ra.py +++ b/packages/te-connectivity/3.5mm-ra.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2014 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/te-connectivity/bnc-th.py b/packages/te-connectivity/bnc-th.py index 80f7a0c..f086a30 100755 --- a/packages/te-connectivity/bnc-th.py +++ b/packages/te-connectivity/bnc-th.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2017 by Bdale Garbee . GPLv2+ # # Program to emit PCB footprint for diff --git a/packages/te-connectivity/buchanan.py b/packages/te-connectivity/buchanan.py index 272c758..1960085 100755 --- a/packages/te-connectivity/buchanan.py +++ b/packages/te-connectivity/buchanan.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2007 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/te-connectivity/micromatch-smt-v.py b/packages/te-connectivity/micromatch-smt-v.py index 517ef84..b9baf24 100755 --- a/packages/te-connectivity/micromatch-smt-v.py +++ b/packages/te-connectivity/micromatch-smt-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2015 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/te-connectivity/micromatch-th-v.py b/packages/te-connectivity/micromatch-th-v.py index a18fb47..7f32765 100755 --- a/packages/te-connectivity/micromatch-th-v.py +++ b/packages/te-connectivity/micromatch-th-v.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2009 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for diff --git a/packages/te-connectivity/tphybrid.py b/packages/te-connectivity/tphybrid.py index babf03f..4a966eb 100755 --- a/packages/te-connectivity/tphybrid.py +++ b/packages/te-connectivity/tphybrid.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # Copyright 2011 by Bdale Garbee . GPLv2 # # Program to emit PCB footprint for a 16 pin -- 2.39.5