<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 12/09/2024 09:14, Jeremy Hansen
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANi9qStEOr3W_0Bf20SOXPX2riuVmreYJC=y3y0f0afAviwQbQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2024,
12:57 AM Tim Dickson via SlackBuilds-users <<a
href="mailto:slackbuilds-users@slackbuilds.org"
target="_blank" rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">slackbuilds-users@slackbuilds.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div>On 12/09/2024 06:29, Jeremy Hansen wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Sep 11,
2024 at 4:23 AM fourtysixandtwo <<a
href="mailto:fourtysixandtwo@sliderr.net"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true"
class="moz-txt-link-freetext">fourtysixandtwo@sliderr.net</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
Tue, Sep 10, 2024 at 12:55 PM Jeremy Hansen <<a
href="mailto:jebrhansen%2BSBo@gmail.com"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">jebrhansen+SBo@gmail.com</a>>
wrote:<br>
> export
SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION<br>
><br>
> and a few<br>
><br>
> export PDM_BUILD_SCM_VERSION=$VERSION<br>
><br>
> to fix some issue with versions not being
detected properly during build time (although, I
believe several are due to me choosing GitHub
tarballs instead of PyPi, which are packaged
differently). If those hacks were to be fixed by
these updates, I'd remove them.<br>
<br>
I use the pypi tarballs solely because I can
also grab the MD5SUM they provide with my update
script.</blockquote>
<div><br>
</div>
<div>This isn't an issue for me as my update
script will generate MD5SUM automatically no
matter how many source files there are. It will
just download everything in the DOWNLOAD or
DOWNLOAD_X86_64 variables in the .info (if they
don't already exist) and then generate MD5s for
all of them and update the .info file.</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It
is a bonus that I haven't had to use those
methods above with any builds I maintain.</blockquote>
<div><br>
</div>
<div>This is a minor inconvenience for a handful
of packages that prefer downloads from PyPi or a
git clone (rather than an archive download from
a tag/release). Luckily, out of the 150+
packages I maintain, there's probably less than
a dozen that I had to add this tweak/hack. I
think my preference to GitHub was many python
packages I took over that used PyPi as their
source location used hashed download links,
which prevented my update script from using the
right download link (although, I suppose I could
add the functionality to switch to links that
simply require updating the version -- future me
will worry about that :D). This led me to prefer
GitHub links and then outta sheer stubbornness,
when problems arose from it, I found hacks to
continue using GitHub over PyPi.</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I
just checked with python3-tox and
python3-pyproject-api tarballs from pypi and
they both include a "src/*/*version.py". One
does have to watch for the change in source from
say pyproject-api to pyproject_api in both
download and SRCNAM though.<br>
<br>
Have you come across this for troubleshooting?<br>
export SETUPTOOLS_SCM_DEBUG=true<br>
</blockquote>
<div><br>
</div>
<div>I was not aware of that flag, however, it led
to either a similar or the same issue (too lazy
to investigate further right now).</div>
<div><br>
</div>
<div>"mAke sURe yoU're EitHer bUildINg frOM A
FulLy iNTAcT git RepOsiToRY oR PyPi taRbaLLs."</div>
<div><br>
</div>
<div>Error, meet stubbornness (my hack) :D</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">While
we are on the topic of setuptools_scm, I have a
method using<br>
venv to upgrade it to 8.1.0, but unfortunately
the newer versions do<br>
not honour PYTHONPATH precedence and import the
older slackware 15.0<br>
version. One would have to remove the older
system package or use the<br>
venv hack on every slackbuild that requires the
newer setuptools_scm<br>
in /opt.</blockquote>
<div><br>
</div>
<div>I mean, we currently have to add hacks in
SlackBuilds to use newer python packages
residing in /opt/ (which are mostly, if not
entirely, packages you maintain). This has
opened up the ability to upgrade a lot of python
packages further than would be allowed if we
solely used the packages from 15.0. They've been
very helpful in allowing upgrades without
additional hacks.</div>
<div><br>
</div>
<div>If the newer version offers something
severely lacking on Slackware or SBo today, I
(and I can only speak for myself), have no
issues adding a line or few to my SlackBuilds
that require that newer version.</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Upstream
is aware of this issue but don't have any
interest in fixing it currently.</blockquote>
<div><br>
</div>
<div>That sucks.</div>
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>
Go for it! It's easier than me trying to merge
your changes and submit a PR this week.<br>
<br>
Done!<br>
</blockquote>
<div><br>
</div>
<div>Thanks! </div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
SlackBuilds-users mailing list
<a href="mailto:SlackBuilds-users@slackbuilds.org"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">SlackBuilds-users@slackbuilds.org</a>
<a
href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a>
Archives - <a
href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a>
FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer noreferrer"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://slackbuilds.org/faq/</a>
</pre>
</blockquote>
i found that for some python builds github archives/tags
were missing some of the source, which was included in
pypi source download, so have to use pypi for those.
it's a bit more inconvenient, as the url's have the
hashes as you mentioned, but it's not too awkward.<br>
regards, Tim<br>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">You can change the PyPi URLs to not have hashes,
but you can also usually bypass the missing source files when
getting it from GitHub with variables passed during the build
process.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I usually choose the latter out of spite for
PyPi not defaulting to non-hashed source links.</div>
<div dir="auto"><br>
</div>
<div dir="auto">However, if you're interested in bypassing the
hash-based sources with PyPi, it is based on the following URL
layout: </div>
<div dir="auto"><br>
</div>
<div dir="auto">
<div dir="auto"><a
href="https://files.pythonhosted.org/packages/source/$%7BPROJECT::1%7D/$%7BPROJECT%7D/$%7BPROJECT%7D-$%7BVERSION%7D.tar.gz"
target="_blank" rel="noreferrer" moz-do-not-send="true">https://files.pythonhosted.org/packages/source/${PROJECT::1}/${PROJECT}/${PROJECT}-${VERSION}.tar.gz</a></div>
<div dir="auto"><br>
</div>
<div dir="auto">The ${PROJECT::1} being the first letter of
the project/package name. </div>
<div dir="auto"><br>
</div>
<div dir="auto">So if it was tox (which is python3-tox on SBo)
the url would be (replacing ${VERSION} with the actual
version): </div>
<div dir="auto"><br>
</div>
<div dir="auto"><a
href="https://files.pythonhosted.org/packages/source/t/tox/tox-$%7BVERSION%7D.tar.gz"
target="_blank" rel="noreferrer" moz-do-not-send="true">https://files.pythonhosted.org/packages/source/t/tox/tox-${VERSION}.tar.gz</a><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">I have a bash function that can find the
non-hashed URL for PyPi sources and will correct any
download links for GitHub (since they do funky stuff with
content disposition). You can work it into a script, add it
to your shell using a bashrc or similar, or make it its own
script. </div>
<div dir="auto"><br>
</div>
<div dir="auto"><a
href="https://github.com/bassmadrigal/scripts/blob/master/check-source-download.sh"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/bassmadrigal/scripts/blob/master/check-source-download.sh</a><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Jeremy</div>
<div dir="auto"><br>
</div>
<div dir="auto">(I don't know what the crap is going on with
the below section of quoted email. I couldn't delete it
using Gmail's android app. It really frustrated me, but not
enough to go to my computer and see if I can fix it there.)</div>
</div>
<br>
</div>
</blockquote>
thanks, that's really useful info. It looks similar to sourceforge
upload urls in that respect. It would be useful to have all these
sort of tips for slackbuild maintainers in a central place. maybe
<a class="moz-txt-link-freetext" href="https://www.slackwiki.com/Writing_A_SlackBuild_Script">https://www.slackwiki.com/Writing_A_SlackBuild_Script</a> ,or is there
a better place?<br>
regards, Tim<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br /><table style="border-top: 1px solid #D3D4DE;"><tr><td style="width: 55px; padding-top: 13px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://s-install.avcdn.net/ipm/preview/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;"/></a></td><td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free.<a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avg.com</a></td></tr></table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>