Re: Neuro SIG Python packaging strategy change

2025-06-25 Thread Michael J Gruber via python-devel
Ankur Sinha via python-devel venit, vidit, dixit 2025-06-25 14:19:28:
...
> So, we're thinking of:
> 
> - prioritising packaging/maintaining software that is unavailable on
>   PyPi (or difficult to install from there)
> - dropping software that is pip installable from Fedora
> - shifting focus to testing that the software we care about is
>   pip installable on current Fedora releases
> - documenting software status (pip installable or not) and any
>   additional tips/steps required to get it working and informing
>   upstream of issues that we encounter and submitting fixes where
>   possible
> 
...
> What do you all think about this? Please share any thoughts you have
> about this, and any tips/tricks/tools that can be used. If it's
> something we can do for Python software in Fedora in general, we'd be
> happy to do that too.

Thanks for this proposal. I think it's coming just at the right time and
should - as you indicate - help us focus on Fedora as a platform. In
particular:

- The separation between "platform" and "application" wil become more
  and more important when the platform is provided as an immutable OS
  (for more users). Neither layering nor rolling your own (bootc) image
  make much sense for an "app", nor (in many cases) a flatpak.

- Reducing our set of rpm-packaged python apps helps whenever there is a
  major py change, be it a mass rebuild for a new python version or a
  change in packaging (such as dismissal of `setup.py install`).

I like the idea of having a "Fedora vetted/tested subset of PyPi", i.e.
packages confirmed to be installable on Fedora X for all X in current
releases, a bit like koschei for PyPi, possibly using existing `%check`
or such. More ecosystems than just Python could benefit from this.

Michael
-- 
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
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/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Using pyproject macros when setup.py isn't in root directory

2025-07-09 Thread Michael J Gruber via python-devel
Hi Scott

Scott Talbert via python-devel venit, vidit, dixit 2025-07-09 04:31:15:
> Is there any way to use the pyproject macros when setup.py isn't in the 
> root directory?
> 
> I maintain a couple of packages where this is the case - one where there 
> are actually two PyPI packages built from the same source package, and 
> another where the Python package is in a subdirectory because it's 
> bindings for a C library that is also built.
> 
> When I try, I get this error during build:
> + echo 'ERROR: Neither pyproject.toml nor setup.py found, consider using 
> %pyproject_buildrequires -N  if this is not a Python 
> package.'
> ERROR: Neither pyproject.toml nor setup.py found, consider using 
> %pyproject_buildrequires -N  if this is not a Python 
> package.
> 
> There aren't requirements files in the upstream packages.  But I guess I 
> could make a downstream one?

You don't need to create pyproject.toml, and IIAC you shouldn't (rather
suggest one upstream if needed). But note that setup.py serves two
purposes:

- "script": `python setup.py build` etc, which is deprecated
- "config": contains config "similar to pyproject.toml", not deprecated

You should be able to cd to the dir containing setup.py and call the
macro there. You can do this multiple times for multiple subdirs.

It becomes more interesting when upstream calls `python setup.py build` as
part of their all target in make. Work in progress ... (for notmuch).

Cheers
Michael
-- 
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
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/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue