From 35c17f8db0850626128d49f8965db21a5cfb1062 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 6 Jan 2025 11:11:29 +0100 Subject: [PATCH] Updating for Debian packaging & name of the OBS upload script. --- cumulus/src/designflow/task.py | 1 + cumulus/src/plugins/block/bigvia.py | 34 ++++++++++++++++++----------- documentation/pelican-plugins | 2 +- packaging/patchvenv.sh | 14 ++++++++---- packaging/uploadOBS.sh | 11 +++++----- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/cumulus/src/designflow/task.py b/cumulus/src/designflow/task.py index 6e9a615a8..e42248834 100644 --- a/cumulus/src/designflow/task.py +++ b/cumulus/src/designflow/task.py @@ -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: diff --git a/cumulus/src/plugins/block/bigvia.py b/cumulus/src/plugins/block/bigvia.py index 6c5545fbe..0f5b87fd1 100644 --- a/cumulus/src/plugins/block/bigvia.py +++ b/cumulus/src/plugins/block/bigvia.py @@ -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() )) @@ -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 ) @@ -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] @@ -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() @@ -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 diff --git a/documentation/pelican-plugins b/documentation/pelican-plugins index c61bd1291..10a14332c 160000 --- a/documentation/pelican-plugins +++ b/documentation/pelican-plugins @@ -1 +1 @@ -Subproject commit c61bd12914fd52af1808c53151a07225e7c3341c +Subproject commit 10a14332c35932b282b1ec63f0e10ae7d45aed8c diff --git a/packaging/patchvenv.sh b/packaging/patchvenv.sh index 9cf892830..f64e95dad 100755 --- a/packaging/patchvenv.sh +++ b/packaging/patchvenv.sh @@ -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 @@ -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 @@ -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:" diff --git a/packaging/uploadOBS.sh b/packaging/uploadOBS.sh index 1ba53e272..08839ebd3 100755 --- a/packaging/uploadOBS.sh +++ b/packaging/uploadOBS.sh @@ -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." @@ -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 "" } @@ -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";; @@ -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 @@ -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