[Bug 2255786] Review Request: python-argparse-dataclass - Declarative CLIs with argparse and dataclasses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2255786



--- Comment #4 from Sandro <gui1ty@xxxxxxxxxxxxx> ---
(In reply to Ben Beasley from comment #3)
> (In reply to Sandro from comment #2)
> > My first thought glancing over the spec file:
> > 
> > > # We use the GitHub archive instead of the PyPI sdist to get CHANGELOG.md and
> > > # the tests.
> > > Source:         %{url}/archive/%{version}/argparse_dataclass-%{version}.tar.gz
> > 
> > Doesn't that scream `%forgesource`, pretty please with sugar on top?
> 
> You know, I personally find that it’s not worth defining %forgeurl and
> adding %forgemeta just to simplify the source URL and avoid writing out the
> extraction directory name for %autosetup. There is just as much noise added
> to the spec file as is removed, and at the cost of an extra layer of
> indirection. I do find the forge macros can be worth it for forges with much
> less straightforward URL schemes (GitLab), and perhaps when frequently
> alternating between snapshots and proper releases.
> 
> I’m not opposed to the general NeuroFedora habit of adding forge macros or
> to working on packages that use them. I just don’t *personally* find that
> they add much in straightforward cases like this.

I guess this boils down to a matter of personal preferences. I quite like just
throwing the URL in the spec and maybe a tag and let the forge macros do their
magic. If needed, a `-v` or `rpmspec --parse` will let me peek under the hood.

I promise I'll try being a bit less noisy when it comes to forge macros next
year. ;)


> > It would also let you do away with `%autosetup -n
> > argparse_dataclass-%{version}` in favor of `%forgeautosetup`.
> 
> On the other hand, considering the comments in
> 
>  
> https://git.sr.ht/~gotmax23/forge-srpm-macros/tree/
> 354ce4a51e80f6d524084d49612d77e69336cb71/item/rpm/macros.d/macros.forge#L65
> 
> about possibly removing %forgeautosetup in the future, this is probably
> better written as
> 
>   %autosetup %{forgesetupargs}

Ouch! I don't like the look of that. The comment reads "this will probably be
removed since it is unsafe in presence of multiple sources". Assuming
`%autosetup` is safe in presence of multiple sources. How can `%forgeautosetup`
be unsafe in the same situation? It already calls `%autosetup
%{forgesetupargs}` under the hood.

On a different note, I find it amusing that people actually scroll through the
code for information / documentation. I had a PR on one of my packages a couple
of days ago, fixing an issue with `%forgesource` being wrong for a GitHub
project that did not have it's version munged (tag == version). I was pointed
to a comment in the source code, explaining the issue.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2255786

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202255786%23c4
--
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux