Skip to content

Commit

Permalink
Updating for Debian packaging & name of the OBS upload script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpc-lip6 committed Jan 8, 2025
1 parent 5c73ca2 commit 35c17f8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 23 deletions.
1 change: 1 addition & 0 deletions cumulus/src/designflow/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def export ( self ):
for variable, value in self.shellEnv.items():
if value is None: continue
os.environ[ variable ] = value
print( '{} = {}'.format( variable, value ))
if ShellEnv.RDS_TECHNO_NAME is not None:
os.environ[ 'RDS_TECHNO_NAME' ] = ShellEnv.RDS_TECHNO_NAME
if ShellEnv.GRAAL_TECHNO_NAME is not None:
Expand Down
34 changes: 21 additions & 13 deletions cumulus/src/plugins/block/bigvia.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,13 @@ def doLayout ( self ):
self.hasLayout = True

def _computeCutMatrix ( self, depth ):
twoGrid = DbU.fromGrid( 2.0 )
viaLayer = rg.getContactLayer( depth )
cutLayer = viaLayer.getCut()
cutSide = cutLayer.getMinimalSize()
cutSpacing = cutLayer.getMinimalSpacing()
cutVSpacing = int(cutSpacing * 1.4)
cutVSpacing = cutVSpacing - cutVSpacing%twoGrid
if not cutSide:
raise ErrorMessage( 1, 'BigVia._doCutMatrix(): Minimal side of cut layer "{}" is zero.' \
.format( cutLayer.getName() ))
Expand All @@ -203,9 +206,9 @@ def _computeCutMatrix ( self, depth ):
botPlate.setWidth( minHSide )

botVEnclosure = viaLayer.getBottomEnclosure( Layer.EnclosureV )
cutNb = (self.rheight - 2*botVEnclosure + cutSpacing) // (cutSide + cutSpacing)
cutNb = (self.rheight - 2*botVEnclosure + cutVSpacing) // (cutSide + cutVSpacing)
if cutNb == 0: cutNb = 1
minVSide = 2*botVEnclosure + cutNb*cutSide + (cutNb-1)*cutSpacing
minVSide = 2*botVEnclosure + cutNb*cutSide + (cutNb-1)*cutVSpacing
if (depth == self.bottomDepth) or (botPlate.getHeight() < minVSide):
botPlate.setHeight( minVSide )

Expand All @@ -218,9 +221,9 @@ def _computeCutMatrix ( self, depth ):
topPlate.setWidth( minHSide )

topVEnclosure = viaLayer.getTopEnclosure( Layer.EnclosureV )
cutNb = (self.rheight - 2*topVEnclosure + cutSpacing) // (cutSide + cutSpacing)
cutNb = (self.rheight - 2*topVEnclosure + cutVSpacing) // (cutSide + cutVSpacing)
if cutNb == 0: cutNb = 1
minVSide = 2*topVEnclosure + cutNb*cutSide + (cutNb-1)*cutSpacing
minVSide = 2*topVEnclosure + cutNb*cutSide + (cutNb-1)*cutVSpacing
topPlate.setHeight( minVSide )

return [cutSide, cutSpacing, botHEnclosure]
Expand Down Expand Up @@ -259,15 +262,20 @@ def _computeCutMatrix ( self, depth ):
return [cutSide, cutSpacing, hEnclosure]

def _doCutMatrix ( self, depth, cutMatrix ):
cutSide = cutMatrix[0]
cutSpacing = cutMatrix[1]
hEnclosure = cutMatrix[2]
viaLayer = rg.getContactLayer( depth )
cutLayer = viaLayer.getCut()
cutArea = self.plates[ depth ].getBoundingBox()
twoGrid = DbU.fromGrid( 2.0 )
cutSide = cutMatrix[0]
cutSpacing = cutMatrix[1]
cutVSpacing = int(cutSpacing * 1.4)
cutVSpacing = cutVSpacing - cutVSpacing%twoGrid
hEnclosure = cutMatrix[2]
viaLayer = rg.getContactLayer( depth )
cutLayer = viaLayer.getCut()
cutAreaBot = self.plates[ depth ].getBoundingBox()
cutAreaTop = self.plates[ depth+1 ].getBoundingBox()
cutArea = cutAreaTop.getIntersection( cutAreaBot )
cutArea.inflate( -hEnclosure, -hEnclosure )
xoffset = (cutArea.getWidth () % (cutSide+cutSpacing)) // 2
yoffset = (cutArea.getHeight() % (cutSide+cutSpacing)) // 2
xoffset = (cutArea.getWidth () % (cutSide+ cutSpacing)) // 2
yoffset = (cutArea.getHeight() % (cutSide+cutVSpacing)) // 2
cutArea.translate( xoffset, yoffset )
self.vias[ depth ] = []
y = cutArea.getYMin()
Expand All @@ -279,5 +287,5 @@ def _doCutMatrix ( self, depth, cutMatrix ):
self.vias[ depth ][ -1 ].append( cut )
x += cutSide + cutSpacing
trace( 550, '\t| cut {})\n'.format( cut ))
y += cutSide + cutSpacing
y += cutSide + cutVSpacing

14 changes: 10 additions & 4 deletions packaging/patchvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

useSystemPackages="False"
removeVEnvWatchfiles="False"
removePip="False"
badArgument=""
while [ $# -gt 0 ]; do
case $1 in
--use-system-packages) useSystemPackages="True";;
--remove-venv-watchfiles) removeVEnvWatchfiles="True";;
--remove-pip) removePip="True";;
*) badArgument="$1";;
esac
shift
Expand All @@ -35,6 +37,14 @@
sed -i "s,#!.*venv/bin/python,#!${VIRTUAL_ENV}/bin/python," ${binfile}
done

if [ "${removeVEnvWatchfiles}" = "True" ]; then
rm -r ${VIRTUAL_ENV}/bin/watchfiles
rm -r ${VIRTUAL_ENV}/lib/python3.9/site-packages/watchfiles*
fi
if [ "${removePip}" = "True" ]; then
rm -r ${VIRTUAL_ENV}/bin/pip*
rm -r ${VIRTUAL_ENV}/lib/python3.9/site-packages/pip*
fi
if [ "${useSystemPackages}" = "True" ]; then
sed -i "s,include-system-site-packages.*=.*false,include-system-site-packages.*=.*true," .venv/pyvenv.cfg
fi
Expand All @@ -45,10 +55,6 @@
ln -sf python3 ${VIRTUAL_ENV}/bin/${PYTHON_VERSION}
ln -sf /usr/bin/${PYTHON_VERSION} ${VIRTUAL_ENV}/bin/python3
fi
if [ "${removeVEnvWatchfiles}" = "True" ]; then
rm -r ${VIRTUAL_ENV}/bin/watchfiles
rm -r ${VIRTUAL_ENV}/lib/python3.9/site-packages/watchfiles*
fi
ls -al .venv/bin
source ${VIRTUAL_ENV}/bin/activate
echo "Check Python interpreter links:"
Expand Down
11 changes: 6 additions & 5 deletions packaging/uploadOBS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

printHelp () {
echo ""
echo " Usage: uploadOBSs.sh [--sources] [--docs] [--venv] [--commit] [--run]"
echo " Usage: uploadOBSs.sh [--sources] [--docs] [--venv] [--commit] [--all]"
echo ""
echo " Options:"
echo " [--sources] : Build an archive from the HEAD of the current branch."
Expand All @@ -17,7 +17,7 @@
echo " This will effectively triggers the rebuild of the packages."
echo " OBS local repository is hardwired to:"
echo " \"${obsDir}\""
echo " [--run] : Perform all actions at once."
echo " [--all] : Perform all actions at once."
echo ""

}
Expand All @@ -36,7 +36,7 @@
--docs) doDocs="true";;
--venv) doVEnv="true";;
--commit) doCommit="true";;
--run) doSources="true"
--all) doSources="true"
doDocs="true"
doVEnv="true"
doCommit="true";;
Expand All @@ -53,8 +53,8 @@
echo "* Using HEAD githash as release: ${githash}."
if [ "${doSources}" = "true" ]; then
echo "* Making source file archive from Git HEAD ..."
./packaging/git-archive-all.sh -v --prefix coriolis-eda-2.5.5/ --format tar.gz coriolis-eda-${version}.tar.gz
#git archive --prefix=coriolis-2.5.5/ --format=tar.gz -o coriolis-${version}.tar.gz HEAD
./packaging/git-archive-all.sh -v --prefix coriolis-eda-${version}/ --format tar.gz coriolis-eda-${version}.tar.gz
#git archive --prefix=coriolis-${version}/ --format=tar.gz -o coriolis-${version}.tar.gz HEAD
fi

if [ "${doDocs}" = "true" ]; then
Expand Down Expand Up @@ -103,6 +103,7 @@
sed -i "s,^%define docGithash .*,%define docGithash ${docGithash}," ${obsDir}/coriolis-eda.spec
if [ "${doCommit}" = "true" ]; then
pushd ${obsDir}
osc add *
osc commit
popd
fi
Expand Down

0 comments on commit 35c17f8

Please sign in to comment.